vault backup: 2024-03-12 23:42:49

This commit is contained in:
2024-03-12 23:42:49 +08:00
parent ddb50bf2f1
commit 8d4714eac2

View File

@@ -2,8 +2,9 @@
aliases:
atlas: "[[Atlas/Card|Card]]"
created: 2024-03-12 02:26:18
modified: 2024-03-12 22:58:34
tags:
modified: 2024-03-12 23:36:53
tags:
- DNS
title: 自建 DoH 服务器
---
为了在网上冲浪时 DNS 不被污染,自建一个干净的 DoH 服务器很有必要,考虑到 DNS 查询的响应时间,我选择在一台位于香港且经过多线 BGP 优化的服务器上部署
@@ -96,7 +97,7 @@ DNSStubListener=no
## 自定义过滤规则
`@@||ad.kfdr.top^$important`
`@@||ad.域名^$important`
# 反向代理
@@ -104,7 +105,7 @@ DNSStubListener=no
```
location /任意字符 {
proxy_pass https://206.237.23.144:444/dns-query;
proxy_pass https://服务器IP:444/dns-query;
proxy_set_header Host $http_host;
proxy_redirect http:// https://;
proxy_set_header X-Forwarded-Host $http_host;
@@ -117,4 +118,6 @@ location /任意字符 {
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
}
```
```
然后就可以在软路由中通过 `域名/任意字符` 的网址进行 DNS 查询了