edgd1er / nordlynx-proxy

use nordvpn app to open a vpn connection, run a socks proxy
16 stars 8 forks source link

Latest change breaks login: logincmd: unbound variable #18

Closed 1Dimension1 closed 1 year ago

1Dimension1 commented 1 year ago

Seems like logincmd is not set when using login + pass

/app/start_vpn.sh: line 149: logincmd: unbound variable 2022-12-23 10:25:30: ERROR: NORDVPN: cannot login: 2022-12-23 10:25:30,502 INFO exited: start_vpn (exit status 1; not expected)

I'm still using this in my docker compose:

Do i need to use another method to login ?

1Dimension1 commented 1 year ago

Looks like its only set when using secrets and not environment variables.

if [ -e /run/secrets/NORDVPN_CREDS ]; then

My password is still in environment for now

1Dimension1 commented 1 year ago

Fixed it for now quick and dirty

#Use secrets if present
if [ -e /run/secrets/NORDVPN_CREDS ]; then
....
else
  logincmd="login --username ${NORDVPN_LOGIN} --password "${NORDVPN_PASS}""
fi
edgd1er commented 1 year ago

Token is the preferred method as your credentials are not exposed. Login/password should be OK though . I ll have to look at it.

1Dimension1 commented 1 year ago

I agree, will try and make a token :) Thanks for your work.