libp2p-dns 0.28.1

DNS transport implementation for libp2p
Documentation

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.