OpenVPN-HyDeSa

OpenVPN-HyDeSa

Docker app from testdasi's Repository

Overview

OpenVPN Client with integrated (NZB)Hydra2-Deluge-Sabnzbd (and HTTP + SOCKS5 proxies). Now with a Web GUI quick launch. High-level instructions: (1) Create an appdata folder in host and create a openvpn subfolder. (2) Copy your OpenVPN configuration to the above openvpn subfolder (must include openvpn.ovpn + credentials + certs). (3) Don't forget to map /data in the docker to the host (you can map the parent or individual subfolders depending on needs). (4) Start docker (other apps should configure themselves on first run). DON'T FORGET THE OVPN FILE!!! Default password for deluge is deluge Set DNS_SERVERS to 127.2.2.2 to use DNS-over-TLS (use google and cloudflare services by default). Your DNS query out of the VPN exit will also be encrypted for even more security. Set it to other services IP's will use normal unencrypted services. Set HOST_NETWORK to your Unraid server network in CIDR format e.g. 192.168.1.0/24. For more detailed instructions, refer to the support thread (https://forums.Unraid.net/topic/96233-support-testdasi-repo/) or project page (https://github.com/testdasi/openvpn-hydesa).

openvpn-hydesa

OpenVPN Client with integrated (NZB)Hydra2-Deluge-Sabnzbd (and HTTP + SOCKS5 proxies).

High-level instructions

  • Create an appdata folder in host and create a openvpn subfolder
  • Copy your OpenVPN configuration to the above openvpn subfolder (must include openvpn.ovpn + credentials + certs).
  • Don't forget to map /data in the docker to the host (you can map the parent or individual subfolders depending on needs).
  • Start docker (other apps should configure themselves on first run).
    • Default password for deluge is deluge

Key features

  1. OpenVPN client to connect to your favourite VPN provider. Full freedom with what you want to do with the ovpn file.
  2. 2 sets of kill switches. NFT kill switch to block connection when VPN is down. Piping kill switch HTTP proxy -> SOCKS5 proxy -> VPN tun0 / TOR tunnel.
  3. Stubby for DNS server to connec to DoT (dns-over-tls) services (ip:53 or 127.2.2.2:5253). Use Google and Cloudflare for best performance.
  4. Dante for SOCKS5 proxy to your VPN (ip:9118)
  5. Tinyproxy for HTTP proxy to your VPN (ip:8118)
  6. NZBHydra2 (ip:5076)
  7. Deluge (ip:8112)
  8. SABnzbdPlus (ip:8080 or ip:8090 for https)
  9. A quick WebGUI launcher (ip:8000) to quickly access the trio of apps above (or as always, just go directly to each app).

