haugene / vpn-configs-contrib

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

Container fails to acquire valid openvpn config, potentially because it modifies the downloaded one in a bad way. #194

Closed falste closed 1 year ago

falste commented 1 year ago

Is there a pinned issue for this?

Is there an existing or similar issue/discussion for this?

Is there any comment in the documentation for this?

Is this related to a provider?

Are you using the latest release?

Have you tried using the dev branch latest?

Docker run config used

transmission-openvpn: image: haugene/transmission-openvpn container_name: transmission-openvpn restart: "no" volumes:

Current Behavior

The container downloads configs from the vpn-configs-contrib repo, modifies them in some way, then runs into an issue in line 1 of the modified config and aborts. Somehow two weird symbols end up at the start of the config, which I don't see when I just download the config from the url in the logs.

It worked perfectly fine for a while and I don't think I changed anything.

Expected Behavior

The container should download its config, potentially modify it and then run normally.

How have you tried to solve the problem?

Tried with dev-tagged docker image with no success.

Log output

Starting container with revision: 1c6397e565921139f661be4597576e423fb7543e TRANSMISSION_HOME is currently set to: /config/transmission-home WARNING: Deprecated. Found old default transmission-home folder at /data/transmission-home, setting this as TRANSMISSION_HOME. This might break in future versions. We will fallback to this directory as long as the folder exists. Please consider moving it to /config/transmission-home Creating TUN device /dev/net/tun Using OpenVPN provider: MULLVAD Running with VPN_CONFIG_SOURCE auto No bundled config script found for MULLVAD. Defaulting to external config Downloading configs from https://github.com/haugene/vpn-configs-contrib/archive/main.zip into /tmp/tmp.KumlIJ5uaw Extracting configs to /tmp/tmp.WJiOx2I7I8 Found configs for MULLVAD in /tmp/tmp.WJiOx2I7I8/vpn-configs-contrib-main/openvpn/mullvad, will replace current content in /etc/openvpn/mullvad Cleanup: deleting /tmp/tmp.KumlIJ5uaw and /tmp/tmp.WJiOx2I7I8 No VPN configuration provided. Using default. Modifying /etc/openvpn/mullvad/default.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 Modification: Updating status for config failure detection Setting OpenVPN credentials... adding route to local network 192.168.178.0/24 via 172.31.0.1 dev eth0 Options error: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/mullvad/default.ovpn:1: ��c (2.5.5) Use --help for more information.

#######

$ docker container cp transmission-openvpn:/etc/openvpn/mullvad/default.ovpn ./default.ovpn && cat default.ovpn ▒▒client dev tun resolv-retry infinite nobind persist-key persist-tun verb 3 remote-cert-tls server ping 10 ping-restart 60 [...]

HW/SW Environment

- OS: Raspbian GNU/Linux 11 (bullseye); Linux raspberrypi 5.15.70-v7l+ haugene/docker-transmission-openvpn#1590 SMP Tue Sep 27 15:58:00 BST 2022 armv7l GNU/Linux
- Docker: Docker version 20.10.5+dfsg1, build 55c4c88

Anything else?

No response

pkishino commented 1 year ago

@C9Glax Can you please take a quick look? looks like some formatting got added to the default.ovpn.. thanks

C9Glax commented 1 year ago

Okay there were two problems: Invisible Character: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/mullvad/default.ovpn:1: ��c and Options error: Maximum number of 'remote' options (64) exceeded

Now should start normally again. PR is merged in #192

pkishino commented 1 year ago

Thanks!

On Tue, 21 Feb 2023 at 00:36, Glax @.***> wrote:

Okay there were two problems: Invisible Character: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/mullvad/default.ovpn:1: ��c and Options error: Maximum number of 'remote' options (64) exceeded

Now should start normally again. PR is merged in #192 https://github.com/haugene/vpn-configs-contrib/pull/192

— Reply to this email directly, view it on GitHub https://github.com/haugene/vpn-configs-contrib/issues/194#issuecomment-1437206680, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7OFYUYKT3AJOFVXGMR45DWYOFPVANCNFSM6AAAAAAVBIOSEE . You are receiving this because you were assigned.Message ID: @.***>