You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dialing a DNSAddr multiaddr that somewhere down the recursion chain forwards to an address type that handles DNS specially (e.g. WSS) does not work because the host over-resolves the address.
Example:
Dial /dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb (but only have WSS as a supported transport)
This will resolve to /dns4/am6.bootstrap.libp2p.io/tcp/443/wss/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb
Which will resolve to /ip4/147.75.87.27/tcp/443/wss/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb
Which will fail due to an invalid TLS certificate
However: dialing /dns4/am6.bootstrap.libp2p.io/tcp/443/wss/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb directly works fine.
Potential Fix
This is effectively a continuation of #1597, but accounting for DNSAddr recursion. I suspect the fix that will help here is to keep doing the type of check we do in
Very interesting. Looks like the transport-specific name resolution is bypassed altogehter, since looking at /dnsaddr/..., we don't know it will resolve to a wss address. We'll need to do that check recursively.
Problem
Dialing a DNSAddr multiaddr that somewhere down the recursion chain forwards to an address type that handles DNS specially (e.g. WSS) does not work because the host over-resolves the address.
Example:
/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb
(but only have WSS as a supported transport)/dns4/am6.bootstrap.libp2p.io/tcp/443/wss/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb
/ip4/147.75.87.27/tcp/443/wss/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb
However: dialing
/dns4/am6.bootstrap.libp2p.io/tcp/443/wss/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb
directly works fine.Potential Fix
This is effectively a continuation of #1597, but accounting for DNSAddr recursion. I suspect the fix that will help here is to keep doing the type of check we do in
go-libp2p/p2p/net/swarm/swarm_dial.go
Lines 305 to 318 in 0509445
go-libp2p/p2p/net/swarm/swarm_dial.go
Line 344 in 0509445
cc @dennis-tra (thanks for finding out something was going wrong here 😄)
The text was updated successfully, but these errors were encountered: