Skip to content
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

Autorelay is announcing a bare-IP multiaddr #510

Closed
Stebalien opened this issue Dec 20, 2018 · 12 comments
Closed

Autorelay is announcing a bare-IP multiaddr #510

Stebalien opened this issue Dec 20, 2018 · 12 comments
Assignees
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@Stebalien
Copy link
Member

That is, /ip4/.../ipfs/... (no tcp/udp).

@Stebalien Stebalien added the kind/bug A bug in existing code (including security flaws) label Dec 20, 2018
@Stebalien
Copy link
Member Author

Or maybe it's autonat? No idea but this only happens after autonat decides that I'm undialable.

@vyzo
Copy link
Contributor

vyzo commented Dec 21, 2018

It's autorelay and it's on purpose -- we'd like to preserve the original IP address in order to facilitate the dialer in making decisions whether to try private IPs.
We can remove if you think it's undesirable.

@vyzo
Copy link
Contributor

vyzo commented Dec 21, 2018

to facilitate the v2 dialer that is, current dialer will dial the private addresses anyway.

@vyzo
Copy link
Contributor

vyzo commented Dec 21, 2018

#511 removes the raw public address from the announcement.

@Stebalien
Copy link
Member Author

Ah, I forgot about that. Seeing this show up in ipfs id is mildly confusing but this seems important.

What if we announce /p2p/QmRelay/ip4/PUBLIC/tcp/4001/p2p/QmTarget? Thoughts @raulk/@vyzo?

@vyzo
Copy link
Contributor

vyzo commented Dec 21, 2018

Kind of defeats the purpose, the dialer will have to fish a private ip out of a relay address.
Regardless, I think we can turn it off until we actually have a dialer that takes advantage of it, at which point we can reinstate it (or decide on a better mechanism).

@Stebalien
Copy link
Member Author

Kind of defeats the purpose, the dialer will have to fish a private ip out of a relay address.

Not sure what you mean here.

@vyzo
Copy link
Contributor

vyzo commented Dec 21, 2018

Well, the dialer (v2) will have to use a public address from which to decide whether the private addresses are applicable. Having it flat out as an undialable address facilitates the selection.
In principle we could do the same with embedding the public ip in the relay address, it's just a bit more work for the dialer (and a bit more confusion).

@vyzo
Copy link
Contributor

vyzo commented Dec 21, 2018

Also, there is no clean mapping of public addresses to relay addresses, as we might have multple public ones, each mapping to potentially multiple relay addresses -- a bit of combinatorial explosion.

@Stebalien
Copy link
Member Author

Also, there is no clean mapping of public addresses to relay addresses, as we might have multple public ones, each mapping to potentially multiple relay addresses -- a bit of combinatorial explosion.

Good point. Yeah, let's merge that PR while we think about this. The best solution may be to just filter this in the UI.

@ghost ghost removed the status/in-progress In progress label Dec 21, 2018
@Stebalien
Copy link
Member Author

@vyzo is there an open issue discussing this?

@vyzo
Copy link
Contributor

vyzo commented Dec 22, 2018

No that i know, we should probably make one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

2 participants