[Support] binhex - DelugeVPN


Recommended Posts

22 hours ago, ElectricBadger said:

However, Deluge refuses to connect and download anything — all torrents just sit at "downloading 0.00%" and all trackers time out.

 

have you configured deluge correctly?, you need to setup where its writing to for completed/incomplete, it should be writing to /data, which will be a volume mapping to your hosts fs.

Link to comment
30 minutes ago, brettm357 said:

Main key to success was changing Deluge from /data to /downloads

 

Unless there is a better way ??

 

Not strictly correct, the main key to success is that the applications configured download location (the container volume path) AND the host volume path ARE EXACTLY THE SAME for ALL DOCKER CONTAINERS that need to interact.

 

Read that bold section, then read it again, then get the tattoo on your arm, and lastly say it last thing before you get in bed :-)

 

So for example:- -v /mnt/cache/appdata/downloads:/data must be consistent throughout all containers, with the application set to /data.

 

Keep in mind /data can actually be called anything, it just needs to be the same, using a mix of /data and /downloads = failure, as does a mix of different host paths.

Link to comment
3 hours ago, binhex said:

 

have you configured deluge correctly?, you need to setup where its writing to for completed/incomplete, it should be writing to /data, which will be a volume mapping to your hosts fs.

 

Yup, that's all correct:

 

5a577ec5d6cee_ScreenShot2018-01-11at15_09_38.thumb.png.85d4e1d6da77f4a4d9fe58a1b9b21d55.png

 

5a577ed0dceb1_ScreenShot2018-01-11at15_10_33.thumb.png.3cc3481479a6866d49a0b1dd1de7271c.png

 

/mnt/user/downloads/incomplete_torrents and /mnt/user/downloads/completed_torrents both exist and are mapped correctly when I look inside the docker with docker exec bash.

 

It seems to be an issue with connecting over the VPN though, as I said, it can download the blockfile OK so it must be getting out somehow!

 

Is there anybody else using PureVPN? I'm using the server they said was p2p-enabled — here's the .ovpn file:

 

remote nl2-ovpn-udp.pointtoserver.com 53
client
dev tun
proto udp
persist-key
ca ca.crt
tls-auth Wdc.key 1
cipher AES-256-CBC
comp-lzo
verb 1
mute 20
route-method exe
route-delay 2
route 0.0.0.0 0.0.0.0
auth-user-pass credentials.conf
auth-retry interact
explicit-exit-notify 2
ifconfig-nowarn
auth-nocache

 

Link to comment
38 minutes ago, ElectricBadger said:

It seems to be an issue with connecting over the VPN though, as I said

 

if you can see the web ui then you are connected to the vpn tunnel, its designed that way, thus i suspected something more like config, which it looks like it isnt according to your screenshots ok so follow this procedure, lets take a look at the log:-

 

 

Link to comment

How to set up ProtonVPN in Deluge

 

I thought I'd share how I configured binhex-delugevpn to use ProtonVPN for those fellow paying ProtonVPN users. I don't know if this will work for the free VPN service - likely not. Your milage may vary.

 

Prerequisites
Go to https://account.protonvpn.com/ and obtain:

  1. ProtonVPN OpenVPN username and password.
  2. Openvpn.config file for P2P. As of this post, look at the country pages under your downloads account page and look for the icon with opposing arrows.5a5816f4d63b6_ScreenShot2018-01-11at8_09_18PM.png.c71bb5413de5e7ce5590f65f39d11619.png Select the Linux platform (although it may not make a difference) and UDP. I have not tested TCP.

Steps

From the OpenVPN configs, we need to create two new files. The first must be called openvpn.ovpn and have the following lines, but take the appropriate stanzas from the downloaded configs:


remote <from downloaded configs; you may be able to put multiple remote stanzas for failover>

client
dev tun
proto udp

server-poll-timeout 20

remote-random
resolv-retry infinite
nobind
cipher AES-256-CBC
auth SHA512
comp-lzo
verb 3

tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key

ping 15
ping-restart 0
ping-timer-rem

remote-cert-tls server
auth-user-pass
pull
fast-io

