Win11实现了系统级别的DoH,不过只有配置了DoH模版的DNS服务器才能使用,国内的DNS服务器没配置模版,需要手工添加模版。
通过cmd、powerehell(管理员)执行命令查看、添加DoH模版
cmd
查看DoH模版:
netsh dns show encryption
cmd添加DoH模版:
:: 添加阿里DNS
netsh dns add encryption 223.5.5.5 https://dns.alidns.com/dns-query no no
netsh dns add encryption 223.6.6.6 https://dns.alidns.com/dns-query no no
:: 添加DNSPod
netsh dns add encryption 120.53.53.53 https://doh.pub/dns-query no no
cmd删除DoH模版:
:: 删除阿里DNS
netsh dns delete encryption 223.5.5.5
netsh dns delete encryption 223.6.6.6
:: 删除DNSPod
netsh dns delete encryption 120.53.53.53
cmdpowershell
查看DoH模版:
Get-DnsClientDohServerAddress
PowerShell添加DoH模版:
# 添加阿里DNS
Add-DnsClientDohServerAddress 223.5.5.5 https://dns.alidns.com/dns-query $False $False
Add-DnsClientDohServerAddress 223.6.6.6 https://dns.alidns.com/dns-query $False $False
# 添加DNSPod
Add-DnsClientDohServerAddress 120.53.53.53 https://doh.pub/dns-query $False $False
PowerShell删除DoH模版:
# 删除阿里DNS
Remove-DnsClientDohServerAddress 223.5.5.5
Remove-DnsClientDohServerAddress 223.6.6.6
# 删除DNSPod
Remove-DnsClientDohServerAddress 120.53.53.53
PowerShell