BiglySoftware / BiglyBT

Feature-filled Bittorrent client based on the Azureus open source project
https://www.biglybt.com
GNU General Public License v2.0
1.6k stars 154 forks source link

Forward listening ports through STUN to get open ports in the NAT1 network #3413

Closed Ghost-chu closed 2 weeks ago

Ghost-chu commented 3 weeks ago

I've noticed that a lot of people in the community use the STUN port forwarding tool to get ports open to the Internet in a NAT1 network environment. Since users don't have full access to the modem (which is usually controlled by the ISP), users have to use these tools to improve their connectivity in the BitTorrent network.

However, forwarding through external tools can result in incorrect source IP addresses, and it might be nice if BiglyBT had this feature built in.

I know that BEP 0015 articulates and implements a similar specification, but unlike this one, it requires a relay peer. This means that there is at least one connectable relay peer available, but this seems difficult to do on non-popular seeds. It would certainly be helpful if we could get a port that could accept incoming requests right off the bat, as this would no longer require a Relay Peer.

Considering the widespread use of the STUN protocol standard nowadays, we can easily find a STUN server that provides public services.

I'd be interested to hear your thoughts on this.


Off-Topic:

I also noticed that BEP-0015 seems to focus on Hole Punch being helped by Peers helping each other, and it doesn't seem to mention the Tracker part (Tracker seems to help with this as well), and I know that you were a developer for Vuze/Azureus, so I'm wondering if there's some interesting story behind this BEP.


Thank you for your time and years of dedication, have a nice day!

ValeZAA commented 3 weeks ago

Relay peers https://github.com/libp2p/specs/blob/master/relay/circuit-v2.md#introduction is the way to go. This is how it works in IPFS.

The idea being is to not only hole punch and fix NAT. The idea is to circumvent censorship — if one country drops all ips of another country — you connect to relay that can see that other country and download using it.

The issue is 2x bandwidth being used, or even more if there is no way to use one relay.

Ghost-chu commented 3 weeks ago

Relay peers https://github.com/libp2p/specs/blob/master/relay/circuit-v2.md#introduction is the way to go. This is how it works in IPFS.

The idea being is to not only hole punch and fix NAT. The idea is to circumvent censorship — if one country drops all ips of another country — you connect to relay that can see that other country and download using it.

The issue is 2x bandwidth being used, or even more if there is no way to use one relay.

Implementing circuit in a BitTorrent network is difficult unless you can convince all major BT clients to implement it ...... especially considering that the BT community has been growing for a long time. Implementing STUN is relatively simple and works well with all major clients.

If I'm just trying to counter censorship, I can use I2P.

parg commented 2 weeks ago

BiglyBT/Vuze/Azureus implement their own hole-punch stuff based on DHT nodes acting as intermediates (not related to any given download). Shame more people don't use it.