Jump to content
binhex

[Support] binhex - rTorrentVPN

2501 posts in this topic Last Reply

Recommended Posts

4 minutes ago, Cull2ArcaHeresy said:

this method requires restarting the container, any reason to not have the line where an openvpn connection is established to pick a random *.ovpn file? Been meaning to try it, just havent yet. This way whenever it resets the connection it will try a new one (or pick the same again as random).

I tried but gave up. Binhex scripts are too complex for my amateur head. I managed to get openvpn to load with a random .ovpn file but it fails the privoxy and rutorrent stage. I have got my stuff on git so feel free to have a look if it helps in any way.

https://github.com/testdasi/rutorrentvpn-plus-plus/tree/master/stuff

Share this post


Link to post
55 minutes ago, testdasi said:

I tried but gave up. Binhex scripts are too complex for my amateur head. I managed to get openvpn to load with a random .ovpn file but it fails the privoxy and rutorrent stage. I have got my stuff on git so feel free to have a look if it helps in any way.

https://github.com/testdasi/rutorrentvpn-plus-plus/tree/master/stuff

in all fairness this is non trivial, the problem is very simple but the solution is not, one of the issues is around dns, as i block dns to prevent any leakage, so name resolution when switching vpn endpoint would not be possible when the openvpn connection goes down, or in the case of pia, when you cannot allocate a incoming port., there are other issues too around env var's for the remote line and passing these around to child shell processes.

 

picking a random ovpn file at startup is trivial, but of course then requires manual intervention from the user to restart the container.

Edited by binhex

Share this post


Link to post
36 minutes ago, binhex said:

in all fairness this is non trivial, the problem is very simple but the solution is not, one of the issues is around dns, as i block dns to prevent any leakage, so name resolution for another vpn endpoint would not be possible when the openvpn connection goes down, or in the case of pia, when you cannot allocate a incoming port., there are other issues too around env var's for the remote line and passing these around to child shell processes.

 

picking a random ovpn file at startup is trivial, but of course then requires manual intervention from the user to restart the container.

i had assumed that it more or less did something like 1-[ established vpn conn ], 2-[ locked down connections (including dns) ], 3-[ started rtorrent/rutorrent ], 4-[ monitored connection and if need be kill *torrent and go back to #1 ]

 

knowing the dns issue (and yea docker env variables are a pain to change), it is a much more closed locked down system :) Can a container restart itself? Rough idea that is it counts number of fails (connection or pia forward), and at some arbitrary threshold it restarts (or kill itself with the restart flag in docker command)? Could always have it create a file when that threshold is met and a script running on unraid sees the file, deletes it and restarts the container...but idk if it is a big enough problem to do that.

 

just to be clear, all pia with same creds or all other with same creds. Im not against mixing them, but being the same for simplicity.

Share this post


Link to post
17 minutes ago, Cull2ArcaHeresy said:

