libp2p multiaddr resolver that rewrites the DNS host of a WebRTC Direct relay
to a resolved IP literal.
The @libp2p/webrtc WebRTC Direct dialer only accepts ip4/ip6 hosts and
libp2p auto-resolves dnsaddr only, so a /dns4|dns6|dns/.../webrtc-direct/...
relay fails the dial with "was not an IPv4 or IPv6 address". Registered in the
dial pipeline via connectionManager.resolvers, this resolves such addresses
before the dialer sees them. Scoped to WebRTC Direct: WSS and circuit relay
addresses resolve DNS on their own (and need the hostname for SNI/TLS).
libp2p multiaddr resolver that rewrites the DNS host of a WebRTC Direct relay to a resolved IP literal.
The
@libp2p/webrtcWebRTC Direct dialer only acceptsip4/ip6hosts and libp2p auto-resolvesdnsaddronly, so a/dns4|dns6|dns/.../webrtc-direct/...relay fails the dial with "was not an IPv4 or IPv6 address". Registered in the dial pipeline viaconnectionManager.resolvers, this resolves such addresses before the dialer sees them. Scoped to WebRTC Direct: WSS and circuit relay addresses resolve DNS on their own (and need the hostname for SNI/TLS).