Source: https://github.com/ThatRobVK/NordVPN-Local
When disconnected, the top bar will show a red button reading UNPROTECTED
, to remind you that you are not connected to the VPN. When connecting or disconnecting the button turns amber, and once connected it will turn green showing you the country and server number you are connected to, e.g. UNITED KINGDOM #813
. When you click the button it will show the full command-line output of the command nordvpn status
in the menu. Undearneath the status is a button that allows you to connect / disconnect.
This is loosely based on Quadipedia's NordVPN Status extension (found on the Gnome extensions site), kudos to them for creating the original. Their version works by reading the server list from NordVPN's API and comparing the computer's public IP against this list. I found it often didn't pick up my active connection, which I suspect is due to incorrect API data.
This version uses the NordVPN command-line tools to determine the status. It updates as soon as you use the menu to connect or disconnect, and it refreshes every 30 seconds in case you change your connection external to the plugin.
Note that due to using the local command-line tools, this only works if you use NordVPN locally (hence the title). If your VPN connection is established outside of your computer, e.g. on your router, then this plugin will not detect your VPN connection. Use Quasipedia's version instead, which will detect that, if it finds your public IP in the NordVPN server list.
This extension uses the NordVPN command line client, which can be set up as follows.
- Install NordVPN with
sudo apt install nordvpn
. - Configure your credentials with
nordvpn login
, following the prompts. - Check NordVPN is set up with
nordvpn c
, if it connects successfully then you're good to go.
Easiest way: enable on gnome-extensions at NordVPN Local on gnome extensions
Manual install:
- Create a folder for the extension with
mkdir ~/.local/share/gnome-shell/extensions/nordvpn-local@robvk.uk
- Copy the files from this repo into that folder
- Enable the extension using
Tweaks
(if you don't have it, install viasudo apt install gnome-tweaks
)
Contributions welcome! If you find any issues or think of any cool features, check it's not already been raised under Issues and raise it.