script-security 2

auth-user-pass credentials.conf

tls-client
ca ca.rsa.2048.crt
disable-occ

key-direction 1
<tls-auth>
# 2048 bit OpenVPN static key
<from downloaded configs, include the BEGIN and END lines>
</tls-auth>

You'll notice your downloaded configs have a block with <ca> </ca> tags, cut that block out that starts at

<ca>
-----BEGIN CERTIFICATE-----

to

-----END CERTIFICATE-----
</ca>

and paste it to a new file called ca.rsa.2048.crt, but this file won't need the <ca> </ca> tags. It should just have the text including and between the BEGIN and END lines.

 

You'll notice that the template mentions a credentials.conf, this is created when the Docker image is saved.

 

Take the ca.rsa.2048.crt and openvpn.ovpn and copy them to the appdata/binhex-delugevpn/openvpn directory.

 

Next step is to edit the Docker image:

Host Port 1: 8112
    Container Port: 8112
Host Port 2: 58846
    Container Port: 58846
Host Port 3: 58946
    Container Port: 58946
Host Port 4: 58946
    Container Port: 58946
Host Port 5: 8118
    Container Port: 8118
Host Path 2: /mnt/user/Deluge/data (or where ever you have it setup)
    Container Path: /data
Key 1: yes
    Container Variable: VPN_ENABLED
Key 2: <Your ProtonVPN OpenVPN username>
    Container Variable: VPN_USER
Key 3: <Your ProtonVPN OpenVPN password>
    Container Variable: VPN_PASS
Key 4: custom
    Container Variable: VPN_PROV
Key 5: -none-
    Container Variable: VPN_OPTIONS
Key 6: yes
    Container Variable: STRICT_PORT_FORWARD
Key 7: yes
    Container Variable: ENABLE_PRIVOXY
Key 8:    192.168.1.0/24 (or your local LAN address space)
    Container Variable: LAN_NETWORK
Key 9:    8.8.8.8,209.222.18.222,37.235.1.174,209.222.18.218,37.235.1.177,8.8.4.4
    Container Variable: NAME_SERVERS
Key 10:    false
    Container Variable: DEBUG
Key 11:    000
    Container Variable: UMASK
Key 12: 99
    Container Variable: PUID
Key 13: 100
    Container Variable: PGID
AppData Config Path: /mnt/user/appdata/binhex-delugevpn
    Container Path: /config

 

After hitting apply it should create the credentials.conf and start the image. You can't pre-create the credentials.conf, the docker image will likely complain about permissions and not start.

 

Some troubleshooting tips:
To login to the docker image:

docker exec -it binhex-delugevpn /bin/bash

Once inside the docker image, run

dig +short myip.opendns.com @resolver1.opendns.com

to get its IP address. As long as this is different from your actual IP, things should be working.

 

To confirm your IP is hidden, go to https://ipleak.net. It should detect your actual ISP IP, but the Torrent Address detection should be the IP from the above dig command.
 

Note 1: the NAME_SERVERS are ones from when I set up PIA, I don't know ProtonVPN nameservers, the OpenVPN config assigns a private DNS server on my desktop. If anyone has the actual ProtonVPN DNS servers, please comment.

 

Note 2: If you notice that the Tracker status shows timeouts, then likely that VPN remote no longer supports P2P or is too slow. Check the Country Configs and update as needed.

 

Anyway, hope this helps someone.

  • Thanks 6
  • Upvote 1
Link to comment
16 hours ago, binhex said:

 

if you can see the web ui then you are connected to the vpn tunnel, its designed that way, thus i suspected something more like config, which it looks like it isnt according to your screenshots ok so follow this procedure, lets take a look at the log:-

 

 

 

Thanks — should have attached the log in the first place :)

 

supervisord.UPLOAD.log

 

Looks like the "[debug] Waiting for valid IP address from tunnel" part is the problem — it appears to be running 

ifconfig 'tun0' 2>/dev/null | grep 'inet' | grep -P -o -m 1 '(?<=inet\s)[^\s]+'

which returns an external IP when I run it manually.

