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

Add support for NAT traversal techniques #1051

Open
wants to merge 7 commits into
base: master
from

Conversation

@yciabaud
Copy link
Contributor

yciabaud commented Feb 18, 2017

Here is an implementation of NAT traversal as discussed in #195 using https://github.com/indutny/node-nat-upnp and https://github.com/TooTallNate/node-nat-pmp.

I have also ecountered https://github.com/level451/pmp that claims to make both UPnP ad NAT-PMP but I don't have tested it.

This feature is implemented in a new module for node env only and provided by a single instance shared by the webtorrent clients because NAT-PMP needs to open a specific port to work.

I checked the UPnP part with my router by it does not support NAT-PMP protocol.

The mappings are sent both with UPnP and NAT-PMP whe available and refreshed every 30 min.

Reviews are welcome!

@yciabaud

This comment has been minimized.

Copy link
Contributor Author

yciabaud commented Feb 22, 2017

Using my patch TooTallNate/node-nat-pmp#13 does the trick, we should wait for it to be merged but I have no feedback ATM.

@heroboy

This comment has been minimized.

Copy link

heroboy commented Jun 15, 2017

What protocol port you used to map? As I know dht uses UDP. self._natTraversal.portMapping seems mapping TCP port default.

@stale stale bot added the stale label May 3, 2018
@webtorrent webtorrent deleted a comment from stale bot May 3, 2018
@stale stale bot removed the stale label May 3, 2018
@stale

This comment has been minimized.

Copy link

stale bot commented Sep 18, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Sep 18, 2018
@stale stale bot closed this Sep 25, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Dec 24, 2018
@webtorrent webtorrent unlocked this conversation Sep 5, 2019
@feross feross reopened this Sep 5, 2019
@stale stale bot removed the stale label Sep 5, 2019
@feross feross added the enhancement label Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.