Expand description
DNS resolver configuration for internal lookups.
The resolver itself is the set combination of the cloudflare, and quad9 endpoints supporting DoH and DoT.
use nym_http_api_client::HickoryDnsResolver;
let resolver = HickoryDnsResolver::default();
resolver.resolve_str("example.com").await?;§Fallbacks
System Resolver – This resolver supports an optional fallback mechanism where, should the
DNS-over-TLS resolution fail, a followup resolution will be done using the hosts configured
default (e.g. /etc/resolve.conf on linux).
This is disabled by default and can be enabled using enable_system_fallback.
Static Table – There is also a second optional fallback mechanism that allows a static map to be used as a last resort. This can help when DNS encounters errors due to blocked resolvers or unknown conditions. This is enabled by default, and can be customized if building a new resolver.
§IPv4 / IPv6
By default the resolver uses only IPv4 nameservers, and is configured to do A lookups first,
and only do AAAA if no A record is available.
Requires the dns-over-https-rustls, webpki-roots feature for the hickory-resolver crate
Structs§
- Hickory
DnsResolver - Wrapper around an
AsyncResolver, which implements theResolvetrait.
Enums§
- Resolve
Error - Error occurring while resolving a hostname into an IP address.