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

Chat example #300

Closed
yale8848 opened this issue Mar 13, 2018 · 6 comments
Closed

Chat example #300

yale8848 opened this issue Mar 13, 2018 · 6 comments

Comments

@yale8848
Copy link

I see chat example have 2 limit:

1.Both have private IP address (same network).
2.At least one of them has a public IP address.

Can you give some example with how 2 client chat both have private IP address (different network,has no public IP).
thanks very much.

@Stebalien
Copy link
Member

You'd have to enable NAT port mapping and discovery. Take a look at how the libp2p Host is constructed in #278.

@upperwal
Copy link
Contributor

upperwal commented Apr 5, 2018

As Stebalien said NAT port mapping and discovery would be required for different networks. I am trying to include it in the chat example. Will update you if it works.

@yale8848
Copy link
Author

yale8848 commented Apr 6, 2018

@upperwal ok, thanks very much

@Arxcis
Copy link

Arxcis commented Feb 10, 2021

Please update the example, or add a new one 🙏 I don't understand what you mean in these comments. A complete functioning chat-example would help a lot with understanding how to connect peers behind NAT.

@yale8848
Copy link
Author

@Arxcis thanks, i will try the example.

@marten-seemann
Copy link
Contributor

As of v0.16.0, libp2p support hole punching, which should help with connectivity for nodes behind a NAT.

marten-seemann added a commit that referenced this issue Apr 21, 2022
remove dependency on go-addr-util
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

5 participants