xnix:nginx_doh_proxy
差别
这里会显示出您选择的修订版和当前版本之间的差别。
后一修订版 | 前一修订版 | ||
xnix:nginx_doh_proxy [2024/05/10 01:51] – 创建 Hshh | xnix:nginx_doh_proxy [2024/08/15 16:59] (当前版本) – 错别字 Hshh | ||
---|---|---|---|
行 8: | 行 8: | ||
* grpc_pass 不支持指定远端 URI, 如果两端 URI 不一致, 要用 rewrite. | * grpc_pass 不支持指定远端 URI, 如果两端 URI 不一致, 要用 rewrite. | ||
* 用 upstream 时, grpc_pass / proxy_pass 的 Host 头发送有问题, | * 用 upstream 时, grpc_pass / proxy_pass 的 Host 头发送有问题, | ||
- | * nginx 不能直接记录 request body, 所以解包 DoH 的查询域名, | + | * nginx 不能直接记录 request body, 所以解包 DoH 的查询域名, |
===== nginx.conf 配置 ===== | ===== nginx.conf 配置 ===== | ||
行 36: | 行 36: | ||
# grpcs 代表远端是 ssl 连接, 如果不是, | # grpcs 代表远端是 ssl 连接, 如果不是, | ||
grpc_pass grpcs:// | grpc_pass grpcs:// | ||
- | # 用 upstream 时, http 头种的 Host 会有问题, | + | # 用 upstream 时, http 头中的 Host 会有问题, |
# 同样, 有些服务器商需要指定 SNI, 则需要设置 grpc_ssl_name 和 grpc_ssl_server_name. 详情参看 nginx 文档. | # 同样, 有些服务器商需要指定 SNI, 则需要设置 grpc_ssl_name 和 grpc_ssl_server_name. 详情参看 nginx 文档. | ||
grpc_set_header Host cloudflare-dns.com; | grpc_set_header Host cloudflare-dns.com; | ||
行 53: | 行 53: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | {{tag> |
xnix/nginx_doh_proxy.1715277067.txt.gz · 最后更改: 2024/05/10 01:51 由 Hshh