Bits and bobs

  • OpenVPN config files MUST be named openvpn.ovpn. The certs and credentials can be included in the config file or split into separate files. The flexibility is yours.
  • Explaining the parameters (the values you see in Usage section are default values)
    • SERVER_IP: IP of the docker host (if bridge network) or the static IP you give to the docker (if macvlan bridge e.g. Unraid br0 / br1)
    • LAUNCHER_GUI_PORT: the GUI quick launcher is accessible at SERVER_IP:LAUNCHER_GUI_PORT.
    • DNS_SERVERS: set to 127.2.2.2 will point to stubby (which in turn points to Google / Cloudflare DoT services). Your DNS queries out of the VPN exit will also be encrypted before arriving at Google / Cloudflare for even more privacy. Change it to other comma-separated IPs (e.g. 1.1.1.1,8.8.8.8) will use normal unencrypted DNS, or perhaps a pihole in the local network.
    • HOST_NETWORK: to enable free flow between host network and the docker (e.g. when using docker bridge network). Otherwise, your proxies will only work from within the docker network. Must be in CIDR format e.g. 192.168.1.0/24
    • DNS_SERVER_PORT: the docker will serve as a DNS server for the local network so everything, including DNS, comes out of the VPN exit.
      • Work best if set to 53 as most things can't handle DNS on other ports. In which case, you have to give the docker its own static IP (i.e. use docker macvlan network) if the host also uses port 53 e.g. if you run a Pihole on the host IP. For Unraid, use Custom : br0 / br1 network (to enable this, go to Settings -> Docker).
      • You will need to set each device DNS to the docker IP.
      • Alternatively, you can set your router DHCP to set DNS to the docker IP.
    • SOCKS/HTTP_PROXY_PORT: use these proxies if you want to exit through your VPN. Useful if you need to route other apps (e.g. Sonarr/Radarr) through the same VPN exit.
    • USENET_HTTP_PORT/USENET_HTTPS_PORT/TORRENT_GUI_PORT/SEARCHER_GUI_PORT: use these to access the GUI of SABnzbdPlus, Deluge and NZBHydra2.
    • The docker port mappings map host ports to docker ports. The docker ports are determined by the aforementioned PORT variables. So if you change the docker variables, you should also change the port mappings accordingly.
      • There is a quirk with the Web GUI quick launcher. On bridge network (i.e. no static IP), if you want to change the port mapping of NZBHydra2 / Deluge / Sabnzbd, please change the ENV variable + the container port + the mapped host port to the same value.
  • Pre-configured NZBHydra2 will attempt drop torrent / nzb files into the respective "black holes", which Deluge / SABnzbdPlus can pick up automagically.

Usage

docker run -d \
    --name=<container name> \
    --cap-add=NET_ADMIN \
    -v <host path for config>:/config \
    -v <host path for data>:/data \
    -e DNS_SERVERS=127.2.2.2 \
    -e HOST_NETWORK=192.168.1.0/24 \
    -e SERVER_IP=192.168.1.2 \
    -p 8000:8000/tcp \
    -p 53:53/tcp \
    -p 53:53/udp \
    -p 9118:9118/tcp \
    -p 8118:8118/tcp \
    -p 8080:8080/tcp \
    -p 8090:8090/tcp \
    -p 8112:8112/tcp \
    -p 5076:5076/tcp \
    -e LAUNCHER_GUI_PORT=8000 \
    -e DNS_SERVER_PORT=53 \
    -e SOCKS_PROXY_PORT=9118 \
    -e HTTP_PROXY_PORT=8118 \
    -e USENET_HTTP_PORT 8080 \
    -e USENET_HTTPS_PORT 8090 \
    -e TORRENT_GUI_PORT 8112 \
    -e SEARCHER_GUI_PORT 5076 \
    testdasi/openvpn-hydesa:<tag>

Unraid example

docker run -d \
    --name='OpenVPN-HyDeSa' \
    --net='bridge' \
    --cap-add=NET_ADMIN \
    -v '/mnt/user/appdata/openvpn-hydesa':'/config':'rw' \
    -v '/mnt/user/downloads/':'/data':'rw' \
    -e 'DNS_SERVERS'='127.2.2.2' \
    -e 'HOST_NETWORK'='192.168.1.0/23' \
    -e 'SERVER_IP'='192.168.1.2' \
    -p '8000:8000/tcp' \
    -p '8153:53/tcp' \
    -p '8153:53/udp' \
    -p '9118:9118/tcp' \
    -p '8118:8118/tcp' \
    -p '8080:8080/tcp' \
    -p '8090:8090/tcp' \
    -p '8112:8112/tcp' \
    -p '5076:5076/tcp' \
    -e 'LAUNCHER_GUI_PORT'='8000' \
    -e 'DNS_SERVER_PORT'='53' \
    -e 'SOCKS_PROXY_PORT'='9118' \
    -e 'HTTP_PROXY_PORT'='8118' \
    -e 'USENET_HTTP_PORT'='8080' \
    -e 'USENET_HTTPS_PORT'='8090' \
    -e 'TORRENT_GUI_PORT'='8112' \
    -e 'SEARCHER_GUI_PORT'='5076' \
    -e 'LANG'='en_GB.UTF-8' \
    -e TZ="Europe/London" \
    -e HOST_OS="Unraid" \
    'testdasi/openvpn-hydesa:stable-amd64' 

