Opened 13 years ago

Closed 9 years ago

Last modified 9 years ago

#1973 closed Enhancement (invalid)

Proxy support for peers

Reported by: MMN-o Owned by: casper
Priority: Low Milestone: None Set
Component: Transmission Version: 1.50
Severity: Minor Keywords: proxy socks
Cc: kresh@…, garrych@…

Description

I would like to see (primarily SOCKS 4/5, but also HTTP) proxying for tunneling the P2P (and web interface) traffic and not only tracker announces.

Using tracker proxying is beneficial for circumventing network blocks against trackers themselves. However, being able to use features like the SOCKS "bind" function could help people circumvent NAT troubles, like closed incoming ports.

Clients such as µTorrent and Deluge already have this feature.

Attachments (2)

transmission_socks.diff (12.4 KB) - added by casper 12 years ago.
first patch to support socks4 for p2p communication
0001-socks4-peer-proxy-support.patch (12.1 KB) - added by casper 9 years ago.
updated patch to support revision 14038+

Download all attachments as: .zip

Change History (23)

comment:1 Changed 13 years ago by MMN-o

I didn't see a "Type: Feature request", so I chose enhancement.

comment:2 follow-up: Changed 13 years ago by MMN-o

Hmm, I found that when running the dante 'socksify' wrapper to socksify Transmission, I get the following message in stdout:

Rbind(): binding UDP sockets is not supported by the socks protocol,
contact Inferno Nettverk A/S for more information.

Connecting to UDP is supported for SOCKS v5, but apparently not binding to UDP ports? TCP still supports both connect() and bind()

The dante socks suite: http://www.inet.no/dante/ (I installed it from Ubuntu 9.04 beta repository and run the server compiled from source on a separate machine)

comment:3 in reply to: ↑ 2 Changed 13 years ago by MMN-o

Replying to MMN-o:

Hmm, I found that when running the dante 'socksify' wrapper to socksify Transmission, I get the following message in stdout:

Rbind(): binding UDP sockets is not supported by the socks protocol,
contact Inferno Nettverk A/S for more information.

This was when activating "Use UPnP or NAT-PMP port forwarding", which of course is rather irrelevant in the case of socks proxy use. But the lack of UDP port binding according to Dante 'socksify' is still notable in case UDP P2P traffic should ever occur.

SOCKS v5 (RFC 1928), http://www.ietf.org/rfc/rfc1928.txt doesn't mention anything protocol related on the BIND function. Are there any extensions that anyone knows about?

comment:4 Changed 13 years ago by livings124

  • Version changed from 1.51+ to 1.52

comment:5 Changed 12 years ago by charles

  • Keywords patch-needed added; p2p traffic socks removed

comment:6 Changed 12 years ago by charles

  • Priority changed from Normal to Low

comment:7 Changed 12 years ago by casper

  • Cc kresh@… added
  • Owner changed from charles to casper
  • Priority changed from Low to Normal
  • Status changed from new to assigned
  • Version 1.52 deleted

I just started working on socks4 support for p2p traffic.

comment:8 Changed 12 years ago by charles

  • Version set to 1.52

cool.

Changed 12 years ago by casper

first patch to support socks4 for p2p communication

comment:9 follow-up: Changed 12 years ago by casper

that is my first try. apply in libtransmission/. only supports socks4. I tested it using a local ssh proxy only, e.g. "ssh localhost -D 1080". Works pretty well though.

comment:10 in reply to: ↑ 9 ; follow-up: Changed 12 years ago by MMN-o

Replying to casper:

that is my first try. apply in libtransmission/. only supports socks4. I tested it using a local ssh proxy only, e.g. "ssh localhost -D 1080". Works pretty well though.

Great!

This works for me for latest nightly source, transmission-svn8681.tar.bz2, (at least it proxies traffic) with the same ssh -D setup as for you. I'll have a go with other, more exotic, setups later.

comment:11 in reply to: ↑ 10 Changed 12 years ago by casper

Replying to MMN-o:

This works for me for latest nightly source, transmission-svn8681.tar.bz2, (at least it proxies traffic) with the same ssh -D setup as for you. I'll have a go with other, more exotic, setups later.

I tried it with Tor, works OK. peerProxy-Setting must be an IP address atm, otherwise transmission crashes on first connection attempt.

What's the preferred way for the settings? right now only socks4 without authentication is supported. Do we want the same settings as for the tracker-proxy, even if they have no effect for now? Or do we only want peer-proxy-enabled, ip, port as long there's only socks4 support?

casper

comment:12 Changed 12 years ago by charles

  • Summary changed from Proxy support for p2p traffic to Proxy support for peers

comment:13 Changed 12 years ago by garrych

  • Cc garrych@… added

comment:14 Changed 12 years ago by charles

  • Priority changed from Normal to Low

comment:15 Changed 12 years ago by charles

  • Component changed from libtransmission to Transmission

comment:16 Changed 11 years ago by propperdx

any news on this? I really need socks5 support für p2p connections. I had to switch to utorrent on windows to use a proxy. I think this is a really importent feature to protect one's privacy.

I would appreciate if someone could check on this.

thanks, tobias

comment:17 Changed 11 years ago by charles

  • Resolution set to invalid
  • Status changed from assigned to closed

Proxy support seems like a headache to test and maintain, and I'm not really convinced that many users would actually use it, so I've dragged my feet on this ticket.

I think I'm going to vote No on proxy support for the time being. If there were a groundswell of support for the feature I'd reconsider, but at this point it doesn't seem worthwhile.

Changed 9 years ago by casper

updated patch to support revision 14038+

comment:18 Changed 9 years ago by casper

  • Keywords socks added; patch-needed removed
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Version changed from 1.52 to 2.77+

I've redone my patch. It applies to current trunk (rev 14038). Together with "http_proxy=socks5h://whatever" as environment-variable making libcurl use the proxy, together with disabling dht and utp, this makes transmission work very well over socks-proxies, without ever directly opening any connections. Tested with "ssh -D 1080" and tor+polipo.

Tor users beware, transmission will still leak your public IP address.

I've been using this for years now, please include it upstream.

comment:19 Changed 9 years ago by jordan

  • Resolution set to invalid
  • Status changed from reopened to closed
  • Version changed from 2.77+ to 1.50

comment:20 Changed 9 years ago by casper

I'll keep updating the patch anyway. If anyone's using/needing this feature, pls comment here.

comment:21 Changed 9 years ago by x190

Keep up the good work! I currently use BindInterface? from #2313, but I'm sure others will find this very useful as well. What traffic is being proxied? P2P/DHT/Tracker? After reading comment:18, I assume that would be the answer.

Last edited 9 years ago by x190 (previous) (diff)
Note: See TracTickets for help on using tickets.