Crate xstack_dnsaddr

source ·
Expand description

A decorator pattern implementation that adds IP and Name Resolution capabilities to other transports.

Most libp2p transports use the IP protocol as a foundational layer, and as a result, most transport multiaddrs will begin with a component that represents an IPv4 or IPv6 address.

This may be an actual address, such as /ip4/198.51.100 or /ip6/fe80::883:a581:fff1:833, or it could be something that resolves to an IP address, like a domain name.

DnsAddr attempt to resolve name-based multiaddrs into IP addresses before calling other transports. The current multiaddr protocol table defines four resolvable or “name-based” protocols:

protocoldescription
dnsResolves DNS A and AAAA records into both IPv4 and IPv6 addresses.
dns4Resolves DNS A records into IPv4 addresses.
dns6Resolves DNS AAAA records into IPv6 addresses.
dnsaddrResolves multiaddrs from a special TXT record.

Structs§

  • A transport that resolve name-based multiaddrs into IP addresses.