rTorrent (FloodUI) OpenVPN integrated

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
Hi all,

It's me again! :) This time i have something similar to the jd2-openvpn container for you!

- Docker container for "rTorrent (with FloodUI) OpenVPN integrated"

As the name may says it already this App offers the following features:
  • Starting and maintaining active OpenVPN connection of your choice (capable of User/Pass/Cert authentication)
  • Starts rTorrent Service
  • Start FloodUI

All configuration files can be edited an accessed from outside the docker container on the usual /opt/appdata/rflood-openvpn/ path.

A detailed Guide and instruction can be found at:

The Pull Request can be viewed at:
- Github: https://github.com/PGBlitz/Apps-Community/pull/41

Once the pull request is merged, you can install the App by the usual community install script of pgblitz. If you can not wait, you can find the yml at: Github

Short Usage:
  • Install the app
  • modify the VPN configuration to your needs
  • wait about 1-2 min till the service is restarted, you can verify by the "my-external-ip.txt" in /opt/appdata/rflood-openvpn/
  • access your page and login with Torrent:Torrent (you should not need to enter the cgi params, if yes - Githab README.md (127.0.0.1:5000)
  • Enjoy

Feedback is welcome and needed! :) If this is a success, i will create other popular frontends as well for you guys. So everyone can be satisfied. :)

Cheers and Enjoy
H1f0x
 

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
UPDATE#2: Added Sonarr support. Modification at the nginx.conf was needed. You can configure Sonarr like this:
  1. Name: rflood-openvpn
  2. Enable: Yes
  3. Host: rflood-openvpn
  4. Port: 8080
  5. Username & Password: empty
 
Last edited:

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
UPDATE#3: Modified rTorrent handling:

- Downloads will be copied to /mnt/downloads/rflood-openvpn, the original files will remain at /mnt/incomplete/rflood-openvpn to proceed seeding. (Info: Once the downloads hit /mn/downloads/rflood-openvpn/ they get moved to /mnt/move/rflood-openvpn -> /mnt/unionfs/rflood-openvpn - Sonarr needs to monior this path.)
- force a re-hashing after the files get copied - without it bugged sometimes.
- added `log-append /config/vpn/openvpn.log` to the client.conf for logging of vpn
 

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
UPDATE#4: Added tagging support

- Downloads which are tagged for example with "tv" will be copied once their completed to /mnt/downloads/rflood-openvpn/tv
- Downloads which have no tag will be copied on default to /mnt/downloads/rflood-openvpn/unsorted
 
  • Like
Reactions: MrDoob

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
UPDATE#1: It's now available within pgblitz itself: "rflood-openvpn"! Enjoy!
 

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
It is Torrent:Torrent :) And yep i'ts on the Github and Docker Link hehe :)
 

SirTranceALoT

Blitz Samurai
Staff
317
127
Ha this sounds good!
 

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
The docker file for sonarr is still in queue - in max 30min it should be ready!!

Detected an issue currently:

When the downloads are finished and getting moved to /mnt/downloads/rflood-openvpn

They get uploaded to /mn/move -> /mn/unionfs/rflood-openvpn