Link to comment
20 minutes ago, ElectricBadger said:

 

Thanks — should have attached the log in the first place :)

 

supervisord.UPLOAD.log

 

Looks like the "[debug] Waiting for valid IP address from tunnel" part is the problem — it appears to be running 


ifconfig 'tun0' 2>/dev/null | grep 'inet' | grep -P -o -m 1 '(?<=inet\s)[^\s]+'

which returns an external IP when I run it manually.

 

no thats not the issue, it manages to get the tunnel ip address (from your log):-

 

2018-01-12 08:37:44,066 DEBG 'deluge-script' stdout output:
[debug] Valid IP address from tunnel acquired '188.72.98.244'

i think this might be your issue:-

 

Fri Jan 12 08:37:15 2018 ERROR: Linux route add command failed: external program exited with error status: 2

so that is normally a symptom of defining the wrong LAN_RANGE, can you double check this is correct:-

 

2018-01-12 08:37:10.701407 [info] LAN_NETWORK defined as '192.168.69.0/24'

Link to help section if your unsure, Q3:-

 

 

Link to comment
5 hours ago, binhex said:

 

no thats not the issue, it manages to get the tunnel ip address (from your log):-

 


2018-01-12 08:37:44,066 DEBG 'deluge-script' stdout output:
[debug] Valid IP address from tunnel acquired '188.72.98.244'

i think this might be your issue:-

 


Fri Jan 12 08:37:15 2018 ERROR: Linux route add command failed: external program exited with error status: 2

so that is normally a symptom of defining the wrong LAN_RANGE, can you double check this is correct:-

 


2018-01-12 08:37:10.701407 [info] LAN_NETWORK defined as '192.168.69.0/24'

Link to help section if your unsure, Q3:-

 

 

 

LAN_RANGE looks correct to me — the server is at 192.168.69.99, and the local network is 192.168.69.* — could it be the .ovpn file?

 

route-method exe
route-delay 2
route 0.0.0.0 0.0.0.0

Is "0.0.0.0 0.0.0.0" correct there? This is what PureVPN supplied…

Link to comment

Everything is working but i have an issue where deluge with load torrents from radarr and say its downloading but not actually do anything when it finally does its very slow download speed

Any standard settings i need to be checking please

 

I am using ipvanish with proxy socks5 setup within Deluge

Link to comment

So 

On 1/12/2018 at 4:41 AM, binhex said:

 

no thats not the issue, it manages to get the tunnel ip address (from your log):-

 


2018-01-12 08:37:44,066 DEBG 'deluge-script' stdout output:
[debug] Valid IP address from tunnel acquired '188.72.98.244'

i think this might be your issue:-

 


Fri Jan 12 08:37:15 2018 ERROR: Linux route add command failed: external program exited with error status: 2

so that is normally a symptom of defining the wrong LAN_RANGE, can you double check this is correct:-

 


2018-01-12 08:37:10.701407 [info] LAN_NETWORK defined as '192.168.69.0/24'

Link to help section if your unsure, Q3:-

 

 

 

I'm having this issue, too (route add...)

 

To be clear, is LAN_NETWORK supposed to be the actual LAN network, or the Docker network? Or both?

 

I currently have it as the LAN network , 192.168.1.0/24, but the docker network is, from memory 172.17.0.0/16.

 

I'm also having another issue, where the VPN_DEVICE_TYPE is set to 'tun0', then in the iptables rules, it's adding tun00, which clearly isn't right.

 

All of this is on a QNAP server.

Link to comment

Hi! Thanks for your work on this package.

 

I'd like to use the new CA Vancouver endpoint, which is on PIA's list of hosts that support port forwarding, but it appears the getvpnport.sh script in the package doesn't recognize this endpoint as supporting port forwarding, as when run it says:

 

2018-01-14 20:20:45,397 DEBG 'start-script' stdout output:
[warn] PIA endpoint 'ca-vancouver.privateinternetaccess.com' doesn't support port forwarding, DL/UL speeds will be slow
[info] Please consider switching to an endpoint that does support port forwarding, shown below:-

