UWP 应用无法与 dns 加密连接



我最近将我的笔记本电脑配置为使用dnscrypt代理使用dns crypt。配置文件如下

server_names = ['securedns', 'cloudflare', 'cloudflare-ipv6', 'securedns-ipv6', 'scaleway-fr', 'dnscrypt.nl-ns0', 'dnscrypt.nl-ns0-doh', 'dnscrypt.nl-ns0-ipv6' ]
listen_addresses = ['127.0.0.1:53', '[::1]:53']
# Use servers reachable over IPv4
ipv4_servers = true
# Use servers reachable over IPv6 -- Do not enable if you don't have IPv6 connectivity
ipv6_servers = true
# Use servers implementing the DNSCrypt protocol
dnscrypt_servers = true
# Use servers implementing the DNS-over-HTTPS protocol
doh_servers = true

## Require servers defined by remote sources to satisfy specific properties
# Server must support DNS security extensions (DNSSEC)
require_dnssec = true
# Server must not log user queries (declarative)
require_nolog = true
# Server must not enforce its own blacklist (for parental control, ads blocking...)
require_nofilter = true

我配置了WiFi适配器的DNS配置,以便将IPv4和IPv6服务器设置为localhost。这在"常规"应用程序中非常有效,除了UWP应用程序,如标准的天气和日历应用程序,这些应用程序无法连接到互联网。

如果我将DNS配置恢复到8.8.8.8/1.1.1.1,则UWP应用程序可以再次连接,将其更改回127.0.0.1将再次中断连接。

事实证明,UWP应用程序不能直接连接到localhost(或者只是它运行的机器(。因此,他们也无法联系运行在127.0.0.1的DNS服务器,查找失败(参考(。

使用AppContainerLoopback实用程序允许localhost访问,UWP应用程序现在也可以从DNS Crypt中受益。另一种解决方案是在外部设备(例如Raspberry PI(上运行dnscrypt代理。

最新更新