Felix Schröter
096f641fa5
By default the system will already prefer IPv6 if possible without causing issues e.g. with NAT. I did indeed experience some issues with IPv6 requrests having a huge delay using Tailscale. The following article contains a detailed explanation about this issue: https://www.ietf.org/archive/id/draft-buraglio-6man-rfc6724-update-03.html
40 lines
1 KiB
Nix
40 lines
1 KiB
Nix
{ lib, ... }:
|
|
|
|
{
|
|
networking.nameservers = [ "127.0.0.1" "::1" ];
|
|
|
|
services.resolved = {
|
|
enable = true;
|
|
# don't use fallback resolvers
|
|
fallbackDns = [ "127.0.0.1" "::1" ];
|
|
};
|
|
|
|
services.dnscrypt-proxy2 = {
|
|
enable = true;
|
|
settings = {
|
|
listen_addresses = [ "127.0.0.1:53" "[::1]:53" ];
|
|
|
|
ipv6_servers = true;
|
|
require_nolog = true;
|
|
require_dnssec = true;
|
|
http3 = true;
|
|
|
|
sources.public-resolvers = {
|
|
urls = [
|
|
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
|
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
|
];
|
|
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
|
minisign_key =
|
|
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
|
};
|
|
|
|
server_names = [ "mullvad-doh" "controld-unfiltered" ];
|
|
};
|
|
};
|
|
|
|
systemd.services.dnscrypt-proxy2.serviceConfig = {
|
|
StateDirectory = lib.mkForce "dnscrypt-proxy2";
|
|
};
|
|
}
|