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

Show used ports in settings #6998

Closed
Griss168 opened this issue Aug 12, 2022 · 2 comments
Closed

Show used ports in settings #6998

Griss168 opened this issue Aug 12, 2022 · 2 comments

Comments

@Griss168
Copy link

Please, can be add somewhere in setting tab and JSON API what IP Ports Tribler actually use for communication?

Tribler is based on Torrent protocol and for establishing communication between two peers is necessary, that one of them would have public IP. But a lot of users are behind NAT and need to set up port forward in router.

My use case:
I want distribute Tribler channel, that is not well-known. Tribler channels are distributed by standard torrent protocol like ordinary torrent. If they don't have enough seeders, they need someone, who seed it long time (24/7) and for easiest distribution also with public IP. I use for that Raspberry Pi Zero 2, but is hard to determine, what ports need to be forwarded in router. Tribler use UPnP, but there are some issues like when You are behind double NAT or if Your router don't have UPnP like OpenWRT or if You want use VPS....

Please add somewhere in settings and API list of used ports. And would be nice if user can also define these ports.

Thanks and sorry for my English

@drew2a
Copy link
Contributor

drew2a commented May 31, 2024

Hi, @Griss168, sorry for the late reply.

There are two ways you can seed torrents in Tribler:

  1. Anonymously: You will use Tunnels for routing and encryption. In this case, the setting you are looking for is the ipv8 port: IPv8 Settings.

  2. Non-anonymously: You will use pure libtorrent. In this case, the setting you are looking for is the libtorrent port: Libtorrent Settings.

You can specify these settings in triblerd.conf, which is basically an ini file. You can find this file in the Tribler state directory (for macOS and Ubuntu it is ~/.Tribler/<version>, for Windows it is %Appdata%/.Tribler/<version>).

It is also possible to set the following environment variable to specify the Tribler state directory: TSTATEDIR.

An example of triblerd.conf:

[libtorrent]
    port = 7759

[ipv8]
    port = 7760

Regarding the channels, they are no longer supported:

Regarding the GUI, we can redesign the settings representation, but there is an upcoming migration to WebView. Therefore, it is not a good time to make any changes to the current GUI.

Regarding the necessity for a public IP for one of the two peers to communicate in Tribler, it is not mandatory. Both peers can have private IPs, and their communication will still be successful.

IPv8 can establish direct communication in difficult network situations. This includes connecting people behind a NAT or firewall. IPv8 includes a single simple and effective NAT traversal technique: UDP hole-punching. This is essential when offering privacy without infrastructure and consumer-grade donated resources.

https://github.com/Tribler/py-ipv8

For the BitTorrent protocol, this is also true, as far as I know. It is easier to seed if you have a public IP, but it is not mandatory. For example, both peers can still establish a successful connection and share data even with private IPs: http://bittorrent.org/beps/bep_0055.html

@qstokkink please, correct me if I'm wrong.

@qstokkink
Copy link
Contributor

This question seems to be comprehensively answered. I'll close this issue now.

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

No branches or pull requests

3 participants