guillaumedsde/alpine-qbittorrent-openvpn

AirVPN ovpn no credentials needed

sakadalim opened this issue · 0 comments

I am using AirVPN and with its ovpn file, no credentials are needed to connect.

I want to switch from my haugene container to this container but I am unable to do so at the moment. With the haugene conatiner, credential-less ovpn is supported.

I have mounted the airvpn ovpn file to /config/openvpn/config.ovpn and I have also removed CREDENTIALS_FILE=/config/openvpn/openvpn-credentials.txt from the env.
However, it seems like the openvpn script at rootfs/etc/services.d/openvpn/run always check the credential file

# launch openvpn
exec s6-setuidgid "$(id -u openvpn):$(id -g openvpn)" openvpn \
    --writepid /var/run/openvpn/pid \
    --cd "$(dirname "${OPENVPN_CONFIG_FILE}")" \
    --iproute /usr/sbin/ip-su \
    --dev tun0 --persist-tun \
    --config "${OPENVPN_CONFIG_FILE}" \
    --auth-user-pass "${CREDENTIALS_FILE}" \
    --auth-nocache \
    --pull-filter ignore "dhcp-option DNS" \
    --dhcp-option DNS "${DNS}" \
    --redirect-gateway def1 bypass-dhcp \
    --route "${LAN_FIRST_IP}" "${LAN_MASK}" net_gateway

This is the current error I get:

WARNING: cannot stat file '': No such file or directory (errno=2)
Options error: --auth-user-pass fails with '': No such file or directory (errno=2)

I have also tried adding the username and password to the environment as well as writing it directly to the credential file but it does not work either.

Environment:
- OPENVPN_USERNAME=xxxx
- OPENVPN_PASSWORD=xxxx
- CREDENTIALS_FILE=/config/openvpn/openvpn-credentials.txt