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

[Feature request] Support NAT hole punching when PEX and DHT are closed #7207

Open
Illustar0 opened this issue Dec 14, 2022 · 7 comments
Open
Labels

Comments

@Illustar0
Copy link

Illustar0 commented Dec 14, 2022

As we all know, when downloading a Private Torrent, uTP cannot perform hole punching, because PEX and DHT are closed, which makes the connection of users without public network IP quite poor. But recently I found an open source tool that can help users whose NAT type is FullCone to map the internal network port to the public network. The only disadvantage is that the public network port is random. This makes it possible for libtorrent to realize TCP and UDP hole punching without PEX and DHT

In fact, I tried deploying this tool on a router with firewall port forwarding, and successfully received incoming connections from other peers in Private Torrent in qbittorrent (I don't have a public IP) . In contrast, without deploying this tool, I cannot receive incoming connections, and the peers that can actively connect are also very limited, only those with public IPs.

So, I hope that libtorrent can make some improvements to support TCP/UDP hole punching without PEX and DHT environment

natter (the tool, written by python): https://github.com/MikeWang000000/Natter/tree/v0.9
natmap (C language version of natter): https://github.com/heiher/natmap

@parthibx24
Copy link

@XCwosjw doesn't webrtc solve the same problem? It's being added to this library...

@Illustar0
Copy link
Author

It's interesting, and more efficient than what I've come up with. Looking forward to the release of a version that supports webtorrent

@stale
Copy link

stale bot commented May 21, 2023

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

@stale stale bot added the stale label May 21, 2023
@ThaUnknown
Copy link

unfortunately, the webtorrent spec never defined how to support PeX or DHT so it was never implemented, webrtc functions a lot differently than other protocols so it was never decided how it should be accomplished

@stale stale bot removed the stale label Jun 3, 2023
@Illustar0
Copy link
Author

Illustar0 commented Jun 6, 2023

Maybe you didn't notice what I said. What I'm hoping to achieve is exactly the NAT hole punching with PEX and DHT off (or not implemented)

In fact I usually use natter and natmap to open TCP rather than UDP ports to the public network, Because natter's support for UDP is not perfect

@arvidn Are there any plans to make this happen?

@stale
Copy link

stale bot commented Sep 17, 2023

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

@Neustradamus
Copy link

Dear all, for your information, @arvidn has done a I2P PEX PR which has been merged:

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

No branches or pull requests

4 participants