After that.. the client is not able to detect them again.. :(

Any suggestions about this? how do other clients get around this? :(
 
Last edited:

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
solution found. docker image is currently updating, should work in a few minutes :)
 
  • Like
Reactions: MrDoob

hooper

Blitz Samurai
Staff
Donor
311
112
I added a line to the client.conf to redirect the openvpn log to /opt/appdata/rflood-openvpn/ so I could see what errors are occuring with openvpn (I am having problems connecting).

log-append /config/openvpn.log

This revealed the following error:

[icode]RESOLVE: Cannot resolve host address: rflood-openvpn.xxxxxx.xxxxx.xxx:1195:1194 (Name or service not known)[/icode]
I fixed this error by changing the 'remote' configuration value to my server IP address in the client.conf file. I also took out the colon between the IP and the port, as that seems to be incorrect.

However, now I get the following error:
TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
TLS Error: TLS handshake failed


What values do we use for dhcp-option DNS? What should I be using for the 'remote' entry in client.conf? I have Port Guard and PG Shield enabled in PG (options 2 and 3 from PG main menu). Could that be contributing to the new error? do we need to explicitely add ports 1194 and 1195 in the docker config?
 
Last edited:
  • Thinking
Reactions: H1f0x

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
Oh that's a nice idea, i will take this into the default build! :)

Alright. My scenario is the same: PortGuard enabled, PG Shield deployed.

What i have in my config is the following for the remote server:

Code:
remote sweden-2-ca-version-2.expressnetw.com 1195
This works for my expressvpn in this case perfectly.

Generally you need to adapt the config to your needs. what you can try is:

Code:
docker exec -it rflood-openvpn /bin/bash
and try to telnet or ping your remote host. (It's possible that telnet needs to be installed with: yum install telnet)

The ports are not needed - i have successfully running it with the image you can download. Since the connection will be build outgoing from within the container and is not etablished by a inbound request first.

EDIT#4839.. : I should have deleted the port number as well in de fault conf.. i see this is maybe confusing.. you can use whatever port is needed :) just take the format above.
 
Last edited:

hooper

Blitz Samurai
Staff
Donor
311
112
OK, i got this working now. I was using the wrong IP for the 'remote' option in the client.conf. Once I got that fixed, everything is working.

Nice job!

If anyone is using Nord VPN I can confirm that this solution works. If you have any question on config with Nord just let me know and I can try to help.
 
  • Like
  • Love
Reactions: MrDoob and H1f0x

MrDoob

Administrator
Project Manager
Donor
1,393
397
@H1f0x

Made a pull for community app ;-)
 

hooper

Blitz Samurai
Staff
Donor
311
112
@H1f0x how does the completed download copy work? All of my completed downloads are still in /mnt/incomplete/rflood-openvpn/ The process to copy or move them to /mnt/download/rflood-openvpn/ doesn't seem to be working.

ok, so looking the the logs I see the problem:

cp -f /output/incomplete/Travel.Man.48.Hours.In.S05E03.Amsterdam.1080p.HEVC.x265-MeGusta /output/complete/
cp: omitting directory ‘/output/incomplete/Travel.Man.48.Hours.In.S05E03.Amsterdam.1080p.HEVC.x265-MeGusta’
--- Error ---


running this same command from the host shows this error cp: -r not specified; omitting directory

so we need to add the -r option to cp
 
Last edited:

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
thank you for the feedback! I will verify that, for me "-f" is working, but i will extend the copy command then in the base config.
 

mujambajecha

Blitz 3rd Class
3
1
Was this issue resolved? I have been experiencing the same problem. If it requires a minor script change, can anyone advise what to change.
 

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
Thats really strange, when I want to reproduce this issue everything is working. The new build is on the way without the "-r" option. The docker container is currently building. Give it an hour or so.

If you want to you can change the rtorrent.rc file on the following line:

Code:
# Original
Line: 107
method.set_key = event.download.finished,move_complete,"d.stop=;execute=mkdir,-p,$d.get_finished_dir=;execute=cp,-fr,$d.get_base_path=,$d.get_finished_dir=;d.start=;d.hash"


#Fix
method.set_key = event.download.finished,move_complete,"d.stop=;execute=mkdir,-p,$d.get_finished_dir=;execute=cp,-f,$d.get_base_path=,$d.get_finished_dir=;d.start=;d.hash"
Cheers
H1f0x
 
  • Like
Reactions: mujambajecha

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
Updated the docker image for better performance and correct behaviour. Check the "UPDATE#3" comment at the first post.
 

shatdueces

Blitz 1st Class
Staff
Donor
72
11
Only issues I have had was the following.
Port 50000 needed to be mapped through the container.
REcomend changing to port 5000
My Torrent provider is now saying im connecting from more than one IP. does this by Default VPN to a site?
 

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
If i remember your issue correctly you are not using the vpn part of this container right? Shortly explained why i do not map this port with vpn:

When the vpn is active all traffic will be rerouted through the vpn tunnel, this means the configured port 50000 in the rtorrent.rc configuration will also be routed through the tunnel and is "exposed" at the external ip address of the vpn tunnel. Thats why it's not needed to map the port when using it with vpn.

No, if you have no valid vpn configuration no vpn connection can be established. The only possibility is that you have another vpn box running with docker, since in normal docker mode you are all behind the same ip address.
 

shatdueces

Blitz 1st Class
Staff
Donor
72
11
I saw your update with it copying the files to another location. Does this include extraction now? or is it still just moving the RAR files.
 

H1f0x

Administrator
Original poster
Project Manager
Donor
105
50
currently there is no extraction implemented. I haven't figured out yet how to do this properly on a stable base sadly.
 

freeloader

Blitz 2nd Class
46
10
Many thanks for this! It sounds great and it was something I have been looking for in this community.

Could you perhaps provide some more fool-proof instructions on how to configure the open vpn?

The only instruction in the wiki's is:
Prepare an OpenVPN configuration of your choice. An automated login by username/password is also possible with the "user-pass-auth" parameter in the client.conf
Which unfortunately goes a bit over my head. I assume that this means we manually need to change the conf file located in /opt/appdata/rflood-openvpn/vpn?

The conf file isn't exactly self-explanatory if you have never tinkered with rtorrent or openvpn :)

Could you perhaps explain which options we need to change and which we should leave untouched (and, if we need to change everything, what each of these does).

If I understand well, there are multiple methods of connecting the VPN, it would be great if you could give a basic overview of what to do for each.

Thanks!

EDIT: I figured out how to get it to work by following some of the post in the other thread (https://pgblitz.com/threads/rtorrent-rutorrent-openvpn-integrated.4179/#post-26343 ).

If there are any other noobs reading this later on: essentially, the config is apparently a standard open vpn config file with a few limited changes. The easiest way to configure this is just to Google "[NAME OF YOUR VPN PROVIDER] .ovpn file". Paste the contents of that file into client.conf and add the following lines to the end of client.conf:

auth-user-pass /config/vpn/vpn.auth

up /usr/bin/up.sh
down /usr/bin/down.sh

log-append /config/vpn/openvpn.log
script-security 2
Now, change vpn.auth and add your VPN username and password.

You should be good to go, restart the docker container and check the "my-external-ip.txt" file.
 
Last edited:

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads


Development Donations

 

Trending