I feel like I'm so close to getting this container set up using SlickVPN. But the container has managed to come up completely only once, and it still didn't really work. Currently, this is where I'm at. The supervisord.log seems to indicate a good start, but always ends up in some sort of loop with messages like these:
2017-09-17 22:43:11,828 DEBG 'start-script' stdout output:
Sun Sep 17 22:43:11 2017 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Sun Sep 17 22:43:11 2017 TLS Error: TLS handshake failed
My host can hit the internet just fine, and so can my other docker containers so I don't think network connectivity is the issue.
I use the following script to create my container. Just so it's clear -
check_root.sh checks that the script is executing under root privileges
check_service_user.sh makes sure that the user in USERNAME exists, and parses out USERID and GROUPID for use later in the script
create_shared_directory.sh makes sure DIRECTORY exists, and if it doesn't, creates it, chowns it to the deluge user and the media group (a group all my service accounts share)
Also, ifconfig reports that my IP address is 192.168.1.230 and my netmask as 255.255.255.0, so I think I have my value for LAN_NETWORK right.
#!/bin/bash
. ~/check_root.sh
USERNAME=deluge
VPNUSER=$1
VPNPASS=$2
. ~/check_service_user.sh
CONFIGDIR=/srv/delugevpn
OPENVPNDIR=$CONFIGDIR/openvpn
DOWNLOADSDIR=/srv/downloads/delugevpn
INCOMPLETEDIR=$DOWNLOADSDIR/incomplete
TVDIR=$DOWNLOADSDIR/tv
MOVIESDIR=$DOWNLOADSDIR/movies
DIRECTORY=$CONFIGDIR
. ~/create_shared_directory.sh
DIRECTORY=$OPENVPNDIR
. ~/create_shared_directory.sh
DIRECTORY=$DOWNLOADSDIR
. ~/create_shared_directory.sh
DIRECTORY=$INCOMPLETEDIR
. ~/create_shared_directory.sh
DIRECTORY=$TVDIR
. ~/create_shared_directory.sh
DIRECTORY=$MOVIESDIR
. ~/create_shared_directory.sh
chmod -R g+x $DOWNLOADSDIR
echo Downloading SlickVPN config to $OPENVPNDIR
curl https://files-slickvpn.netdna-ssl.com/config_files/SlickVPN.ovpn > $OPENVPNDIR/SlickVPN.ovpn
chown $USERNAME:media $OPENVPNDIR/SlickVPN.ovpn
echo Creating Deluge+OpenVPN+Privoxy Docker container with user: $USERNAME[uid=$USERID,gid=$GROUPID]
docker run --restart=always \
-d \
--cap-add=NET_ADMIN \
--name=delugevpn \
-p 9905:8112 \
-p 9906:8118 \
-p 58846:58846 \
-p 58946:58946 \
-v $DOWNLOADSDIR:/data \
-v $CONFIGDIR:/config \
-v /etc/localtime:/etc/localtime:ro \
-e VPN_ENABLED=yes \
-e VPN_USER=$VPNUSER \
-e VPN_PASS=$VPNPASS \
-e VPN_PROV=custom \
-e ENABLE_PRIVOXY=yes \
-e LAN_NETWORK=192.168.1.0/24 \
-e NAME_SERVERS=208.67.222.222,208.67.220.220,8.8.8.8,8.8.4.4 \
-e DEBUG=true \
-e PGID=$GROUPID \
-e PUID=$USERID \
binhex/arch-delugevpn
Anyone have an idea of what I'm doing wrong?
supervisord.log
SlickVPN.ovpn