windows如何确认wi-fi访问以及是否需要热点身份验证?

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,它是一个由Q&a网站组成的社区驱动分组。...

windows如何确认wi-fi访问以及是否需要热点身份验证?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 007Ys3FFgy1gpgfit29lpj300i00e05i. 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:

  1. NCSI tries to load a specific page via HTTP (more precisely: a text document) and tests whether it can be retrieved.
  2. If that is not successful, Windows reports “No Internet access”.

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:

  1. A request for DNS name resolution of dns.msftncsi.com
  2. A HTTP request for http://www.msftncsi.com/ncsi.txt returning 200 OK and the textMicrosoft NCSI

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用户那里了解更多答案吗?在这里查看完整的讨论主题。

  • 发表于 2021-04-12 03:47
  • 阅读 ( 209 )
  • 分类:互联网

你可能感兴趣的文章

如何为云备份服务启用双因素身份验证

...微软推出的云存储服务。正如您所料,它被紧密地嵌入到windows10和其他微软服务中。如果你深入微软的生态系统,使用它是一个不需要大脑的。它通过基于软件和基于SMS的令牌支持2FA。 ...

  • 发布于 2021-03-12 18:34
  • 阅读 ( 295 )

黑客利用公共wi-fi窃取你身份的5种方法

...,也适用于智能**等设备。例如,Opera已经将其VPN服务从Windows和Mac扩展到Android**,或者您可以在Chrome上使用插件。如果你的大部分私人业务都是在智能**上进行的,请查看这些Android应用程序或iPhone或iPad的VPN服务。 ...

  • 发布于 2021-03-17 07:07
  • 阅读 ( 228 )

如果无法访问代码生成器,如何登录facebook

...用场。iOS和Android的Facebook应用程序中提供了代码生成器。Windows商店应用程序模仿Facebook网站,不包含代码生成器。 ...

  • 发布于 2021-03-22 16:57
  • 阅读 ( 1126 )

如何在您的xbox帐户上启用2fa

...录或验证。然后选择要使用的方法,从电子邮件和电话到Windows Hello和Microsoft authenticator应用程序。 ...

  • 发布于 2021-03-29 04:17
  • 阅读 ( 271 )

现在是2020年。使用公共wi-fi仍然危险吗?

...的设备可能会受到网络上其他设备的攻击。这就是为什么Windows个人电脑默认启用防火墙的原因,也是为什么当你告诉Windows你连接的是公共Wi-Fi而不是私人Wi-Fi网络时,防火墙的限制性更大的原因。如果您告诉计算机您已连接到专...

  • 发布于 2021-04-02 16:56
  • 阅读 ( 194 )

如何对office 365订阅的所有用户实施多因素身份验证

...look应用程序除外) Office 2010、Office for Mac 2011或更早版本 Windows软件包(照片库、影音**、邮件) Zune桌面应用程序 Xbox 360游戏机 Windows Phone 8或更早版本 下次你尝试打开这些应用程序时,他们会询问你的密码,所以请从这里复制...

  • 发布于 2021-04-03 16:55
  • 阅读 ( 189 )

谷歌chrome为什么说网站“不安全”?

...谷歌搜索结果中进行推广。 谷歌的透明报告显示,75%的Windows浏览器网站现在都在使用HTTPS。现在是时候打开开关,开始警告HTTP网站的用户了。 什么都没有改变HTTP仍然有它一直存在的问题。但已经有足够多的网站转向了HTTPS,现...

  • 发布于 2021-04-05 05:02
  • 阅读 ( 190 )

什么是wi-fi热点(它们是否安全使用)?

...出了一些可靠的建议。 标记网络公共:如果您使用的是Windows,它应该在首次连接网络时询问您网络是公共还是私有。Windows根据连接到的网络类型更改一些重要的安全设置。 使用HTTPS:访问使用HTTPS加密信息的站点(超文本传输...

  • 发布于 2021-04-06 13:13
  • 阅读 ( 210 )

如何锁定teamviewer以实现更安全的远程访问

...运行应用程序并选择“基本”安装(以防止TeamViewer作为Windows服务安装),然后运行TeamViewer并使用新密码登录应用程序。 登录后,系统会立即提示您输入双因素安全码中的安全码。引用验证器应用程序并立即输入。 为了更加安...

  • 发布于 2021-04-07 00:36
  • 阅读 ( 204 )

如何(以及为什么)在windows、linux和mac上更改mac地址

...脑上,无线和有线网络接口都有各自独特的MAC地址。 在windows中更改mac地址 大多数网卡允许您从设备管理器中的配置窗格中设置自定义MAC地址,尽管某些网络驱动程序可能不支持此功能。 首先,打开设备管理器。在Windows 8和10...

  • 发布于 2021-04-07 15:20
  • 阅读 ( 204 )

相关推荐