Skip to main content

resolve_front_door

Function resolve_front_door 

Source
pub fn resolve_front_door(domain: &str) -> Result<FrontDoorRecord, String>
Expand description

Resolve a domain’s QDP front-door record via DoH (Cloudflare), host targets only.

Builds the query name with dns_record_name (_qdp.<domain>), performs a blocking HTTPS GET https://cloudflare-dns.com/dns-query?name=<name>&type=TXT with the accept: application/dns-json header (8 s timeout), parses the JSON body, joins the TXT answers via parse_doh_txt_answers, and decodes them with FrontDoorRecord::from_dns_txt. All errors are mapped to String.