我从 repo 安装了 dnscrypt-proxy。我没有修改任何配置。以下是错误消息
$ systemctl status dnscrypt-proxy.service
● dnscrypt-proxy.service - DNSCrypt client proxy
Loaded: loaded (/lib/systemd/system/dnscrypt-proxy.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since ; 10s ago
Docs: man:dnscrypt-proxy(8)
Process: 20935 ExecStart=/usr/sbin/dnscrypt-proxy /etc/dnscrypt-proxy/dnscrypt-proxy.conf (code=exited, status=1/FAILURE)
Main PID: 20935 (code=exited, status=1/FAILURE)
systemd[1]: dnscrypt-proxy.service: Unit entered failed state.
systemd[1]: dnscrypt-proxy.service: Failed with result 'exit-code'.
systemd[1]: dnscrypt-proxy.service: Service hold-off time over, scheduling restart.
systemd[1]: Stopped DNSCrypt client proxy.
systemd[1]: dnscrypt-proxy.service: Start request repeated too quickly.
systemd[1]: Failed to start DNSCrypt client proxy.
systemd[1]: dnscrypt-proxy.service: Unit entered failed state.
systemd[1]: dnscrypt-proxy.service: Failed with result 'exit-code'.
$ cat /lib/systemd/system/dnscrypt-proxy.service
[Unit]
Description=DNSCrypt client proxy
Documentation=man:dnscrypt-proxy(8)
Requires=dnscrypt-proxy.socket
After=network.target
Before=nss-lookup.target
[Install]
Also=dnscrypt-proxy.socket
WantedBy=multi-user.target
[Service]
Type=notify
NonBlocking=true
User=_dnscrypt-proxy
ExecStart=/usr/sbin/dnscrypt-proxy /etc/dnscrypt-proxy/dnscrypt-proxy.conf
Restart=always
ProtectSystem=strict
ProtectHome=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
MemoryDenyWriteExecute=true
RestrictRealtime=true
编辑:重新启动操作系统以某种方式解决了这个问题。
编辑:不行,再次重新启动后,问题又出现了。尝试了 systemctl restart 和 OS restart。
答案1
发现问题journalctl -xe
。我启用了BlockIPv6 yes
需要额外插件的选项。sudo apt install dnscrypt-proxy-plugins
解决了它。
答案2
您必须将 /etc/dnscrypt-proxy/dnscrypt-proxy.toml 中的“listen_addresses = []”留空,然后重新启动 dnscrypt-proxy。