-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trouble using auth.conf #2
Comments
I did end up rewriting the script. It turned out to be a decent exercise in learning BusyBox shell scripting. There are two issues.
For issue 1: For issue 2: Since the openvpn.sh script is executed from the /pia directory, I rewrote the script to expect the auth.conf file to be in the same place. Therefore, when mounting your credential file, the mount point should be /pia/auth.conf. The source can be whatever you want. I leave it in /root/pia.creds with a 600 umask and my -v line looks like Lastly, I've updated the readme.md to reflect my changes I've never tried to push a PR to a public repo before, but I worked in a branch, merged to master and tried to push. that failed. so I forked and updated. I'll try to send a PR to merge my fork. Otherwise, if anyone else is having issues trying to use this without setting the env vars, see my fork: |
can we add Region to the auth.conf as well instead of specifying it at the time of container creation? |
I seem to be having trouble using the auth.conf file.
root@hub:~# docker run --cap-add=NET_ADMIN --device=/dev/net/tun --name=pia -d --dns 209.222.18.222 --dns 209.222.18.218 -e 'REGION=US East' -v 'auth.conf:/root/auth.conf' colinhebert/pia-openvpn --auth-user-pass auth.conf
bb7ba25b3041ba5b19ebbe675313254192f671a1411e11231bbeb899e8064f38
root@hub:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
root@hub:~# docker logs pia
/usr/local/bin/openvpn.sh: line 13: USERNAME: parameter not set
root@hub:~#
It seems to be due to the way
openvpn.sh
script is checking if the USERNAME env var is set.I'm new to docker so I'm not sure how to edit that script for testing, or I'd submit a PR.
Seems like perhaps testing for --auth-user-pass in $@ and making the existing [ if -n $USERSNAME...] the else clause for that test might do it. I can mess with the scripts independent of docker to test it out, but like I said, not sure how to do it inside the docker image itself
The text was updated successfully, but these errors were encountered: