feat: implement M3 — UDP/TCP DNS listener

- 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
This commit is contained in:
2026-07-06 17:57:04 +03:30
parent 72198bb868
commit a9584ab940
5 changed files with 241 additions and 2 deletions

View File

@@ -1,6 +1,9 @@
[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" },