1. Current Location: Home >  Router Encyclopedia >  Phones detect WiFi by secretly accessing probe URLs, tested by Apple, Xiaomi, Huawei

Phones detect WiFi by secretly accessing probe URLs, tested by Apple, Xiaomi, Huawei

Mobile network probe mechanism: 204, 302, and timeout responses determine whether WiFi is networked; test table of probe addresses from various providers

When connecting to WiFi in a mall, the login page pops up before entering the password. Who notifies your phone? On the other hand, my mom's router is fine, but her phone just has an exclamation mark on the WiFi icon. These two seemingly unrelated issues are actually based on the same mechanism: phones detect internet availability by secretly accessing a website.

When a phone checks whether there is internet, it's not pinging, but by accessing a website

.

After the phone connects to WiFi, the system does one of the first things in the background: accessing a fixed detection URL, called network connectivity checking. After that, I'll check back every few days. You don't need to click anything at all; the notification bar says "Connected, cannot access the internet" and the login page that pops up automatically are all probe conclusions.

Why not use the ping I wrote before? ping uses ICMP. Many gateways and firewalls don't return packets from this protocol at all, and even if ping is done, it doesn't mean the webpage can be opened. The probe goes directly to HTTP; whether it can actually get a response is the real human standard for "networking."

Another detail: phones record each network separately—WiFi accounts for one conclusion, cellular data for another, and they don't overlap each other. The system relies on these two accounts to decide which data path to take—the WiFi book says "cannot access the internet," so it dares to quietly shift data to 4G. This is one reason why some people still run their data on WiFi and with their phone bills. The "WLAN unable to access the internet" switch you see in the settings is designed for this behavior.

More importantly, the probe expects a response. Android's expectation got a 204 rating, meaning "the server received it, no content for you"—the reply was empty, which meant no one tampered with this path. 204 I wrote about this status code in the article about state codes, and here it is the main character. If the reply doesn't match expectations, the phone immediately understands: something is off about this network.

I

visited each probe address one by

one;

each faction's probe address is different. I typed each one with a curl, and all the replies matched the numbers:

: ; Byte vivo
Faction detection address, my actual test reply
Apple captive.apple.com/hotspot-detect.html200, only one 'Success' in the main text
Google's native Android connectivitycheck.gstatic.com/generate_204204 has zero bytes
Xiaomi/Redmi connect.rom.miui.com/generate_204204 has zero bytes
Huawei/Honor connectivitycheck.platform.hicloud.com/generate_204204, Zero
wifi.vivo.com.cn/generate_204204, Zero Byte
Windowswww.msftconnecttest.com/connecttest.txt200, main text Microsoft Connect Test

Apple doesn't want 204, but 200 plus the Success mentioned in the main text. They even have an address as a backup, and I've tested it as well. Windows is the most verbose. Besides pulling txt, you also need to resolve a dedicated domain dns.msftncsi.com. I found out it's 131.107.255.255. Only if you can resolve this address does DNS pass.

Why do Chinese manufacturers always change their home addresses? Google's detection address is sometimes unreachable on some domestic networks, and native Android users get exclamation marks year-round when connected to WiFi, but the internet is clearly good. Xiaomi and Huawei simply swapped probes for their own servers, solving the problem once and for all. Conversely, gray-market phones or those that have been flashed with Google services are the most likely to fall for this trick in China.

By the way, a counterintuitive point: all these probe addresses are plaintext starting with http, not https. It's not that the manufacturer is lazy, it's intentional. The gateway is supposed to block this request, so they can give you the 302 license; If the detection request is encrypted and the gateway can't block or insert the jump, the phone may not detect the "login required" issue. In other words, probes are inherently meant to walk a path that can be tampered with, and tampering itself is a signal. These addresses are not something ordinary users can change in the system, nor are they worth changing.

204, 302, timeout—three types of replies and three fates

Just

looking at the address isn't enough. I set up a fake gateway with a dozen lines of code on my computer using Python, then used curl as my phone to simulate each of the three types of replies once more.

Scenario A, probe returns 204: The phone detects network connection, is quiet, and does not prompt anything. Scenario B: The probe returns to 302, and Location points to a login page: the phone detects 'this WiFi requires authentication,' and a mini browser automatically pops up to that address—the mall's WiFi login page pops up automatically, and that's how it works. The third scenario is that the probe is sent and disappears without a trace: the phone is denied internet access, the icon is marked with an exclamation mark, and Android may even quietly switch data back to the cellular network.

I'm copying the fake gateway's reply here as is. Just look at what your phone sees:

Scenario A: HTTP/1.0 204 No Content (reply ends here, not a single byte of body text)

