8

How do I get rtorrent to use a socks5 proxy? I've tried to get socks5 to work with rtorrent, but it doesn't seem to have any impact.

Setup the socks5 proxy on port 9800:

ssh -ND 9800 user@otherhost

in .rtorrent.rc

http_proxy=127.0.0.7:9800
proxy_address=127.0.0.7:9800

It cannot download any data from tracker.

Tracker: [Server returned nothing (no headers, no data)]

And my ip does not appear to use the IP from "otherhost" when I check with http://www.checkmytorrentip.com/

I also tried using tsocks rtorrent

server = 127.0.0.1
eserver_type = 5
server_port = 9800

This shows my IP as coming from 'otherhost', but after a few seconds rtorrent freezes up.

I am using rTorrent 0.9.2/0.13.2

chovy
  • 2,039
  • 4
  • 16
  • 18

2 Answers2

5

According to this ticket (and that one),you need to decide what to proxy: connections to the tracker or all connections (including the ones to peers):

  1. Proxying tracker connections can be done using the patch mentioned here or using something like Polipo, mentioned here
  2. Proxying everything can be done, as you already tried, using socksifiers like tsocks, but I suppose there's no chance of having incoming connections this way and your BT experience will thus be unsatisfying.

To proxy everything but still have incoming connections, I suspect you'd have to use something VPN-ish.

sr_
  • 15,224
  • 49
  • 55
  • 1
    So I could setup a vpn from one host to another? Using tsocks frooze rtorrent, and I'm not sure why incoming connections wouldn't work, can you explain? – chovy Nov 30 '12 at 17:53
1

It's possible now with curl >= 7.21.7

Solution is here, namely senia-psm's comment:


With curl >= 7.21.7 you can specify CURLOPT_PROXYTYPE as part of CURLOPT_PROXY. See https://curl.se/libcurl/c/CURLOPT_PROXY.html. So now you can use socks5 with rtorrent this way:

network.http.proxy_address.set = "socks5h://<host>:<port>"

Note that you have to use socks5h to resolve tracker host name through proxy.

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
synkro
  • 111
  • 2