由于某些特殊原因,大部分公共DoH服务在某些国家无法访问。
为了安全的获取DNS记录,必须自建DoH服务器。
下面直接列出核心代码,推荐使用谷歌DNS和openDNS
location /lookopen {
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_buffering off;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://doh.opendns.com/dns-query;
}
location /lookgg {
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_buffering off;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://dns.google/dns-query;
}
location /looksb {
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_buffering off;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://doh.dns.sb/dns-query;
}
location /lookiij {
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_buffering off;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://public.dns.iij.jp/dns-query;
}
location / {
return 444;
}

此处评论已关闭