Skip to content

请问自建的 DoH 服务器在 Caddy 里怎么配置 #177

Answered by lxhao61
jaesony asked this question in Q&A
Discussion options

You must be logged in to vote

采用如下配置试试。

........
        "srvh3": {
          "listen": ["127.0.0.1:7443"],
          "listener_wrappers": [{
            "wrapper": "proxy_protocol",
            "allow": ["127.0.0.1/32"]
          },
          {
            "wrapper": "tls"
          }],
          "routes": [{
            "match": [{
              "path": ["/doh/*"]
            }],
            "handle": [{
              "handler": "reverse_proxy",
              "transport": {
                "protocol": "http",
                "tls": {}
              },
              "upstreams": [{
              	"dial": "127.0.0.1:8443"
              }],
              "rewrite": {
              	"uri": "/dns-query"
              },
…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lxhao61
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #169 on August 30, 2023 14:23.