Xeн*_*вϵς 2 networking windows vpn windows-10
我知道这个问题已经被问过很多次了,但我还没有找到任何真正解决这个问题的方法。
我使用VPN访问国际互联网,信息自由是一项基本人权,不幸的是我住在中国,所以我必须使用VPN来行使这项权利。
现在,尽管我可以正常访问任何被阻止的网站(例如www.google.com),但现在在连接 VPN 时,Windows 10 错误地报告“无互联网”。过去当 VPN 处于活动状态时,Windows 会正确报告“Internet 访问”,但不知何故现在却没有。
您可能认为这没什么大不了的,但我的 ISP 不断尝试断开我的 VPN,有时会成功,而网络连接状态指示器无法告诉我何时真正断开连接。
我当然用谷歌搜索了这个,一些结果建议进行以下注册表编辑并重新启动路由器:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet]
"ActiveDnsProbeContent"="8.8.8.8"
"ActiveDnsProbeContentV6"="2001:4860:4860::8844"
"ActiveDnsProbeHost"="dns.google"
"ActiveDnsProbeHostV6"="dns.google"
"ActiveWebProbeContent"="success"
"ActiveWebProbeContentV6"="success"
"ActiveWebProbeHost"="detectportal.firefox.com"
"ActiveWebProbeHostV6"="detectportal.firefox.com"
"ActiveWebProbePath"="success.txt"
"ActiveWebProbePathV6"="success.txt"
"CaptivePortalTimer"=dword:00000000
"CaptivePortalTimerBackOffIncrementsInSeconds"=dword:00000005
"CaptivePortalTimerMaxInSeconds"=dword:0000001e
"EnableActiveProbing"=dword:00000001
"PassivePollPeriod"=dword:0000000f
"StaleThreshold"=dword:0000001e
"WebTimeout"=dword:00000023
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\ManualProxies]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityStatusIndicator]
@=""
Run Code Online (Sandbox Code Playgroud)
我尝试了一下,但没有成功。
我可以很好地 ping 测试中使用的服务器:
PS C:\Users\Xeni> ping detectportal.firefox.com
Pinging prod.detectportal.prod.cloudops.mozgcp.net [34.107.221.82] with 32 bytes of data:
Reply from 34.107.221.82: bytes=32 time=203ms TTL=120
Reply from 34.107.221.82: bytes=32 time=203ms TTL=120
Reply from 34.107.221.82: bytes=32 time=203ms TTL=120
Reply from 34.107.221.82: bytes=32 time=204ms TTL=120
Ping statistics for 34.107.221.82:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 203ms, Maximum = 204ms, Average = 203ms
PS C:\Users\Xeni> ping 8.8.8.8
Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=203ms TTL=120
Reply from 8.8.8.8: bytes=32 time=203ms TTL=120
Reply from 8.8.8.8: bytes=32 time=203ms TTL=120
Reply from 8.8.8.8: bytes=32 time=200ms TTL=120
Ping statistics for 8.8.8.8:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 200ms, Maximum = 203ms, Average = 202ms
Run Code Online (Sandbox Code Playgroud)
我已禁用并重新启用网络适配器...
什么都不起作用。
但是我知道如果我断开 VPN,NCSI 将立即正确报告我可以访问互联网,我已经成功地重现了很多次而没有失败,但当然这不是解决方案,原因很明显。
我的设置 -> 网络和 Internet -> 状态 -> 网络状态 说:
不能访问网络
您的设备已连接,但您可能无法访问
网络上的任何东西。如果您的数据计划有限,您可以
使该网络成为按流量计费的连接或更改其他网络
特性。
我该如何解决这个问题?
PS 这些细节无关紧要,但我会在这里添加它们,以防有人提到它们:
我的操作系统是Windows 10 Pro 22H2 x64,并且我使用有线以太网连接,但它们对问题影响不大;不,dism /online /cleanup-image /restorehealth
绝对sfc scannow
不能解决这个问题,所以不重新安装操作系统;我之前已经使用 Snappy Driver Installer 更新了网络驱动程序,并且重新启动了计算机...
Windows 网络连接状态指示器 (ncsi) 至少执行 DNS 和 HTTP 测试。您通常可以自己测试这些,看看哪一个失败了。默认情况下,它检查:
nslookup dns.msftncsi.com
对于 DNS(应解析为131.107.255.255
)Microsoft Connect Test
如果 DNS 失败,您可以通过编辑主机文件强制其成功
也就是说,我相信它依赖于您更改的注册表设置。当您遇到问题时,您可能需要将它们重置为默认值或验证它们是否为上述测试提供了正确的响应。
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet]
"ActiveDnsProbeContent"="131.107.255.255"
"ActiveDnsProbeContentV6"="fd3e:4f5a:5b81::1"
"ActiveDnsProbeHost"="dns.msftncsi.com"
"ActiveDnsProbeHostV6"="dns.msftncsi.com"
"ActiveWebProbeContent"="Microsoft Connect Test"
"ActiveWebProbeContentV6"="Microsoft Connect Test"
"ActiveWebProbeHost"="www.msftconnecttest.com"
"ActiveWebProbeHostV6"="ipv6.msftconnecttest.com"
"ActiveWebProbePath"="connecttest.txt"
"ActiveWebProbePathV6"="connecttest.txt"
"CaptivePortalTimer"=dword:00000000
"CaptivePortalTimerBackOffIncrementsInSeconds"=dword:00000005
"CaptivePortalTimerMaxInSeconds"=dword:0000001e
"EnableActiveProbing"=dword:00000001
"PassivePollPeriod"=dword:0000000f
"StaleThreshold"=dword:0000001e
"WebTimeout"=dword:00000023
Run Code Online (Sandbox Code Playgroud)
如果您的 VPN 涉及 Web 代理,则 ncsi 会尝试自动检测您的代理设置。如果失败,您可以尝试通过手动设置 winHTTP 代理设置来帮助 ncsi:
netsh winhttp set proxy [proxy-server=]<server name> [bypass-list=]<hosts list>
Run Code Online (Sandbox Code Playgroud)