Windows 10 WIFI静态互联网连接状态

Windows 10 WIFI静态互联网连接状态

我一直在寻找办法让 Windows 10 认为我的 WIFI 始终可以连接互联网

但是我尝试过的所有方法(我在 superuser.com 上找到了几个)都没有用,我甚至尝试过/ncsi.txt/connecttest.txt本地主机上使用 WAMP 和主机文件进行托管www.msftncsi.com并重定向www.msftconnecttest.com到 127.0.0.1

所以我想知道我该怎么做,无论我的 WIFI 是否有互联网连接,Windows 10 都会显示我已连接互联网

答案1

经过一系列测试后,我发现它是这样工作的

  1. 在 WAMP 中添加虚拟主机并将其指向 192.168.1.2 托管/ncsi.txt/connecttest.txt
  2. 运行 DNSCrypt 监听 127.0.0.100 的 DNS
  3. 修改 host 文件为
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.

127.0.0.1 localhost
::1 localhost

127.0.0.100 131.107.255.255
127.0.0.100 dns.msftncsi.com
192.168.1.2 www.msftncsi.com
192.168.1.2 www.msftonnecttest.com
192.168.1.2 msftncsi.com
192.168.1.2 msftonnecttest.com
192.168.1.2 ipv6.msftconnecttest.com
  1. 除了 DNSCrypt 的主机文件之外,还添加了隐藏规则
################################
#        Cloaking rules        #
################################

localhost                127.0.0.1
localhost                ::1

131.107.255.255                127.0.0.100
dns.msftncsi.com                127.0.0.100
www.msftncsi.com                192.168.1.2
www.msftonnecttest.com                192.168.1.2
msftncsi.com                192.168.1.2
msftonnecttest.com                192.168.1.2
ipv6.msftconnecttest.com                192.168.1.2
  1. 注册表更改
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet]
"ActiveDnsProbeContent"="127.0.0.100"
"EnableActiveProbing"=dword:00000000

相关内容