haugene / vpn-configs-contrib

A collection of configs for various VPN providers
GNU General Public License v3.0
180 stars 744 forks source link

BulletVPN: OpenVPN credentials not set (but they are) #138

Closed masterbuck closed 1 year ago

masterbuck commented 1 year ago

Is there a pinned issue for this?

Is there an existing or similar issue for this?

Is there any comment in the documentation for this?

Is this related to the container/transmission?

Are you using the latest release?

Have you tried using the dev branch latest?

Config used

docker run --cap-add=NET_ADMIN -d \ -v /your/storage/path/:/data \ -e GITHUB_CONFIG_SOURCE_REPO=haugene/vpn-configs-contrib \ -e OPENVPN_PROVIDER=BULLETVPN \ -e OPENVPN_CONFIG=bulletVPN-NL-Amsterdam2-_UltraHD-ams02-tcp \ -e OPENVPN_USERNAME=xxx \ -e OPENVPN_PASSWORD=xxx \ -e LOCAL_NETWORK=192.168.0.0/16 \ --log-driver json-file \ --log-opt max-size=10m \ -p 9091:9091 \ haugene/transmission-openvpn:dev

Current Behavior

Soon after launch, the container exits because OpenVPN doesn't find the credentials

Expected Behavior

Since the username/pass is provided in the attributes, they should be used instead of looking for a file (which is no longer supported by OpenVPN 3 if I understand right?)

How have you tried to solve the problem?

Tried with dev, latest, and version 3.7.1

Tried with UDP instead of TCP

Compared with my own local .ovpn file (identical)

Log output

Starting container with revision: a95f586492b2b7e8ff2cc8ac7f91bc43c0cccc40 Creating TUN device /dev/net/tun Using OpenVPN provider: BULLETVPN Running with VPN_CONFIG_SOURCE auto No bundled config script found for BULLETVPN. Defaulting to external config Downloading configs from https://github.com/haugene/vpn-configs-contrib/archive/main.zip into /tmp/tmp.zPL01uhKbH Extracting configs to /tmp/tmp.SxMDEIk4In Found configs for BULLETVPN in /tmp/tmp.SxMDEIk4In/vpn-configs-contrib-main/openvpn/bulletvpn, will replace current content in /etc/openvpn/bulletvpn Cleanup: deleting /tmp/tmp.zPL01uhKbH and /tmp/tmp.SxMDEIk4In Starting OpenVPN using config bulletVPN-NL-Amsterdam2-_UltraHD-ams02-udp.ovpn Modifying /etc/openvpn/bulletvpn/bulletVPN-NL-Amsterdam2-_UltraHD-ams02-udp.ovpn for best behaviour in this container Modification: Point auth-user-pass option to the username/password file Modification: Change ca certificate path Modification: Change ping options Modification: Update/set resolv-retry to 15 seconds Modification: Change tls-crypt keyfile path Modification: Set output verbosity to 3 Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop OpenVPN credentials not set. Exiting.

Environment

- OS: Fedora 36
- Docker: 20.10.17

Anything else?

No response

pkishino commented 1 year ago

it reads the creds from env variables into a file, that is used for openvpn. that is why the ovpn file is modified to change "auth-user-pass" to "auth-user-pass /config/openvpn-credentials.txt" please check this is done properly. are you using any special characters in the username/password?

masterbuck commented 1 year ago

My username is an email address so it has a @ and I'm guessing that's the issue. My password is auto-generated by BulletVPN and contains simple special characters (,;! and the like)

As for seeing the contents of that file... how can I do this if the container exits before I can check? I just tried to make the /config volume persistent, and after relaunching (and the container exiting on its own), it's empty.

PS: thanks for looking into this!

masterbuck commented 1 year ago

Well, sometimes it's simple as being guided... it added simple quotes (OPENVPN_USERNAME='xxx' and OPENVPN_PASSWORD='xxx') and now it works!

Thanks for pointing me in the right direction!