Skip to main content

Module qdp_resolver

Module qdp_resolver 

Source
Expand description

QDP front-door resolver over DNS-over-HTTPS (DoH) — QDP §3.6.

The front-door anchor for a domain is a DNS TXT record at _qdp.<domain> (see crate::front_door). Rather than depend on the host’s stub resolver (which often cannot return TXT, and leaks the lookup to the local network), we resolve it over DoH against a public resolver that speaks the JSON DoH format (Cloudflare / Google, RFC 8484 + the JSON profile). The wire format is a small JSON document with an "Answer" array; each answer’s "data" field is the (possibly quote-wrapped, possibly split) TXT string.

Two pieces:

No private keys are ever fetched (QDP §5) — the front-door TXT carries only the Front Door DID and public peering material.

Functions§

parse_doh_txt_answers
PURE. From a Cloudflare/Google DoH JSON response, read the "Answer" array and concatenate the "data" field of every answer into one string.
resolve_front_door
Resolve a domain’s QDP front-door record via DoH (Cloudflare), host targets only.