-
-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxy support for socks5 #105
Comments
a http proxy is not the same thing as a socks proxy. |
Its my understanding http_proxy is used for tracker and proxy_address is used for the swarm...is there anyway to use a socks5 proxy for both? |
You could use tsocks for that (i think.) |
rtorrent freezes up with tsocks. |
Proxychains also freezes rtorrent :/ |
Hmm trying this with the same version and it doesn't freeze but i get those fun "could not parse bencoded data" and likewise errors ("Server returned nothing") about communication problems. |
bump has anyone had any luck with socks5 proxies in rTorrent? |
So I ended up doing a VPN setup where I forward all the traffic through the vpn and set the bind address to the tun0 interface (or whatever vpn interface is created on your machine). AFAIK, this is the best/only? way to do this. It pays to note that I have a dedicated VM for this currently which starts up and automatically manages everything itself. There are now docker containers that you could start from as well. |
I use rtorrent just fine with proxyxhains and a Socks5w/auth, however, I don't use udp trackers |
Hi, I would like to avoid using docker for the moment and would like to try to setup a vm myself. or should I install a proxy? what hsould I do? I can't find any rtorrent.rc example for that kind of connection. Anyone can link a copy or tell me which parameters to change? How can I tell it to forward all traffic to the vpn interface? |
How exactly? :) There are multiple ways to achieve this, but there's a powerful approach to this problem on Linux:
Take a look at these how to auto bind to an ipv4 address or set the local ip.
Again, if you use I guess I'll write a small WIKI page about this when I'll have time. |
I've just created a VPN with Traffic Splitting WIKI page, still fresh and warm :) |
@chros73 Sorry for the delay of the answer but I got caught up and then I forgot since nobody from the mods or the contributors were able to bring a simple "yes or no" answer to this question " is socks5 proxy supported?" So I did look at your guide and it was far more sophisticated than my way of doing it.
So yes it's not as pretty and beautiful as your way @chros73 but it's still a way. Side Note: it's strange that archlinux or rtorrent needs to consider that as independent traffic to make it work (contact trackers, receive packets, if not all the torrents are in time out) while I can ping and traceroute trough that interface without creating any tables. But I want to go to the new syntax even if it is for me a pain in the ass to understand and especially when I found that the ones who have written it, havemade assumptions about the ones who were supposed to read and understand it. So in the new syntax there are quite new big methods apparently, and several of them, are about proxy of different kind if I have to guess from the name of those methods or variables like So I would like to know once and for all(if possible): Thanks in advance for all the help I can get, after that if I have a better understanding of what's going on then I will make a proposition to make a better docfor the end-user than what it is right now. The end-scenario here, is simple. If proxy socks5 method is implemented like we've seen anywhere else, then no need of special setups. All the traffic would be redirected to the server which would be a 'local' IP address then the server would be in charge to redirect this traffic and obfuscate it. |
There's a lot of questions packed into your comment, so forgive me if I don't just give a simple "yes or no" answer.
The old syntax has been deprecated since version 0.8.7, there are a few remaining short forms that work only in .rtorrent.rc but that's about it. There's a sed script here to update all old commands to the new ones: https://github.com/rakshasa/rtorrent/blob/master/doc/scripts/update_commands_0.9.sed
Your OS doesn't really care about the provider, most of them use OpenVPN under the hood and behave pretty much the same way.
The terminology here is a bit confusing, but it sounds like you have the default route set up to go over the VPN's interface, and have a couple other static routes for the local network and other specific subnets you wanted to override. That's completely normal for VPN usage, regardless of OS or software
Doesn't have to be pretty as long as it works 😄
rTorrent has no knowledge of how the OS is routing things, and it shouldn't need to. It requests a packet to X.X.X.X (optionally on Y bound interface if you have things set up that way) from the OS, and the OS sends it through its routing table.
It is a bit complex, https://rtorrent-docs.readthedocs.io/en/latest/cookbook.html is a decent start to understanding it.
See https://rtorrent-docs.readthedocs.io/en/latest/cmd-ref.html and the aforementioned comment about the old syntax.
Yes (for certain definitions of "proxying").
No, although your socks5 server may support proxying raw HTTP requests.
VPNs and proxies are different things. Ideally, it should be two commands at most though: network.proxy_address and network.http.proxy_address.set.
Not sure which variable you mean, but VPNs and proxies are different things and solve different problems. A VPN will almost always be more secure than a proxy, but if you really want to use a proxy instead, that should still be possible.
In rtorrent, pretty much everything is considered a string unless specified otherwise, but I'd need a specific example (or a link to the specific docs) to say anything more.
Again, proxies don't aim to solve the same problem as a VPN, and are not as secure for even just obfuscation purposes. I'm not sure what the point of a local proxy would be if obfuscation is the goal, but you could do it if you wanted. |
@kannibalox don't take it the wrong way but you divide my text and so you didn't understand the context of it and so you didn't understand the differences between a question and an exhibition of what I know and what I'm used to, which the goal was to give context to what I was saying. And certainly that I didn't express myself in an enough clear way. I'm the author of many articles on stackoverflow or other communities or blogs about the need to put in place different tables for several NICs when they need to act independent and need to act as a gateway too internet like on ubuntu. And I did that, because I was the first to contact the devs from netplan.io implemented on ubuntu when canonical have made the transition to their package. So I'm pretty used to put in place different tables to separate traffics and to give the system the ability to send packets to internet or to multiples LANs which are not directly connected to the Host in a independent way. Maybe you never did that, and maybe you are a bit disturbed by what I've just said but it's like that. And I was giving the example of traceroute or ping, because for those programs you don't need to create new tables through a virtual interface like tun0 to get an answer from the destination. So the first time I had to create new tables for rtorrent, I was a bit disturbed since for other programs they don't need to but well for rtorrent while you are still giving it the interface with it has to be bounded with (like you do with ping or traceroute). Which is not true when you try to send a ICMP packet through the secondary physical(not virtual) interface whitout having set up different tables, because then you would have only timeouts. Still context, not question. So I pretty well know what's the difference between a VPN and a proxy. I have read the docs also and the different wikipages too from rtorrent. If I didn't, do you really think I would know the name of such a variable : and yes So here is a question : what does About the goal, the goal was (was because you answerd me about the socks5 question) to make acting rtorrent as any other programs to use the proxy address instead of binding to ipv4 tun0 and create new tables. But since you told me that there is no socks5 proxying supported, and I don't think that this proxy of my vpn provider is supporting raw http request, it does settle the problem. now to answer your misunderstanding about vpn and proxies and what I said. Why was I saying that he end user is entering the proxy of their vpn provider, because the end user wouldn't in most cases setup a vps on digitalocean or OVH to vpn to it and to activate a socks5 proxy on it to redirect all their traffic through the proxy into the vpn for obfuscation. And yes I'm talking about the 2 things at once, not because I'm confused about one another but because those 2 goes really really really often together because they are complementary. Especially in torrents usecases. That's why some or a lot of vpn providers does implemented both and recommend their uses for obfuscation for torrents. Mullvad does it, ipvanish does it, nordvpn if I remember correctly, vyprvpn, black... etc.... Thanks for the sed script, I didn't know the context of this script before and so I wasn't sure, but anyway I prefer to do my scripting first by myself and then verify with the sed, to be sure to master the whole thing. About the split tunneling, I know that the OS doesn't care about the origin of the vpn provider, I was totally not saying that. and again I was talking about split tunneling to give context here and refer to what chris did say. And you didn't understand what I was saying about the 2 independent traffics going through several NICs on the same host. I wasn't talking about the vpn setup but well doing an analogy about how you need to setup a host with several NICs which does need to work indepently from each other. And in the case of the implementation of the split tunneling from mullvad, it's just that they don't replace the default gateway when you connect in split tunneling mode, and just add new routes for their LAN. another question: as there is no socks5 proxying then why there is 2 sets of commands and/or variables? (or because you don't seem to remember that variables is the term in the ref docs)
and
For me the simple assumption was that the first set was for the http proxying and so only trackers request would go that way. The other one, was for other kind of socks proxying for the whole traffic to go that way. But maybe I'm wrong and maybe it's totally something else? On the side, I wanted to ask you a personal question about your use, because I've interpretated your text as like I was coming from Mars and not doing the right things. Like hoping for proxying or for no trouble about binding rtorrent to another interface and not have timeouts without having to set up new tables just to make rtorrent works. If I have misinterpretated, sorry about that but it did feel like it. So how did you set up or how would you set up the whole thing then since setting new tables for it seems not right. What am I doing wrong and why it does not work if I don't do it (if of course I was not supposed to set up new tables)? Thanks of course for all the informations you gave and explanation and for your time. This was not an aggressive message in any way, it just appeared to me that I wasn't being understood apparently and so I had to add new context and more explanation to be understood. |
I wanted to explicitly separate out the proxy questions vs the VPN/syntax/other questions, given that this ticket was initially opened about proxy support specifically. Apologies if that came off badly. To similarly address the proxy questions:
Strings in rTorrent can be unquoted (sometimes), but it's safer to quote them, and only double quotes are allowed.
You were pretty close,
I've set up rtorrent with |
No problem, I was certainly not being clear enough, I know when I'm writing is always drafty. No problem for the support about VPN, if you ever want to share what you did, or if you use the same setup as described than chris then I'm always available on IRC on ##rtorrent, same nickname. I'm using riot.im so I'm receiving offline messages too :) 👍 |
Just a note about using proxy: I used privoxy for a bit and it worked well (before I went on the full VPN route). |
So, there's still no simple solution to a well-researched problem? |
A feature not being implemented is not the same as a problem. |
With So now you can use socks5 with
Note that you have to use |
So funnily enough, I tried network.http.proxy_address.set by itself and it didn't seem to work, one of my trackers I was testing on reported my non-proxy IP on the tracker's website. I then set ruTorrent in "Advanced" settings |
All ruTorrent/flood do is call |
Setting
I'm using the format The error message isn't useful, so I'm at a loss what to do with this. |
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:
in .rtorrent.rc
It cannot download any data from tracker.
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
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
The text was updated successfully, but these errors were encountered: