一次我走到了弱網環境中,意外地發現瀏覽器打開了 http://www.msftconnecttest.com/redirect 網址,隨後右下角的網絡圖標出現了一枚“感嘆號”。
吹水的推斷
從直觀看來,這個網址的連通性和網絡圖標上的“感嘆號”有着直接的聯繫。那麼到底有沒有聯繫呢?於是去知乎上看看,發現了專業造輪子拉黑搶前排的輪子哥的回覆。
vczh 專業造輪子,拉黑搶前排。http://gaclib.net
這個網站是windows用來測試你有沒有連上網的(
編輯於 2017-05-15
而輪子哥是誰呢?Microsoft Office 團隊的開發人員,所以對微軟產品的一些技術性描述還是有些可信的(雖然吹水佔了多數)。輪子哥不要怪我啊(逃
不過,吹水歸吹水,還是需要更多地瞭解下這個網址。
官方的依據
這個網址用於檢測網絡連接狀態,並以圖標形式展示給用戶。而這個圖標稱之爲“網絡連接狀態圖標”(Connection Status Icon,NCSI)。
自 Windows 8 開始,不同版本的 Windows 操作系統有不同的檢測網絡連接狀態的 url,但都是通過 url 來檢測的。
- Windows 10.0.15063 (1703) 至 10.0.07134 (1803)
- Windows 10.0.14393 (1607)
- Windows 8/8.1 至 10.0.15063 (1511)
而 Windows XP/Vista/7 的檢測方式有些不同,但都是通過 Network Location Awareness (NLA) 方式來檢測的。
關於 Windows XP/Vista/7 的檢測方式,可以閱讀:Network Location Awareness (NLA) and how it relates to Windows Firewall Profiles - Networking Blog。
侷限性
- 如果計算機上有多張網絡適配器可以工作,但只有一個探測到連通狀態,那麼圖標上依然會有一個感嘆號,即探測爲“網絡受限”。
參考資料
- 開機總是有一個彈窗 http://www.msftconnecttest.com/redirect ? - 知乎
- The Network Connection Status Icon - Networking Blog
- Network Location Awareness (NLA) and how it relates to Windows Firewall Profiles - Networking Blog
- The Windows Network Connection Status Icon (NCSI) - markwilson.it
- What must be unblocked for network icon to not say “no internet connection?” - Windows 10 - Spiceworks
- NLM_CONNECTIVITY enumeration (Windows)
- msftconnecttest.com - Microsoft Community
- http://www.msftconnecttest.com/redirect
- Appendix K: Network Connectivity Status Indicator and Resulting Internet Communication in Windows Vista - Microsoft Docs