saltyorg / Sandbox

Saltbox Sandbox
GNU General Public License v3.0
72 stars 99 forks source link

Role Request: rtorrentvpn #25

Closed gaiserik closed 1 year ago

gaiserik commented 2 years ago

https://github.com/binhex/arch-rtorrentvpn

rTorrentVPN is a VPN version of rTorrent with OpenVPN and WireGuard to ensure a secure and private connection to the Internet, including use of iptables to prevent IP leakage when the tunnel is down.

JohnClementine commented 2 years ago

The most updated version of it is broken for me, I'm going to wait for it to be fixed before taking a crack at it.

In the meantime, here's the docker run command I used to get that container running:

docker run -d  \
    --name=rutorrentvpn  \
    --cap-add=NET_ADMIN \
    --restart=unless-stopped  \
    -v </path/to/downloads>:/data \
    -v /opt/rutorrentvpn:/config \
    -v /opt/scripts:/scripts \
    -v /etc/localtime:/etc/localtime:ro \
    -e LAN_NETWORK=172.19.0.1/16 \
    -e NAME_SERVERS=84.200.69.80,37.235.1.174,1.1.1.1,37.235.1.177,84.200.70.40,1.0.0.1 \
    -e VPN_ENABLED=yes \
    -e VPN_PROV=<pia|airvpn|custom> \
    -e VPN_INPUT_PORTS=1234 \
    -e VPN_OUTPUT_PORTS=5678 \
    -e VPN_CLIENT=<pia|airvpn|custom> \
    -e ENABLE_PRIVOXY=no \
    -e ENABLE_AUTODL_IRSSI=no \
    -e ENABLE_RPC2=yes \
    -e ENABLE_RPC2_AUTH=yes \
    -e ENABLE_WEBUI_AUTH=yes \
    -e RPC2_USER=<username> \
    -e RPC2_PASS=<password> \
    -e WEBUI_USER=<username> \
    -e WEBUI_PASS=<password> \
    -e DEBUG=false \
    -e PHP_TZ=<timezone> \
    -e PUID=1000 \
    -e PGID=1001 \
    --network=saltbox \
    --network-alias=rutorrentvpn  \
    --label com.github.saltbox.saltbox_managed=true \
    --label traefik.enable=true \
    --label traefik.http.routers.rutorrentvpn.entrypoints=websecure \
    --label traefik.http.routers.rutorrentvpn.middlewares=secureHeaders@file \
    --label traefik.http.routers.rutorrentvpn.rule=Host\(\`rutorrentvpn.<domain.com>\`\) \
    --label traefik.http.routers.rutorrentvpn.service=rutorrentvpn \
    --label traefik.http.routers.rutorrentvpn.tls.certresolver=cfdns \
    --label traefik.http.routers.rutorrentvpn.tls.options=securetls@file \
    --label traefik.http.services.rutorrentvpn.loadbalancer.server.port=9080 \
    binhex/arch-rtorrentvpn:rtorrent-ps-1.1.r54.ga787dd9-1-35

You're going to need to fill in all of the stuff I've put in <>, it's mostly documented on the page you linked. After you run it the first time, put your .ovpn file into /opt/rutorrentvpn/openvpn/ and run docker restart rutorrentvpn

EDIT: If you want to use this with radarr/sonarr/automation, I'd recommend setting the </path/to/downloads> as /mnt/unionfs/downloads/torrents/rutorrentvpn

gaiserik commented 2 years ago

I tried and adapt it for wireguard instead openvpn, works very well, same issue for the lastest tag. Thanks ;)

JigSawFr commented 2 years ago

Rflood has already VPN support with Wireguard, is-it necessary ?

gaiserik commented 1 year ago

The only role with working vpn included for me is delugevpn, without extra modifications or another container network.

owine commented 1 year ago

I think we will be leaving rflood and rutorrent attached to the forthcoming gluetun role as the options for this.