How to use proxy for Transmission?

69,949

Solution 1

TL;DR: http_proxy environment variable works for at least 2.92. For versions 1.4.x and older see configuration options here or below.

Citation from transmission wiki page:

Transmission uses the libcurl library for http- and https-based tracker announces and scrapes. Transmission doesn't support proxies, but libcurl itself honors a handful of environment variables to customize its proxy behavior.

relevant variables start here here. And in CURLOPT_PROXY description there is this:

libcurl respects the proxy environment variables named http_proxy, ftp_proxy, sftp_proxy etc. If set, libcurl will use the specified proxy for that URL scheme. So for a "FTP://" URL, the ftp_proxy is considered. all_proxy is used if no protocol specific proxy was set.

I run transmission-daemon using systemd, so I just add line

Environment=http_proxy=http://proxy_url:proxy_port

to service configuration using

sudo systemctl edit transmission-daemon.service

and all worked.

I have transmission-daemon 2.92. Can't say for sure for older version, but according to this wiki page you should use this parameters for transmission 1.4.x or older:

proxy-authentication String
proxy-authentication-required: Boolean (default = 0)
proxy-port: Number (default = 80)
proxy-server: String
proxy-server-enabled: Boolean (default = 0)
proxy-type: Number (0 = HTTP, 1 = SOCKS4, 2 = SOCKS5, default = 0)
proxy-username: String

Solution 2

vim /lib/systemd/system/transmission-daemon.service

then add proxy enviroment, like

...
[Service]
User=debian-transmission
Environment="HTTP_PROXY=http://127.0.0.1:7890" "HTTPS_PROXY=http://127.0.0.1:7890" "ALL_PROXY=socks5://127.0.0.1:7891"
Type=notify
...

It works on 2.94

Share:
69,949

Related videos on Youtube

Anandu M Das
Author by

Anandu M Das

Security Tester

Updated on September 18, 2022

Comments

  • Anandu M Das
    Anandu M Das almost 2 years

    I have heard that Proxy Support in Trasmission has been removed as of version 2.12. Is it possible to use proxy by any other method?

    • scohe001
      scohe001 over 6 years
      It's a shame this was closed as it's certainly not a duplicate. The other thread only works for versions prior to 2.12 while this specifically is asking for a solution for later versions.
    • Evan Carroll
      Evan Carroll over 5 years
  • Tcll
    Tcll over 6 years
    this is not a solution as the feature was removed as of 2.12, and does not state how to accomplish what's asked (fix and I'll remove my downvote).
  • ivanxuu
    ivanxuu almost 5 years
    I've added the line Environment=http_proxy=socks4h://105.233.32.123:49556 to use SOCKS4 instead of http. There are some free SOCKS4 websites to get an IP. You can check your new torrent IP if you duck-search any service to check your IP