Windows配置加密DNS
🏐

Windows配置加密DNS

Tags
DNS
Windows
DOH

Dnscrypt-proxy

下载DNSscrypt-proxy 最新版
解压到本地
notion image
进入文件目录,并在cmd中打开
copy example-dnscrypt-proxy.toml dnscrypt-proxy.toml
编辑dnscrypt-proxy.toml文件:
找到listen_addresses ,同时监听ipv4和ipv6
notion image
timeout 的参数改为 10000,注释掉source下的所有没被注释的内容
notion image
滑到最底下,设置你的DNS server
notion image
此处只支持DNS Stamp,你可以通过下面的链接生成一个DNS stamp
配置完成后,在Dnscrypt-proxy的目录下,运行
dnscrypt-proxy
无报错即成功运行
notion image
重新打开一个cmd,输入以下命令检验DNS服务器是否设置成功
nslookup baidu.com 127.0.0.1
notion image
接下来,将Dnscrypt-proxy注册为系统服务。管理员身份打开CMD,进入Dnscrypt-proxy可执行文件所在目录。
dnscrypt-proxy -service install
启动服务
dnscrypt-proxy -service start
notion image
打开Windows的适配器选项,将链接WIFI的网卡的IPv4 DNS服务器改为127.0.0.1IPv6的DNS服务器改为[::1] 直接关掉ipv6
notion image
notion image
刷新DNS缓存
ipconfig /flushdns
此时加密DNS已经生效了,重启之后也会自动生效。
 
如果需要卸载,管理员身份打开 CMD ,进入 Dnscrypt-proxy 可执行文件所在目录。
dnscrypt-proxy -service uninstall