#dns-resolution #ip-address #dns-records #addresses #p2p #resolve #xstack

xstack-dnsaddr

The libp2p dnsaddr transport implementation for xstack

3 releases

0.2.17 Sep 14, 2024
0.2.15 Aug 27, 2024
0.2.12 Aug 27, 2024

#2096 in Network programming


Used in 2 crates

MIT license

205KB
4K SLoC

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:

protocol description
dns Resolves DNS A and AAAA records into both IPv4 and IPv6 addresses.
dns4 Resolves DNS A records into IPv4 addresses.
dns6 Resolves DNS AAAA records into IPv6 addresses.
dnsaddr Resolves multiaddrs from a special TXT record.

Dependencies

~79MB
~2M SLoC