Besides that Tor should not be used for p2p traffic because of network congestion and possible IP leaks in BitTorrent applications, how could it work in theory?

Assuming that the BitTorrent application is forced to use the socks5 tor proxy and in the torrc only one exit node is configured, then the tracker of a torrent would only receive the IP of the exit node.

What happens, if another peer tries to connect to the IP of the exit node? The BitTorrent client would have to check for connections permanently. Is it even possible to establish a connection?

Surprisingly, looking at the website https://iknowwhatyoudownload.com/en/peer/ it seems that nearly every exit node is involved in p2p traffic.

1 Answer 1


Well, it's a long-living mistake that Tor can not be used for a BitTorrent - actually, it must be, but in a proper way:

  1. Use an open-source client, I do recommend rTorrent for CLI/embed and qBitTorrent for a GUI version. This will protect you from data leaks, and - yes - take your time and compile them by hand, it's not complicated at all

  2. Trackers and clients must avoid using IP addresses, but use dot-onion hidden service addresses instead. Yes, it's just 3 lines in your torrc and just an option in your torrent client. Set up once - and it will just work

  3. DHT will not help here**?** - It will! All you need to do is never provide IP address, just a dot-onion host name. However if you're concerned about a deep-probing - you have to disable it because of the fact that Tor uses TCP only

UPDATE : settings for tools

In torrc :

  • just create a hidden service and restart Tor so you will have it's name in it's folder, write it down. You need to map your torrent client's ports for that address.
  • use transparent proxying with VirtualNetwork as big as /16 or more.
  • enable DNS service so you can resolv dot-onion names system-wide

In qBittorrent:

  • Tools->Options->Connection->Peer connection protocol select TCP only and disable any NAT/UPnP. Also in Proxy Server block check "Use proxy for peer connections*. Add your Tor as a SOCKS5 proxy
  • Tools->Options->BitTorrent->Automatically add trackers add a tcp tor hidden service tracker there.
  • Options->Advanced there are some resolve(country/hostname/etc) options - uncheck them, there's no such data you're looking for ;) Set IP address to report to trackers to your onion hidden service. You will need a source patch for qBittorrent to accept not just an IP address but also a hostname to that field. Restart qBittorrent

In ISC Bind 9 - local setup, hardcoded in /etc/resolv.conf:

  • Create a zone resolution forwarding to your Tor DNS service
  • Disable any forwarders - just use a root hints - to avoid query leaks

In your OS use firewall to divert Tor's VirtualNetwork to it's TransPort

Keep in mind, that it will give you just a fraction of speed and working robustness as the full-featured BitTorrent, but it will work.

  • How does that fit to your answer here: tor.stackexchange.com/a/12979/88 ?
    – Jens Kubieziel
    Apr 3, 2023 at 19:55
  • Thank you for the answer! Regarding the point 2: Could you explain which settings in the torrc and in the qbittorrent it would be?
    – TorUser101
    Apr 3, 2023 at 22:10
  • @TorUser101 I have updated my answer, see the todo list
    – Alexey Vesnin
    Apr 4, 2023 at 9:06
  • @JensKubieziel it fits perfectly! As I've mentioned there - there's no way of full torrenting through Tor, the recommendations I gave here are barely rising a shade of it's functionality, but it works. I'm revealing this because of elevating eavesdropping and censorship around the world, so people will have a least some options to share files. And yes - in my project there's no need for such a tweaks - it just working there
    – Alexey Vesnin
    Apr 4, 2023 at 9:08
  • by the way - I'm experimenting with rTorrent now - if you're interested I can add it's config as the experiment will be done. This is the fastest torrent client
    – Alexey Vesnin
    Apr 5, 2023 at 19:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .