diff --git a/Dockerfile b/Dockerfile index 5d787a1d463..d5ff1256544 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy LABEL maintainer="Julio Gutierrez julio.guti+nordvpn@pm.me" -ARG NORDVPN_VERSION=3.16.1 +ARG NORDVPN_VERSION=3.16.2 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -y && \ diff --git a/README.md b/README.md index 5756dd60fd3..39328390375 100644 --- a/README.md +++ b/README.md @@ -174,10 +174,8 @@ services: # ENVIRONMENT VARIABLES -* `USER` - DEPRECATED. User for NordVPN account. -* `PASS` - DEPRECATED. Password for NordVPN account, surrounding the password in single quotes will prevent issues with special characters such as `$`. -* `TOKEN` - Used in place of `USER` and `PASS` for NordVPN account, can be generated in the web portal -* `PASSFILE` - File from which to get `PASS`, if using [docker secrets](https://docs.docker.com/compose/compose-file/compose-file-v3/#secrets) this should be set to `/run/secrets/`. This file should contain just the account password on the first line. +* `TOKEN` - Token for NordVPN account, can be generated in the web portal +* `TOKENFILE` - File from which to get `TOKEN`, if using [docker secrets](https://docs.docker.com/compose/compose-file/compose-file-v3/#secrets) this should be set to `/run/secrets/`. Thi * `CONNECT` - [country]/[server]/[country_code]/[city]/[group] or [country] [city], if none provide you will connect to the recommended server. - Provide a [country] argument to connect to a specific country. For example: Australia , Use `docker run --rm ghcr.io/bubuntux/nordvpn nordvpn countries` to get the list of countries. - Provide a [server] argument to connect to a specific server. For example: jp35 , [Full List](https://nordvpn.com/servers/tools/) diff --git a/rootfs/usr/bin/nord_login b/rootfs/usr/bin/nord_login index 8f9b47d7f49..3c278484839 100644 --- a/rootfs/usr/bin/nord_login +++ b/rootfs/usr/bin/nord_login @@ -18,7 +18,7 @@ while [ ! -S /run/nordvpn/nordvpnd.sock ] ; do sleep 1 done -[[ -z "${PASS}" ]] && [[ -f "${PASSFILE}" ]] && PASS="$(head -n 1 "${PASSFILE}")" +[[ -z "${TOKEN}" ]] && [[ -f "${TOKENFILE}" ]] && TOKEN="$(head -n 1 "${TOKENFILE}")" nordvpn logout --persist-token > /dev/null if [[ -n ${TOKEN} ]]; then @@ -27,10 +27,8 @@ if [[ -n ${TOKEN} ]]; then exit 1 } else - nordvpn login --legacy --username "${USER}" --password "${PASS}" || { - echo "Invalid Username or password." - exit 1 - } + echo "No token set." + exit 1 fi exit 0