Notes

  • I code for fun and my personal uses; hence, these niche functionalties that nobody asks for. ;)
  • Tested only with PIA since I can't afford anything else. Theoretically, it should work with any VPN services that support OpenVPN.
  • If you like my work, a donation to my burger fund is very much appreciated.

Donate.

Install OpenVPN-HyDeSa on Unraid in a few clicks.

Find OpenVPN-HyDeSa in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for OpenVPN-HyDeSa Review the template variables and paths Click Install

Download Statistics

11,838
Total Downloads
19
This Month
75
Avg / Month

Total Downloads Over Time

Loading chart...

Related apps

Details

Repository
testdasi/openvpn-hydesa:latest
Last Updated2022-02-18
First Seen2021-04-16

Runtime arguments

Web UI
http://[IP]:[PORT:8000]/
Network
bridge
Shell
bash
Privileged
false
Extra Params
--cap-add=NET_ADMIN

Template configuration

AppdataPathrw

Container Path: /config

Target
/config
Default
/mnt/user/appdata/openvpn-hydesa
Value
/mnt/user/appdata/openvpn-hydesa
DownloadsPathrw

Container Path: /data

Target
/data
DNS_SERVERSVariable

Container Variable: DNS_SERVERS

Default
127.2.2.2
Value
127.2.2.2
HOST_NETWORKVariable

Container Variable: HOST_NETWORK

Default
192.168.1.0/24
Value
192.168.1.0/24
SERVER_IPVariable

Container Variable: SERVER_IP

Default
192.168.1.2
Value
192.168.1.2
Web GUI launcher portPorttcp

Container Port: 8000

Target
8000
Default
8000
Value
8000
DNS server TCP portPorttcp

Container Port: 53

Target
53
Default
8153
Value
8153
DNS server UDP portPortudp

Container Port: 53

Target
53
Default
8153
Value
8153
Socks5 proxy portPorttcp

Container Port: 9118

Target
9118
Default
9118
Value
9118
HTTP proxy portPorttcp

Container Port: 8118

Target
8118
Default
8118
Value
8118
SABnzbdPlus HTTP GUI portPorttcp

Container Port: 8080

Target
8080
Default
8080
Value
8080
SABnzbdPlus HTTPS GUI portPorttcp

Container Port: 8090

Target
8090
Default
8090
Value
8090
Deluge GUI portPorttcp

Container Port: 8112

Target
8112
Default
8112
Value
8112
NZBHydra2 GUI portPorttcp

Container Port: 5076

Target
5076
Default
5076
Value
5076
LAUNCHER_GUI_PORTVariable

Container Variable: LAUNCHER_GUI_PORT

Default
8000
Value
8000
DNS_SERVER_PORTVariable

Container Variable: DNS_SERVER_PORT

Default
53
Value
53
SOCKS_PROXY_PORTVariable

Container Variable: SOCKS_PROXY_PORT

Default
9118
Value
9118
HTTP_PROXY_PORTVariable

Container Variable: HTTP_PROXY_PORT

Default
8118
Value
8118
USENET_HTTP_PORTVariable

Container Variable: USENET_HTTP_PORT

Default
8080
Value
8080
USENET_HTTPS_PORTVariable

Container Variable: USENET_HTTPS_PORT

Default
8090
Value
8090
TORRENT_GUI_PORTVariable

Container Variable: TORRENT_GUI_PORT

Default
8112
Value
8112
SEARCHER_GUI_PORTVariable

Container Variable: SEARCHER_GUI_PORT

Default
5076
Value
5076
LANGVariable

Container Variable: LANG

Default
en_GB.UTF-8
Value
en_GB.UTF-8