Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Regarding nat traversal - hole-punching #10

Closed
jimmylei opened this issue Nov 19, 2018 · 2 comments
Closed

Regarding nat traversal - hole-punching #10

jimmylei opened this issue Nov 19, 2018 · 2 comments

Comments

@jimmylei
Copy link

This is may not a valid issue, but I don't know where to post my questions, hope someone can help on it.

I've tried to understand how nat traversal works in libp2p, especial hole-punching. Per specs, it says libp2p-nat is the module to resolve NAT traversal, I tried to trace the code and seems only uPnP and NATPMP are implemented and did not see any implementation about hole-punching like STUN/TURN.

I also checked libp2p-circuit, but per relay document: "the circuit-relay mechanism that allows nodes that don't speak the same protocol to communicate using a third relay node", seems it not design for traversal.

So, my question is that how hole-punching works with libp2p? let's say: We already have a STUN like server(Bootstrap Node) S, now I have a node B and node C, B and C ping S regularly to keep the hole active so that S can call back B,C any time, B and C both behind NAT(Gateway devices may not uPNP device) and can't communicate directly. Ideally, I can have B to send request to S and S tell C to send a request to B, then finish the hole punching.

@zhuwei
Copy link

zhuwei commented Mar 31, 2021

I have the same question

@Stebalien
Copy link
Member

Hole-punching work is being tracked in libp2p/go-libp2p#1039. This library just does UPNP, etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants