Skip to content

Commit

Permalink
Merge pull request #396 from Nivl/ml/3.16.2
Browse files Browse the repository at this point in the history
Update Nordvpn CLI to 3.16.2
  • Loading branch information
Julio Gutierrez committed Jun 8, 2023
2 parents ccad404 + a34d406 commit a69121f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<secret_name>`. 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/<secret_name>`. 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/)
Expand Down
8 changes: 3 additions & 5 deletions rootfs/usr/bin/nord_login
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit a69121f

Please sign in to comment.