From 5453d74d85ae41ae68e7735a9e3515a6bed10535 Mon Sep 17 00:00:00 2001 From: edgd1er Date: Wed, 26 Jun 2019 07:47:28 +0200 Subject: [PATCH] proposition for a manual page to explain NordVpn update script parameters --- docs/nordvpn-script.md | 18 ++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 19 insertions(+) create mode 100644 docs/nordvpn-script.md diff --git a/docs/nordvpn-script.md b/docs/nordvpn-script.md new file mode 100644 index 000000000..aaf8c7c02 --- /dev/null +++ b/docs/nordvpn-script.md @@ -0,0 +1,18 @@ +## NORDVPN API + +The update script is based on the NordVpn API. The API sends back the best recommended config file based on the filters given. + +Available ENV variables in the container to define via the NORDNVPN API the file to use are: +* NORDVPN_COUNTRY: (values code: https://api.nordvpn.com/v1/servers/countries) +* NORDVPN_CATEGORY: (values identifier: https://api.nordvpn.com/v1/servers/groups) +* NORDVPN_PROTOCOL: tcp or udp (values identifier more available at https://api.nordvpn.com/v1/technologies, may need script adaptation) + +the file is then download using the API to find the best server according to the variables, here an albanian, using tcp: +* selecting server (limit answer to 1): [ANSWER]= https://api.nordvpn.com/v1/servers/recommendations?filters[country_id]=2&filters[servers_technologies][identifier]=openvpn_tcp&filters[servers_group][identifier]=legacy_group_category&limit=1 +* download selected server's config: https://downloads.nordcdn.com/configs/files/ovpn_[NORDVPN_PROTOCOL]/servers/[ANSWER.0.HOSTNAME][] => https://downloads.nordcdn.com/configs/files/ovpn_tcp/servers/al9.nordvpn.com.tcp.ovpn + + +A possible evolution would be to check server's load to select the most available one. +* limit numbers of returned server to 10 +* use https://api.nordvpn.com/server/stats to collect cpu's load +* select the more available server. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 851df66b2..cfebb41ad 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -17,6 +17,7 @@ nav: - 'Use docker env file': 'dockerenv.md' - 'Access': 'access.md' - 'Running on ARM': 'run-on-arm.md' + - 'NORDVPN update script': 'nordvpn-script.md' - 'Synology NAS': 'synology-nas.md' - 'Systemd integration': 'systemd-integration.md' - 'Known issues, tips and tricks': 'known-issues.md'