-
Notifications
You must be signed in to change notification settings - Fork 42
RemoteMultiaddr should be fully resolved #123
Comments
What is a /dns address? How do we resolve it? |
DNS Address: The QUIC transport already calls |
I'm not sure if resolving addresses works at all. Creating a new /dns-QUIC-Multiaddr works: ma.NewMultiaddr("/dns/google.com/udp/443/quic") However, using that to dial a connection fails: Resolving a udp4-multiaddr fails: ma.NewMultiaddr("/dns/google.com/udp4/443/quic") errors with |
|
Not really, I'm wondering, why is this each transport's responsibility to resolve the DNS address? It seems like every transport has to implement a very similar code path to do that. Wouldn't it make more sense to resolve the address before passing it to |
It's not generally each transport's job to resolve the address, the swarm usually handles that internally. That's the other half of the bug. However, the quic transport should either reject these addresses (probably the better solution) or resolve them. |
IMO:
I would recommend for go-libp2p-quic-transport to pipe all outbound dials through https://github.com/multiformats/go-multiaddr-dns to perform resolution. You can then dial the resulting multiaddr as you're doing now: https://godoc.org/github.com/multiformats/go-multiaddr-dns#Resolve (and record that in the state of the connection to return when |
@Stebalien Was this issue resolved by #131? |
Yep! Thanks! |
The addr returned by RemoteMultiaddr should be fully resolved, even if the user dials with a /dns address.
The text was updated successfully, but these errors were encountered: