/nordvpn-server-find

Quickly find the fastest NordVPN servers, filtering by location and current server load

Primary LanguageShell

Small script to find the fastest NordVPN servers, filtering by location and 
current capacity (i.e. server load).

Super useful if you use a third-party VPN client (like Viscosity) and want
to quickly find out the fastest server to connect to.

The script calls an undocumented NordVPN API endpoint for quick and reliable
results.

USAGE

nordvpn-server-find [-r] [-l -c -n]

-r   recommended  just output the recommended server for your location and exit
-l   location     2-letter ISO 3166-1 country code (ex: us, uk, de)
-c   capacity     current server load, integer between 1-100 (defaults to 30)
-n   limit        limits number of results, integer between 1-100 (defaults to 20)

-r can be useful for scripting. For example, on macOS this command gets Viscosity 
to automatically connect to the recommended server for your location:

osascript -e "tell application \"Viscosity\" to connect \"$(nordvpn-server-find -r).tcp\""

If -r is given other options are ignored.

DEPENDENCIES

- Bash 4
- jq 1.5

BUGS

Please report here:
https://github.com/mrzool/nordvpn-server-find/issues

AUTHOR

Mattia Tezzele <info@mrzool.cc>

LICENSE

This program is distributed under the GNU General Public License.