Scenario B: HTTP/1.0 302 Found Location: http://192.168.10.1/login?redirect=1

Scenario A line is "The internet is clean"; The Location in the line B of scenario B is the landing point automatically popped up on the login page. You don't need to read the webpage on your phone; just reading the beginning of these two lines of reply is enough to make a conclusion. This 'lock up and wait for authentication' portal mechanism is called 'captive portal' in English. 'captive' means 'captured'—you are connected, but you haven't been released yet.

The entire check chain is run by plaintext HTTP, which is the basis for the later self-rescue tactics.

There are three types of false alarms, and I've encountered each

one

. False alarm one: the probe can't reach it, but the net is fine. Google probe is stuck, phones get exclamation marks, but WeChat is flooding with messages. This is the same logic as "ping is ineffective but not delaying internet access": the probe only represents the probe's path, not the entire network. The most typical gray-market tablet I've seen is that even the WiFi at home has been exclamation mark for years. After using it for half a year, the owner realized it wasn't about the internet—except for that icon, everything else was fine.

False alarm 2: probe hijacked, repeatedly popping 'login required.' DNS is preemptively answered, or the portal gateway sends the probe's request 302 to your own ad page. The phone sees a redirect, confirms you want authentication, but the login page closes and pops up again. Interpreting this path is usually tricked by DNS, I've written about troubleshooting telecom side evasion responses, and the approach is similar.

False alarm 3: The phone had data enabled, but the verification page wouldn't pop up no matter what. I wrote about this pitfall in the university dorm article: Cellular first, the probe goes out from 4G with 100% success, but the system thinks the network is fine, so it won't pop up the WiFi login page. Before connecting to mall or hotel WiFi, I turned off the data first.

There is also a corresponding version at home: optical modem with overdue bills and internet shutdown, or the entire broadband line is cut off, but the router works fine, the phone still exclaims — the fault lies upstream, It has nothing to do with WiFi at all.

The

router's backend says 'External network connected' is the same trick

.

Interestingly, the router checks whether its WAN port is open or not, and its logic is exactly the same as a phone probe: it sends out to detect, and only when it does, does it show 'Connected, internet accessible' in the background. So if the phone is marked with an exclamation mark but the router says the external network is normal, the problem lies in the section from the router to the phone; Reports were cut off on both sides, so they directly investigated upstream.

Combined with status page WAN port IP three-layer interpretation, the fault segment can be locked in two minutes without random reboots.

Three tips for self-rescue when encountering false positives

:

If the authentication page doesn't pop up, manually enter a URL starting with http in your browser; any old site will do. Don't use HTTPS to hijack encrypted traffic. lock can't stop you, so the login page won't pop up. If stopped, it will automatically redirect to the authentication page; If you find choosing a website too troublesome, you can just type captive.apple.com directly.

Hanging an exclamation mark, but the internet seems good: try opening a webpage first; if it really works, ignore the exclamation mark, it only represents the probe's path. Repeatedly popping up 'login required': Check if DNS has been changed or rushed to answer. If it's worth it, switch to encrypted DNS. Buzzer isn't effective for encrypted traffic.

What should ? The , repeatedly
you do first when the phone prompts the real meaning
Can't get online (exclamation mark).probe hasn't gotten 204. Open a webpage first, ignore it if it works; Can't use upstream search.
Requires login/authentication probes blocked by 302 traffic restrictions. Browser taps HTTP to trigger login page
pops login page probes, keeps hijacking, DNS search is changed, answers are rushed. Consider encrypted DNS

Finally, here's the order: when you see the exclamation mark, open the webpage for verification, then manually trigger the authentication page, and finally it's your turn to check DNS and upstream. The phrase "can't access the internet" on your phone can be heard as a transcription of a probe from today on—it may not be the truth, but three types of replies correspond to three diseases, just follow the chart to get the medicine. Explaining this to the elders at home also helps: putting in an exclamation mark doesn't mean you owe bills, and it doesn't mean your router is broken. Just open a browser and open a webpage, saving you ten seconds from climbing a weak current box.

Read More


Copyright Notice Scan to read on mobile
All Rights Reserved: 《SHUNOT》 => 《Phones detect WiFi by secretly accessing probe URLs, tested by Apple, Xiaomi, Huawei》
Article URL: https://www.shunot.com/en/lybk/1215.html
Unless otherwise stated, all articles are original by 《SHUNOT》. Reposting is welcome! Please indicate the original URL when reposting, thank you.

Contact Us

Online Consultation: Click here to send me a message

WeChat ID: master_135

Scan to follow