Windows is quite adept at telling you if you have a properly functioning Internet connection, but how exactly does it do so? Digging into how Windows handles the problem offers insight into Windows connectivity messages.
今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,它是一個由Q&a網站組成的社群驅動分組。
超級使用者讀者N.Hinkle提出了以下有關Windows internet檢查和身份驗證過程的問題:
In Windows 7, the notification area networking icon will show an error indicator if there is no internet access , and the error icon goes away once there is a successful connection to the internet . Sometimes, if the WiFi connection requires an in-browser authentication step, like on many guest networks in hotels or universities, then the following pop-up bubble appears, saying as much:
How does Windows know whether or not it has a successful internet connection?
Presumably it is checking some online Microsoft service to see whether it has a successful connection, gets redirected to some other page, or doesn’t get any resp***e at all, but I haven’t seen anywhere that this process or the services used are documented. Can anybody explain how this works?
在使用現代作業系統時,這樣的檢查是我們認為理所當然的事情之一,但即使是使用者體驗中最理所當然的元素也有其內在機制。Windows如何告訴我們是否有internet連線以及是否需要登入Wi-Fi驗證門戶?
超級使用者貢獻者Tobias Plutat提供了對流程的一些見解:
After some digging (the sheer number of network and Internet related services in Windows is astonishing), I think I found it. Windows Vista and 7 have a variety of Network Awareness features, one of which is the Network Connectivity Status Indicator that performs connectivity tests that in turn are used by the network systray icon. The test for internet connectivity is simple:
The mechani** also checks whether the domain the document is hosted on resolves to the expected IP address. So, it might also assume proper internet access if this test is successful but the document can’t be retrieved.
The reason it reports “No Internet Access” when you haven’t authenticated on a Hotspot yet lies in the way a Hotspot works. It blocks all ports besides 80 and 443 (for HTTP and HTTPS, respectively), which get redirected to the Hotspot’s authentication server and might mess with DNS requests in one way or another. Thus, NCSI can neither resolve the domain its test file is hosted on, and even if it could it wouldn’t reach the actual file because HTTP traffic is redirected to the Authentication server.
另一位撰稿人Jeff Atwood強調了Tobias參考文獻中的一些關鍵引用:
Here are the details of the connection status determination process:
The following list describes how NCSI might communicate with a Web site to determine whether a network has Internet connectivity:
This can be disabled with a registry setting. If you set:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ NlaSvc\Parameters\Internet\EnableActiveProbing
to 0, Windows will no longer probe for internet connectivity.
Apple does something very similar in iOS to detect internet connectivity and possible hotel “login” wifi pages, etc.
雖然整個過程對終端使用者通常是100%透明的,但偶爾在透過Wi-Fi熱點的web門戶進行身份驗證之後,您會發現自己盯著NSCSI.txt檔案. 你最終是如何看到一個不起眼的文字文件而不是你試圖載入的網頁,再加上之前關於這個主題的答案,這已經不再是一個謎了。
有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。
... 但是你的Outlook帳戶如此重要還有另一個原因。Windows 10允許您使用Microsoft帳戶登入PC。如果你使用這個功能,有人竊取你的帳戶密碼,你可能會有**煩。 ...
... 你如何保護你的iPhone?你知道我們沒有提到的其他方法嗎?請在評論中告訴我們您的經驗和建議。 ...
...軟推出的雲端儲存服務。正如您所料,它被緊密地嵌入到windows10和其他微軟服務中。如果你深入微軟的生態系統,使用它是一個不需要大腦的。它透過基於軟體和基於SMS的令牌支援2FA。 ...
... Steam只允許2FA透過其移動應用程式。為Android、iOS或Windows Phone下載並使用您的帳戶登入。接下來,輕觸左側滑出選單並選擇Steam Guard。該應用程式將引導您透過新增一個電話號碼來驗證您的簡訊帳戶。 ...
...,也適用於智慧**等裝置。例如,Opera已經將其VPN服務從Windows和Mac擴充套件到Android**,或者您可以在Chrome上使用外掛。如果你的大部分私人業務都是在智慧**上進行的,請檢視這些Android應用程式或iPhone或iPad的VPN服務。 ...
... 如果您使用的是Windows,那麼在開始之前還需要為Windows安裝PuTTY或其他SSH客戶機。 ...
...場。iOS和Android的Facebook應用程式中提供了程式碼生成器。Windows商店應用程式模仿Facebook網站,不包含程式碼生成器。 ...
...入或驗證。然後選擇要使用的方法,從電子郵件和電話到Windows Hello和Microsoft authenticator應用程式。 ...
...的裝置可能會受到網路上其他裝置的攻擊。這就是為什麼Windows個人電腦預設啟用防火牆的原因,也是為什麼當你告訴Windows你連線的是公共Wi-Fi而不是私人Wi-Fi網路時,防火牆的限制性更大的原因。如果您告訴計算機您已連線到專...