2018-01-14 20:20:45,398 DEBG 'start-script' stdout output:
[info] ca-toronto.privateinternetaccess.com (CA Toronto)
[info] ca.privateinternetaccess.com (CA Montreal)
[info] nl.privateinternetaccess.com (Netherlands)
[info] swiss.privateinternetaccess.com (Switzerland)
[info] sweden.privateinternetaccess.com (Sweden)
[info] france.privateinternetaccess.com (France)
[info] ro.privateinternetaccess.com (Romania)
[info] israel.privateinternetaccess.com (Israel)

 

Could you update this to support ca-vancouver.privateinternetaccess.com as well?

 

Thanks!

Link to comment
On 13/01/2018 at 8:49 PM, Pans said:

VPN_DEVICE_TYPE is set to 'tun0', then in the iptables rules, it's adding tun00, which clearly isn't right.

 

edit - sorry this option is now parsed, so i will look into the removal of any decimal from the value to ensure its correct.

Edited by binhex
Link to comment
6 hours ago, slacker2010 said:

Hi! Thanks for your work on this package.

 

I'd like to use the new CA Vancouver endpoint, which is on PIA's list of hosts that support port forwarding, but it appears the getvpnport.sh script in the package doesn't recognize this endpoint as supporting port forwarding, as when run it says:

 


2018-01-14 20:20:45,397 DEBG 'start-script' stdout output:
[warn] PIA endpoint 'ca-vancouver.privateinternetaccess.com' doesn't support port forwarding, DL/UL speeds will be slow
[info] Please consider switching to an endpoint that does support port forwarding, shown below:-

2018-01-14 20:20:45,398 DEBG 'start-script' stdout output:
[info] ca-toronto.privateinternetaccess.com (CA Toronto)
[info] ca.privateinternetaccess.com (CA Montreal)
[info] nl.privateinternetaccess.com (Netherlands)
[info] swiss.privateinternetaccess.com (Switzerland)
[info] sweden.privateinternetaccess.com (Sweden)
[info] france.privateinternetaccess.com (France)
[info] ro.privateinternetaccess.com (Romania)
[info] israel.privateinternetaccess.com (Israel)

 

Could you update this to support ca-vancouver.privateinternetaccess.com as well?

 

Thanks!

i will add this to the list of supported endpoints, thanks for the details.

Link to comment
On 12/01/2018 at 3:19 PM, ElectricBadger said:

LAN_RANGE looks correct to me — the server is at 192.168.69.99, and the local network is 192.168.69.* — could it be the .ovpn file?

 

yes the line:-

route-method exe

is windows only, so that will cause an issue, you could try removing that line from your ovpn file, if that doesnt work you could also try removal of the lines:-

 

route-delay 2
route 0.0.0.0 0.0.0.0

please let me know if this does fix it, as i can force removal in the startup script.

  • Like 1
Link to comment
17 minutes ago, binhex said:

 

yes the line:-


route-method exe

is windows only, so that will cause an issue, you could try removing that line from your ovpn file, if that doesnt work you could also try removal of the lines:-

 


route-delay 2
route 0.0.0.0 0.0.0.0

please let me know if this does fix it, as i can force removal in the startup script.

 

Bingo! Removing all three lines has fixed the problem. Thanks a lot for your help :D

Link to comment

This weekend I was able to set up the Docker DelugeVPN container.  Never having used Docker before, it was quite a learning curve, but I got it running.  Thanks for providing this and thanks for all the good advice in the forum! .  Could someone point me in the direction of information of how to access Deluge from outside my local network? I have limited experience but was able to get access to the admin gui's for other programs that are  not using a VPN (Sonarr,etc.) but am having no luck moving forward on Deluge.  I'm sure this is somewhere in this forum but I can't find it.  If someone would point me in the right direction, I would be so appreciative. 

 

Also, what role does/should Privoxy have in this configuration? I've used Nginx as a reverse-proxy before but was not able to get it working if I was running a VPN for the whole computer (as opposed to running for a single app).  Can Privoxy be configured to accomplish what I  asked above?

Thanks!

Link to comment

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.