win10加入非白名单doh

2021-11-03
1分钟阅读时长

windows 10只支持部分dns地址开启加密dns(doh),国内若要加入其他加密dns须加入白名单

使用方法

powershell(管理员)下输入,有什么微调的自己修改就行了

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters\DohWellKnownServers
Set-DNSClientServerAddress

Add-DnsClientDohServerAddress -ServerAddress '94.140.14.14' -DohTemplate 'https://dns.adguard.com/dns-query' -AllowFallbackToUdp $False -AutoUpgrade $True
Add-DnsClientDohServerAddress -ServerAddress '94.140.15.15' -DohTemplate 'https://dns.adguard.com/dns-query' -AllowFallbackToUdp $False -AutoUpgrade $True
Add-DnsClientDohServerAddress -ServerAddress '2a10:50c0::ad1:ff' -DohTemplate 'https://dns.adguard.com/dns-query' -AllowFallbackToUdp $False -AutoUpgrade $True
Add-DnsClientDohServerAddress -ServerAddress '2a10:50c0::ad2:ff' -DohTemplate 'https://dns.adguard.com/dns-query' -AllowFallbackToUdp $False -AutoUpgrade $True

Add-DnsClientDohServerAddress -ServerAddress '119.29.29.29' -DohTemplate 'https://doh.pub/dns-query' -AllowFallbackToUdp $False -AutoUpgrade $True
Add-DnsClientDohServerAddress -ServerAddress '2402:4e00::' -DohTemplate 'https://doh.pub/dns-query' -AllowFallbackToUdp $False -AutoUpgrade $True

Add-DnsClientDohServerAddress -ServerAddress '223.5.5.5' -DohTemplate 'https://dns.alidns.com/dns-query' -AllowFallbackToUdp $False -AutoUpgrade $True
Add-DnsClientDohServerAddress -ServerAddress '223.6.6.6' -DohTemplate 'https://dns.alidns.com/dns-query' -AllowFallbackToUdp $False -AutoUpgrade $True
Add-DnsClientDohServerAddress -ServerAddress '2400:3200::1' -DohTemplate 'https://dns.alidns.com/dns-query' -AllowFallbackToUdp $False -AutoUpgrade $True
Add-DnsClientDohServerAddress -ServerAddress '2400:3200:baba::1' -DohTemplate 'https://dns.alidns.com/dns-query' -AllowFallbackToUdp $False -AutoUpgrade $True

参考文档

依照的官方参考文档,全英文

https://docs.microsoft.com/zh-cn/windows-server/networking/dns/doh-client-support

https://docs.microsoft.com/en-us/windows-server/networking/dns/doh-client-support#configure-the-dns-client-to-support-doh