Skip to content

Commit

Permalink
modules.dns.china: use DoH
Browse files Browse the repository at this point in the history
  • Loading branch information
1sixth committed Aug 30, 2024
1 parent 129b499 commit ecb9467
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions modules/dns/china.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ ... }:

let
DNS = [
Bootstrap = map (x: x + " -bootstrap-dns") [
# 阿里 DNS
"2400:3200::1"
"2400:3200:baba::1"
Expand All @@ -18,6 +18,11 @@ let
"114.114.114.114"
"114.114.115.115"
];

DoH = [
"https://dns.alidns.com/dns-query"
"https://doh.pub/dns-query"
];
in

{
Expand All @@ -34,9 +39,11 @@ in
enable = true;
settings = {
bind = "127.0.0.1:53";
dualstack-ip-selection = true;
log-syslog = true;
prefetch-domain = true;
server = DNS;
server = Bootstrap;
server-https = DoH;
speed-check-mode = "ping";
};
};
Expand Down

0 comments on commit ecb9467

Please sign in to comment.