AdguardTeam / dnsproxy

Simple DNS proxy with DoH, DoT, DoQ and DNSCrypt support
Apache License 2.0
2.44k stars 247 forks source link

Some questions about the bootstrap-logic and resolving upstream-servers #319

Closed iJorgen closed 1 year ago

iJorgen commented 1 year ago
  1. When resolving the upstream-servers often two IP's are returned, like when resolving adguard-dns.com I get 172.67.147.178 and 104.21.95.199. Does DNSProxy store and use both of these as fail-over or just pick one of them and switching to fallback-servers if that single IP-address fails?

  2. Does the bootstrap-process respect if "edns-addr" is specified when resolving the upstream servers to get the best servers geographically or does "edns-addr" only apply to upstream-servers?

  3. Does DNSProxy query all bootstrap-servers at once (like the 'all-servers' flag) and picks the fastest answer or use them in order one by one?

  4. How often are the upstream-servers refreshed? Does DNSProxy respect the TTL returned or some other logic in code triggers it?

ameshkov commented 1 year ago
  1. It uses them all in parallel and uses the first received response.
  2. It only relies on A/AAAA records.
  3. Yes, it queries all bootstrap servers.
  4. Never refreshed.