like 1-[ established vpn conn ], 2-[ locked down connections (including dns) ], 3-[ started rtorrent/rutorrent ], 4-[ monitored connection and if need be kill *torrent and go back to #1 ]

 

no it is a lot more locked down than that, more like:-

 

1. read in ovpn file

2. resolve endpoint and store answers

3. block using iptables

4. start openvpn client

5. start app

 

there are other checks in place, such as port forward assignment and remote ip address resolution too, all of which must start in a particular order to prevent any chance of ip leakage, as well as a tight looped dns check to ensure we have internet connectivity.

 

 

Edited by binhex

Share this post


Link to post
33 minutes ago, Cull2ArcaHeresy said:

an a container restart itself?

potentially yes, you could kill pid 1, this would then cause the entire thing to collapse, but you would need to ensure that the restart flag is set on the container otherwise it would be in a stopped state, this would also mean an unclean shutdown as you are in essence pulling the power plug.

 

edit - just so we dont forget, this is all nice and all but wont be of any use with pia right now, as all endpoints (pretty much) are screwed when it comes to port forwarding 🙂

Edited by binhex

Share this post


Link to post
19 minutes ago, binhex said:

potentially yes, you could kill pid 1, this would then cause the entire thing to collapse, but you would need to ensure that the restart flag is set on the container otherwise it would be in a stopped state.

compared to a "graceful stop", would this cause any issues like rtorrent corrupting a file or leakage (or other)? Also not a hard threshold, but a count that resets each hour might be much better so a series of reconnects over time wouldn't cause a restart.

Share this post


Link to post
Just now, Cull2ArcaHeresy said:

compared to a "graceful stop", would this cause any issues like rtorrent corrupting a file or leakage (or other)?

possibly, yes.

Share this post


Link to post

Hello maybe binhex will make wireguard integreted

Sendt fra min ONEPLUS A6003 med Tapatalk

Share this post


Link to post
1 minute ago, kagzz said:

Hello maybe binhex will make wireguard integreted

Quote

Native wireguard support on their next-gen network is currently not possible (hacks are available but they are fragile!).

 

Share this post


Link to post
 
Sad. I dont get fast speed with opvn.

Sendt fra min ONEPLUS A6003 med Tapatalk

Share this post


Link to post

this maybe of interest to anybody using pia:- 

 

Share this post


Link to post

Changing of pia vpn files to get to different endpoints while whatever is going on, what is the best way to measure "quality" for each? There are different tools to measure container stats but also connecting directly to rtorrent could give data. I have enough seeding torrents that that should be constantly at limit (when connection is good), fewer downloads but that would be easy to change. Trying to figure out the best way to keep track of upload and download for each vpn file. Being early on this would be raw totals for each day and later being more of a line graph probably. Raw scaled by how many hours that vpn file was used that day (other options too like hourly average, but that is a later thing).

 

So say your connection is bad right now, you stop the container and run this script that would give you a list of vpn files and their daily quality history (from your runs) and ask you to select which one you want to copy in for the container to use. Then you start the container again and it will connect using the chosen file. While container is running this script is logging the network usage.

Share this post


Link to post

hey guys, i'm having trouble setting up jackett rss feeds with vpn on (mullvad if it matters).  Works fine with vpn turned off, but with vpn turned on it cannot connect to jackett.

 

example rss from jackett:  http://10.0.0.186:9117/api/v2.0/indexers/limetorrents/results/torznab/api?apikey=xxxxxxx=search&cat=&q=

 

i do have LAN_Network set to 10.0.0.0/24 in the docker config.  Is there any other setting i'd need to fix?

 

thanks for any input!

Share this post


Link to post

Has anyone who switched to Mullvad get port forwarding to work?  I know the strict port forward is ignored if don’t have PIA, but I’ve added a port forward for my account over at Mullvad and have gone into ruTorrent front end and choose settings > connection > port used for incoming connections and set it to the port and even tried 1234-1234 where 1234 is the real port number. It doesn’t do anything for me. The status icon at the bottom is still a red exclamation mark. 
 

I have a gigabit connection and without port forwarding I get about 60MB/sec on a well seeded torrent, I used to get as high as 85MB/sec with PIA and port forwarding enabled. 
 

EDIT: I should add I copied the rtorrent.rc file to .rtorrent.rc with the ports specified from Mullvad and the port status still is red. :(

Edited by cardo

Share this post


Link to post
On 9/9/2020 at 5:58 AM, binhex said:

So where does that leave us?, well not quite up sh*t creek without a paddle :-), you can set 'STRICT_PORT_FORWARDING' to 'no' and this will then allow you to connect to any legacy endpoint, however this will mean you wont have a working incoming port so speeds will be lower than usual - its not ideal i know, but its the best we have got right now until PIA sort their sh*t out (not happy).

its 'STRICT_PORT_FORWARD' for the variable

 

wasnt working and was using this reference instead of the faq you have

 

Always refer to the faq lol

Share this post


Link to post

Is it possible to configure this container to work without a VPN? Or can I just install the non-VPN container and copy the appdata folders over to save everthing I'm seeding?

Share this post


Link to post
34 minutes ago, Spies said:

Is it possible to configure this container to work without a VPN? Or can I just install the non-VPN container and copy the appdata folders over to save everthing I'm seeding?

Have you tried setting VPN_ENABLED to "no"?

Share this post


Link to post
16 hours ago, Cessquill said:

Have you tried setting VPN_ENABLED to "no"?

Yes but my port is reported as closed, even though i have tripple checked everything is set correctly.

 

Docker mapping has 172.17.0.2:51413/UDP192.168.1.253:51413

 

I have that port forwarded on my router, both UDP and TCP, I've edited the rtorrent.rc file to include the port also.

Edited by Spies

Share this post


Link to post
3 minutes ago, Spies said:

Yes but my port is reported as closed, even though i have tripple checked everything is set correctly.

Are you sure you have forwarded a port correctly in your router? Post a screenshot of the forwarding settings maybe

Share this post


Link to post
2 minutes ago, strike said:

Are you sure you have forwarded a port correctly in your router? Post a screenshot of the forwarding settings maybe

 

2020-09-14 (2).png

Share this post


Link to post

Looks ok. I think I remember someone posted that the port checker was broken or something, dunno if that's the case. If you can seed ok the port should be open.

Share this post


Link to post
16 hours ago, Spies said:

Is it possible to configure this container to work without a VPN? Or can I just install the non-VPN container and copy the appdata folders over to save everthing I'm seeding?

If VPN = no doesn't work for you then you are better off with a non-VPN docker (e.g. LSIO rutorrent).

I would imagine it's somewhat trivial to install a test run of the LSIO docker and match + cp appdata over.

 

Share this post


Link to post
6 minutes ago, strike said:

Looks ok. I think I remember someone posted that the port checker was broken or something, dunno if that's the case. If you can seed ok the port should be open.

My sites also report the port as closed (unconnectable).

Share this post


Link to post
3 minutes ago, Spies said:

My sites also report the port as closed (unconnectable).

post your rtorrent.rc file

 

btw try this site to confirm connectivity, you will need to enter in your isp assigned ip address and the port you have defined if you are not using a vpn:-

https://www.yougetsignal.com/tools/open-ports/

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.