This widget could not be displayed.
This widget could not be displayed.
cancel
Showing results for 
Search instead for 
Did you mean: 

Change captive portal URL?

Sprite_tm
Star I
Android checks a certain well-known URL when it connects to a WiFi access point to see if that WiFi has Internet connectivity or is behind a captive portal. In 'vanilla' Android, the URL used is http://connectivitycheck.gstatic.com/generate_204 , but you can change it by setting e.g. captive_portal_https_url. Asus, however, sets that setting to https://connect.asus.com.cn/generate_204 and if I change it, it will overwrite it as soon as WiFi is turned off or on.
Due to network reasons, that URL does not work for me and I need to replace it with my own. Currently, it seems impossible to do that using 'standard' Android ways. Dear Asus, can you tell me if there's an alternate way I can change it, or can I (or you, in a software update) change this behaviour so it's user-modifiable?
1 REPLY 1

Sprite_tm
Star I
Okay, it seems to be a China-only thing: if the phone (somehow) detects it's in mainland China, it overwrites whatever the captive portal settings are with what's in the android resource default_captive_portal_http_url_cn, which is hardcoded to that connect.asus.com.cn server. The issue seems to be that 1. that server does not return a 204 like it's supposed to, and 2. the situation is probably not something many people run into as the Zenfone 8 is not released in CN.
I've worked around it for now by building a Magisk module that overlays the resource with my own server. It would still be nice if Asus either fixed the https://connect.asus.com.cn/generate_204 url to actually generate a 204, or make it so the default behaviour of overriding the settings can be turned off.