-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
This issue is to aggregate all the work and PRs we have open for taking Hole Punching to completion.
Done criteria: we recommend key consumers like go-ipfs and lotus enable it by default because the functionality works, is well tested, and has quality assertions in place to prevent regressions.
Solve Simultaneous connect in multi-stream for TCP hole Punching (Ready for Review)
go-multistream suffers from the simultaneous connect problem wherein it fails when two peers try to connect each other at the same time. This blocks hole punching. This is ONLY a problem for TCP and NOT for QUIC because QUIC does NOT use the multistream protocol for negotiating the security and stream negotiation protocols. The PRs below solve this problem using the method specd out in libp2p/specs#196.
- Implement simultaneous open extension multiformats/go-multistream#42. (released)
- Secure Muxer Interface for Simultaneous Connect go-libp2p-core#180 (released)
- Implement support for simultaneous open go-conn-security-multistream#14. (released)
- Implement support for simultaneous open go-libp2p-transport-upgrader#25. (released)
- Finish and Test the simultaneous connect problem in libp2p peers #1041. (merged)
Swarm & Transport changes for Hole-Punching
- add support for transient connections go-libp2p-core#175 (support for transient Conns)
- Treat transient connections as opt-in when opening new streams go-libp2p-swarm#236 (transient conns in Swarm)
- Expose underlying transport connection stat where available go-libp2p-transport-upgrader#71 (upgrader changes for transient conns)
- Context to force a direct dial in the Swarm even if we have a Relayed connection go-libp2p-core#181 (context to force a direct dial) (merged NOT released)
- Support for Hole punching go-libp2p-swarm#233 (force and prefer direct conns)
Emit event for NAT device type
- Event for user's NAT Device Type: Tell user if the node is behind an Easy or Hard NAT go-libp2p-core#173 (define event)
- Emit event for User's NAT Type i.e. Hard NAT or Easy NAT #1042 (emit event)
Limited Relay Protocol
- Circuit v2 Spec p2p-circuit v2 spec specs#325
- p2p-circuit v2 go-libp2p-circuit#125
- https://github.com/vyzo/libp2p-relay
Hole-Punching Co-ordination via Relay Server
- signalling for hole punching #1168 (replaces Signalling for Hole Punching #1057)
- reject hole punching attempts when we don't have any public addresses #1214.
Integrate Limited Relays
QUIC Changes
AutoRelay
Documentation
Automated testing to prevent regressions
- Basic project flare (hole punching) test test-plans#21
- 2022-11-07 note: this item is deemed out of scope since it's, unfortunately a casualty of a time when functionality released without ensuring we have accompanying end-to-end test coverage. Backfiling test coverage for important functionality (including hole punching) is on the libp2p/test-plans roadmap and also dependent on some work in Testground itself. The issue above will get tackled above as part of those efforts.
Other
The below is a documentation issue that we will do as a best effort.
- NAT Traversal: Tell users if they are behind a symmetric NAT and document UPnP setup and port forwarding on Routers to help users #1017 (document libp2p UPnP and manual port forwarding).
liamsi and dennis-tra