Skip to content

DNS over HTTPS ​

A doh DNS server posts each query as application/dns-message over HTTP/1.1 inside TLS (RFC 8484). HTTP/2 is not spoken, so tls gets "alpn": ["http/1.1"] unless you write one. Port 443 by default.

Structure ​

json
{
  "tag": "google",
  "type": "doh",
  "settings": { "server": "8.8.8.8", "host": "dns.google", "path": "/dns-query" },
  "tls": { "server_name": "dns.google" },
  "outbound": "proxy"
}

Fields ​

settings.server ​

stringRequired

An IP or hostname with an optional port: "8.8.8.8", "dns.google", "[2001:4860:4860::8888]".

settings.path ​

stringDefault: /dns-query

The request path. It must be absolute.

settings.host ​

stringDefault: the server's host

The Host header. Set it when server is an IP.

settings.timeout ​

durationDefault: 5s

How long one query may take, including reaching the server.

tls ​

object

tls transport settings for the TLS to the DNS server.

The common fields (tag, outbound, ip_versions, dns_server) are on DNS server.