-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better support for /dnsaddr/ (i.e. in swarm connect) #5522
Comments
@hsanjuan |
It should resolve the $ dig +short TXT _dnsaddr.bootstrap.libp2p.io
"dnsaddr=/ip6/2a03:b0c0:0:1010::23:1001/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd"
"dnsaddr=/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd"
$ madns /dnsaddr/bootstrap.libp2p.io/
/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd
/ip6/2a03:b0c0:0:1010::23:1001/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNA |
@overbool you are confusing |
@hsanjuan You are right. I've confused |
It seems the same issue #5249. |
@overbool that one is for the @hsanjuan we'll have to think about a better way to do https://github.com/multiformats/go-multiaddr-dns/blob/78f39e8892d4f8c5c9f18679cc06d0b40ecab8cf/resolve.go#L167 Basically, when we resolve a dnsaddr, we match the final component to try to pull out the right ones. In theory, this allows us to have multiple distinct peers with the same hostname. In practice, this is kind of arbitrary. Any solution that tries to solve this issue will also have to solve that. Note: there are also security concerns but I'm not that concerned. If the user doesn't specify a peer ID, they have no reason to believe we'll end up connecting to the right peer (they haven't told us which one to use). |
Ok, two problems here. The first is the one triggering the issue. The second is related domain resolution as mentioned. Thing works with empty trailers (no That makes some current bootstrap peers (https://github.com/ipfs/go-ipfs-config/blob/master/bootstrap_peers.go#L20), problematic. Since the But the second problem should not affect me if I just want to run |
@Stebalien Did you mean that we should append an addr with new pid( |
@hsanjuan is right, we can probably solve this particular issue without delving into that. I'm not really sure the best way to improve this at the moment. |
@Stebalien If we only solve this issue without considering |
Version information:
master
Type:
Enhancement
Description:
It should be possible to do
ipfs swarm connect /dnsaddr/something
. Right now it doesn't attempt to resolve and throwsError: invalid peer address: invalid IPFS address
The text was updated successfully, but these errors were encountered: