binhex / arch-delugevpn

Docker build script for Arch Linux base with Deluge, Privoxy and OpenVPN
GNU General Public License v3.0
700 stars 111 forks source link

VPN not active + webui need manual launch #413

Closed CpHeat closed 1 month ago

CpHeat commented 1 month ago

I tried different ways but I seem to keep doing it wrong. My first choice was to use docker compose, here is my file :

services:
  deluge-vpn:
    container_name: deluge-vpn
    image: binhex/arch-delugevpn:latest 
    cap_add:
      - NET_ADMIN
    environment:
      - VPN_ENABLED=yes
      - TZ=UTC
      - VPN_PROV=pia
      - VPN_CLIENT=openvpn
      - ENABLE PRIVOXY=yes
      - LAN_NETWORK=[my ip range]
      - 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      
      - DELUGE_DAEMON_LOG_LEVEL=debug
      - DELUGE_WEB_LOG_LEVEL=debug
      - DELUGE_ENABLE_WEBUI_PASSWORD=yes
      - ENABLE_STARTUP_SCRIPTS=yes
      - USERSPACE_WIREGUARD=no
      - ENABLE_SOCKS=yes
      - SOCKS_USER=[USER]
      - SOCKS_PASS=[PASS]
      - VPN_INPUT_PORTS=1234
      - VPN_OUTPUT_PORTS=5678
      - DEBUG=true
      - PUID=99
      - PGID=100
      - UMASK=000
    ports:
      - 8112:8112
      - 8118:8118
      - 9118:9118
      - 58846:58846
      - 58946:58946
      - 58945:58946/udp
    volumes:
      - ./downloads:/data
      - ./config:/config
  The container is created, but the web UI is never available. If i launch it manually via usr/bin/deluge-web, or using a script with an added line in docker compose :
  /usr/bin/supervisord -c /config/supervisord.conf

  and in supervisord.conf
      [supervisord]
nodaemon=true
user=root

[program:deluged]
command=/usr/bin/deluged -d
autostart=true
autorestart=true
stdout_logfile=/var/log/deluged.log
stderr_logfile=/var/log/deluged_err.log

[program:deluge-web]
command=/usr/bin/deluge-web
autostart=true
autorestart=true
stdout_logfile=/var/log/deluge-web.log
stderr_logfile=/var/log/deluge-web_err.log

then I can access the webUI. This seems to be a strange behavior. I tried to use the run command too, but to the same result

But even after doing this, I can connect inthe webui but my external IP is my real IP, so the vpn must not be working. I am using PIA, i put my ovpn and crt files in config/openvpn. I also tried with cyberghost but same result. I'm out of ideas. Let me know if you need other infos

Edit: may it be because of a wrong LAN_NETWORK ? since docker is installed on a server I'm not 100% sure I used the good ip (I used my prefered ip replacing the last digits by 0/24)

binhex commented 1 month ago

If i launch it manually via usr/bin/deluge-web, or using a script with an added line in docker compose : /usr/bin/supervisord -c /config/supervisord.conf

Please don't do this, if you cannot see the deluge web ui then the tunnel is not established, this is by design to protect you from possible ip leakage.

I will need to see a log to help further, please see the following link:- https://github.com/binhex/documentation/blob/master/docker/faq/help.md#other-users

CpHeat commented 1 month ago

here is the log : https://pastebin.com/tzVp9jMc

digging into the files it seems there is no lib/modules folder at all

If it can help the host runs under windows

EDIT: I was just doing it wrong. I first I tried with cyberghost, but seeing no more log entries I assumed it was ended and not working and I composed down and tried another way, in each and every attempt.. Then I tried with PIA, and that's when I started to wait more and see more debug logs, that clearly stated that I was missing user infos. But since in cyberghost you are given specific user and pass for openvpn I did not understood in PIA you just use your regular ones and assumed they were included in the certificate files. It was in fact working from my very first attempt with cyber, I just needed to wait like 10 miutes for the thing to really start and get fully setup

Maybe you could add a little "iniating - this may take a while" king of log at the end of the configuration logs so people know they are expected to wait for some more time? Anyway my issue is solved, thank you!