Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upSOCKS Proxy Support #807
SOCKS Proxy Support #807
Comments
This comment has been minimized.
This comment has been minimized.
|
There's no way to add proxy support to the browser version of WebTorrent. That will always use your browser/OS proxy settings because JavaScript in a web page can't control that, for security reasons. As for SOCKS support, it seems there's two possible ways to do it: proxy only connections to trackers, or proxy all connections (including peer connections). |
This comment has been minimized.
This comment has been minimized.
|
This package looks quite good: https://www.npmjs.com/package/socks |
This comment has been minimized.
This comment has been minimized.
|
I've used libtorrent before for python stuff, but I really like your node implementation because I can just pass the magnet and file index to the client and they can stream the file themselves with zero client side dependencies beyond the browser. I'm not in any rush or demanding anything, as I have already moved my code to a VM behind a VPN, but I thought it would be much easier for most developers (myself included) if they could just pass in the proxy/auth details in the opts arguments when creating the instance, rather than putting all the traffic on the machine behind a VPN. In any event this is some extremely cool software, and I hope you'll keep improving it, and adding features. Proxy or not you deserve the bounty. Thank you for sharing! |
This comment has been minimized.
This comment has been minimized.
|
Yeah, that's totally fair! I think this wouldn't be that hard to support, so it'll probably happen. The Will look at this when I have some time. PR welcome too! |
This comment has been minimized.
This comment has been minimized.
|
Also, for others coming along later, this is the bounty that @Ohge is referring to: https://www.bountysource.com/issues/34324857-socks-proxy-support |
This comment has been minimized.
This comment has been minimized.
|
Definitely interested in this as well, just added $50 to the bounty! |
This comment has been minimized.
This comment has been minimized.
|
I have some difficulties to set a SOCKS proxy for UDP up to test my PR webtorrent/bittorrent-tracker#157 to enable socks proxy on tracker requests. It must be a configuration issue but I could not fix it... Does anyone can help me with this by testing or explain how to setup UDP forwarding? |
This comment has been minimized.
This comment has been minimized.
|
@yciabaud You could test using https://www.privateinternetaccess.com (free trial I think), they offer SOCKS5 proxy specifically for torrenting (so it should support UDP/TCP, also good to test authentification). |
This comment has been minimized.
This comment has been minimized.
|
@romaincointepas Unfortunately, there is no free trial and the free proxies I found only allow http browsing. It would have been easier to setup a local proxy, I will give it another try... |
This comment has been minimized.
This comment has been minimized.
|
@yciabaud I just emailed you the PIA SOCKS5 proxy (UDP/TCP and made for torrenting) with my personal credentials, good luck! |
This comment has been minimized.
This comment has been minimized.
|
Thank you for letting me use this, I tried yesterday and I achieved to use the proxy for HTTP and Websocket trackers. Unfortunately the connection is not established on UDP trackers. Digging into this, I will keep you in touch. |
This comment has been minimized.
This comment has been minimized.
|
Little update, I got the negotiation for UDP relay working but the messages are still not forwarded to the destination. Should work on this soon. |
This comment has been minimized.
This comment has been minimized.
|
@yciabaud Looking forward, good luck! |
This comment has been minimized.
This comment has been minimized.
|
@yciabaud curious, what all gets proxied? WebTorrent talks to the network it lots of ways. So far I've found:
The connections are made from a few different modules: webtorrent, simple-get, and torrent-discovery. Do we need to proxy all of those? |
This comment has been minimized.
This comment has been minimized.
|
You're right @dcposch, I am currently working on bittorrent-tracker to cover:
But then we should add proxying connections to peers as well:
The last cases are a bit different, I don't know if we need to manage proxying incoming connections and webrtc, some proxies can open a port and forward incoming messages to you but I don't think other clients has implemented it. For webrtc, TURN/STUN can be used but it may be better to use the configured proxy.
Finally I would add a last networking issue: In that case, proxy may be needed to access the servers. Let's start with tracker and peers support for outgoing connections and then discuss on the other cases. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
No update on my side, I was quite stuck on UDP tracker proxy, I should have another look this week. The code looks good but I did achieve to connect to a UDP tracker yet... |
This comment has been minimized.
This comment has been minimized.
|
I cannot get vuze to work with UDP, tried @romaincointepas proxy and a local 3proxy instance and I have the same behavior... UDP negociation works but then the request times out... Can somebody test it for me? Maybe my ISP is locking some kind of traffic |
This comment has been minimized.
This comment has been minimized.
|
Most SOCKS5 proxy servers out there are not compatible with UDP trackers (3proxy being one of them). As far as I know (I've tried a lot of them), only dante-server works. See this comment from the creator of libtorrent:
My uneducated guess is that it may have something to do with http://www.bittorrent.org/beps/bep_0015.html (UDP connections / spoofing):
PIA, Torguard and other VPN providers all seem to use dante-server for their SOCKS5 proxy, and I can get a proxied setup working with http://www.qbittorrent.org + PIA SOCKS5 proxy (the one I sent you by email @yciabaud, can you try with qBittorrent?). Also, could http://www.bittorrent.org/beps/bep_0015.html (UDP connections / spoofing) mean that there is some additional trickery needed client-side for UDP trackers to work? |
This comment has been minimized.
This comment has been minimized.
|
OK got it working now, at first I set a local dante server to have logs and then I checked with your proxy server. So here is the new status (when PR webtorrent/bittorrent-tracker#157 is merged):
Connecting to peers should not be too difficult for HTTP and TCP. WebRTC and TURN will not be straightforward so we can look at this later. |
This comment has been minimized.
This comment has been minimized.
|
@yciabaud Great! What happens if the SOCKS5 server does not respond (either right away or later on)? Does bittorrent-tracker fallback on direct connection or fail? (for each case) |
This comment has been minimized.
This comment has been minimized.
|
No fallback, the request will time out and we will wait the next announce interval to try again. |
This comment has been minimized.
This comment has been minimized.
|
Worked on proxying peer connections today, needs more testing but webseeds and tcp should be ok. |
This comment has been minimized.
This comment has been minimized.
|
Excellent news! |
…ent/bittorrent-tracker#157) and peer connexions in node (TCP/UDP) Fixes webtorrent#807
…ent/bittorrent-tracker#157) and peer connexions in node (TCP/UDP) Fixes webtorrent#807
This comment has been minimized.
This comment has been minimized.
|
What's the status on this? |
This comment has been minimized.
This comment has been minimized.
|
i need it. |
This comment has been minimized.
This comment has been minimized.
|
Any updates? This is kinda big :p |
This comment has been minimized.
This comment has been minimized.
|
Added 25$ to the bounty. |
This comment has been minimized.
This comment has been minimized.
|
If anyone is working on this and needs a SOCKS5 to connect to, feel free to use Disclosure: I run generousvpn. Edit: specified no login credentials. |
This comment has been minimized.
This comment has been minimized.
|
Any new developments regarding this? |
This comment was marked as disruptive content.
This comment was marked as disruptive content.
|
I think webtorrent had his prime, specially since IPFS is growing rapidly. |
Can you please add SOCKS proxy support? I am working on a crawler that parses metadata, but I have received two fraudulent DMCA requests this week even though I never shared a single byte of the actual files (destroys torrent on metadata). The only way to avoid having my internet shut off while using this software is to push all the traffic through a proxy or VPN so my lSP is hidden. My primary concern is support in node.js, but if it can be supported client side as well that would help people who use proxies in their browsers for similar reasons.
P.S. This is great software, and I intend to add a bounty to this feature request.