- Add DnsListener that binds UDP and TCP on configurable port - Add [dns] config section with listen address (default 0.0.0.0:5353) - DNS over TCP uses 2-byte length prefix (RFC 1035 §4.2.2) - Forward queries through existing DoH pipeline - Start DNS listener as background task alongside DoH server
18 lines
319 B
TOML
18 lines
319 B
TOML
[server]
|
|
listen = "0.0.0.0:8800"
|
|
|
|
[dns]
|
|
listen = "0.0.0.0:5353"
|
|
|
|
[upstream]
|
|
resolvers = [
|
|
{ name = "cloudflare", url = "https://cloudflare-dns.com/dns-query" },
|
|
{ name = "google", url = "https://dns.google/dns-query" },
|
|
]
|
|
strategy = "round-robin"
|
|
|
|
[cache]
|
|
enabled = true
|
|
max_entries = 10000
|
|
max_ttl_secs = 3600
|