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

issue with communicating over internet. Can libp2p provide communication over nodes located across internet #366

Closed
thanusreemohan opened this issue Jun 3, 2019 · 8 comments
Labels
kind/support A question or request for support

Comments

@thanusreemohan
Copy link

  • Version:
  • Platform:
  • Subsystem:

Type:

Severity:

Description:

Steps to reproduce the error:

@thanusreemohan
Copy link
Author

I am trying to connect nodes across the internet using LibP2p.
Does libp2p allow communication over the internet for nodes located behind the phone internet (wifi).

@jacobheun
Copy link
Contributor

The libp2p forums are a better place to ask general libp2p questions like this, https://discuss.libp2p.io.

Yes, libp2p does allow this through various things. We're working on improving NAT traversal in JS but current available options include using Relays and transports like https://github.com/libp2p/js-libp2p-webrtc-star that have built in hole punching. If you're looking to run a node longer term on a home network you might want to look into setting up port mapping or UPnP on your router to improve your nodes connectivity to the network. Once we role out the NAT Manager in JS it will attempt to punch through the NAT automatically, but if you don't have this set up on your router it won't work and you'll have to fallback to other, less efficient options, like Relays.

@jacobheun jacobheun added the kind/support A question or request for support label Jun 3, 2019
@thanusreemohan
Copy link
Author

Thanks so as i understand with the current setup in webrtc-star the home networks (phone internet wifi) cannot communicate with each other. Once NAT manager is rolled out this would be addressed ?

@jacobheun
Copy link
Contributor

Once NAT manager is rolled out this would be addressed?

To a degree, with hole punching, but that's not 100% effective. We're working on improving this as much as we can with various techniques, but looking into updating your routers configuration to forward ports for your application is a more immediate and effective approach.

@thanusreemohan
Copy link
Author

Thank you! when can we expect NAT manager rollout in nodeJS or GO language?

@jacobheun
Copy link
Contributor

Go has some NAT Traversal support already. NAT traversal in JS is higher on my priority list. I'm hoping to get some dedicated time next month to work on it and the AutoNAT protocol (automatic nat discovery and address announcing via connected peers) in JS.

@suutaku
Copy link

suutaku commented Jul 9, 2019

NAT traversal is really important and without it p2p will not going to work in some country . like China.

@p-shahi
Copy link
Member

p-shahi commented May 30, 2023

The larger hole punching effort is tracked here: #1461
AutoNat has landed: #1005
hole punching in the browser is possible via private-to-private/browser-to-browser https://github.com/libp2p/js-libp2p-webrtc

@p-shahi p-shahi closed this as completed May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

4 participants