|adb shell settings put global captive_portal_fallback_url http://g.cn/generate_204|
|adb shell settings put global captive_portal_http_url http://www.google.cn/generate_204|
|adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204|
|adb shell settings put global captive_portal_other_fallback_urls http://www.qualcomm.cn/generate_204|
@vip008008 I suppose you still didn't figure it out. If you did, why not edit your post and share the way?
So, basically you look up how to use adb to connect to your device, then run commands in the original gist.
Finally, some people mentioned that only
Although if I recall correctly, in Android 12 there will be a new way to work with captive portal things, etc.
Make sure to use http url with http setting, and https url with https setting.