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

Can we implement a chat example by hole punch #1071

Closed
ZBoIsHere opened this issue Mar 28, 2021 · 1 comment
Closed

Can we implement a chat example by hole punch #1071

ZBoIsHere opened this issue Mar 28, 2021 · 1 comment

Comments

@ZBoIsHere
Copy link

Recently, I read the code in branch feat/evt-based-hole-punching, and see some unit tests for hole-punch, but leak of a end-to-edge example for how to use hole punch.
Let's assume a situation, PeerA and PeerB are both behind NAT device, they can't establish a direct connection; There is Relay&Signal server which have a public IP, so we can register PeerA and PeerB to Relay&Signal server and exchange their public addr, then we try to establish a direct connection between them, if not success, we can realy their their payload through Realy&Signal server.
In our examples, their is lack a example to the situation above, so I hope that the developer can implement this example and notify us in this issue.

@Stebalien
Copy link
Member

A relay example is here: https://github.com/libp2p/go-libp2p-examples/blob/master/relay/main.go.

Progress on hole punching is tracked in #1039.

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

No branches or pull requests

2 participants