Crate libp2p_dns[][src]

libp2p-dns

This crate provides the type GenDnsConfig with its instantiations DnsConfig and TokioDnsConfig for use with async-std and tokio, respectively.

A GenDnsConfig is an address-rewriting Transport wrapper around an inner Transport. The composed transport behaves like the inner transport, except that Transport::dial resolves /dns/..., /dns4/..., /dns6/... and /dnsaddr/... components of the given Multiaddr through a DNS, replacing them with the resolved protocols (typically TCP/IP).

The async-std feature and hence the DnsConfig are enabled by default. Tokio users can furthermore opt-in to the tokio-dns-over-rustls and tokio-dns-over-https-rustls features. For more information about these features, please refer to the documentation of trust-dns-resolver.

Structs

GenDnsConfig

A Transport wrapper for performing DNS lookups when dialing Multiaddresses.

ResolveError

The error type for errors that get returned in the crate

ResolverConfig

Configuration for the upstream nameservers to use for resolution

ResolverOpts

Configuration for the Resolver

Enums

DnsErr

The possible errors of a GenDnsConfig wrapped transport.

ResolveErrorKind

The error kind for errors that get returned in the crate

Type Definitions

DnsConfig

A Transport wrapper for performing DNS lookups when dialing Multiaddresses using async-std for all async I/O.