-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support Direct Connection Upgrade through Relay #651
Comments
Here's one possible adaptation to multistream 1.0 to cope with TCP simultaneous open, while keeping backwards compatibility. Let's call it ms1.1, although only theoretically; we can't use this ID on the wire because, go-multistream expects an exact match and does not entertain multiple versions in the header.
After the initial
Various things can happen:
|
I would like to avoid having to restart the conneciton, it's very complicated to implement and not certain it will work. |
@vyzo yeah, that option has higher chances of success, however it implies changes in libp2p that may break the abstractions quite a bit. |
See libp2p/go-tcp-transport#21 for a list of solutions. |
v0.16.0 shipped DCUtR support. |
The draft in libp2p/specs#173 specifies a mechanism for upgrading relay connections to direct connections using hole punching.
This issue is here to track implementation changes necessary to support it
The current logic picks the connection with the most streams.
This breaks with simultaneous open, which may result in both peers being the initiators.
To make things even more complicated, we might end up with a peer accepting and a peer connecting.
We may have to delay deployment until multistream/2.0 is ready.
The text was updated successfully, but these errors were encountered: