Giter Site home page Giter Site logo

alexpoilrouge / nordvpn-connect Goto Github PK

View Code? Open in Web Editor NEW
73.0 5.0 23.0 1.1 MB

Unofficial Gnome-Shell Extension to provide a GUI for the official NordVPN CLI Tool.

JavaScript 93.31% CSS 2.39% Shell 4.30%
nordvpn gnome gui gnome-shell-extension gnome-extension vpn networking

nordvpn-connect's Introduction

README:

'NordVPN Connect' gnome-shell extension.

The natural basic necessary step before using this GNOME-Shell extension is, of course, to read this README in its entirety.

About

This extension acts merely and only as a simple GUI for the 'nordvpn' command line tool basic features that are connection and disconnection to a vpn server. It also provides basic info about the current status of said connection: whether or not there is connection and, if so, to which server. Of course, this requires the 'nordvpn' command line tool, and all necessary dependencies and requirements to be installed as well. To that effect check out NordVPN's corresponding page: https://nordvpn.com/download/linux/

Ultimately, this extension should be replaced by any GUI app, NordVPN might officially release for Linux desktop.

ToDo?

On the off chance, such GUI app isn't released for Linux in the near future. Some welcome ameliorations to this extension would be:

  • Add more of the 'nordvpn' CLI tool features in this extension such as an 'AutoConnect' toggle, a protocol (UDP/TCP) picked and a 'CyberSec' feature toggle.
  • Add a 'settings' page for this extension.
  • Add the possibility to type in the name of the server (e.g.: de145, uk123, fr067) the user wants to connect to.
  • Add the possibility to pick server by choosing a city (instead of country).
  • Add the remaining set custom DNS feature to the extension.
  • Add the possibility to 'fav' a server

Disclaimer

Nothing official

This extension has been made without any endorsement or support from NordVPN. The developer has no ties nor affiliation whatsoever with NordVPN, its services, nor its software. Naturally, this extension is free and isn't, shouldn't and will not be subject to any form of profit or compensation.

Release and use

This extension was made for personal needs and use. The code is release on the off chance it might be of use to someone but without the intention of providing any form of utility software or service in a rigorous manner. Therefore, no support is endorsed by the developer, meaning that any comment, feedback, or request regarding this code should be expected to be completely ignored by the developer. Additionally, the responsibility of any undesired effect the execution of this code might have on any system lies solely in the hands of the user.

Availability

This extension is available in the AUR: https://aur.archlinux.org/packages/gnome-shell-extension-nordvpn-connect-git/

It is also available via the “ GNOME Extensions ” website: https://extensions.gnome.org/extension/1595/nordvpn-connect/

However, the most up-to-date version is only guaranteed here, on GitHub.

Installation

Prerequisites

Since this is only a GNOME-Shell GUI for the 'nordvpn' command line tool, said tool must be installed before anything else. This extension is destined for systemd distributions only!

If you're on a debian based distribution, checkout this page: https://nordvpn.com/download/linux/

If you're on an archlinux based distribution, this tool might be available in the AUR: https://aur.archlinux.org/packages/nordvpn-bin/

Once the 'nordvpn' CLI tool is installed (assuming here, version 3.3), check the packaged daemon's status:

systemctl status nordvpnd.service

If the daemon isn't up and running, fix that:

systemctl enable --now nordvpnd.service

Now, set up your logins to the NordVPN service:

nordvpn login

Now you should be able to use this extension.

Test

This tool has been tested on 'Archlinux', with 'GNOME Shell 3.30.2' and the 'nordvpn' CLI tool version 2.1.0-5, for all commits before (and including) commit a0c1b1034e0a8518796e5490a4a8746fa20da506 (revert to this commit if encountering compatibility issues).

This tool has been tested on 'Archlinux', with 'GNOME Shell 3.32.0' and the 'nordvpn' CLI tool version 2.2.0-2, for commits before (and including) commit cf7538c5bfe7a09547c2d5e87bfd1952538a2581.

This tool has been tested on 'Archlinux', with 'GNOME Shell 3.32.1' and the 'nordvpn' CLI tool version 3.0.0-4, for commits before (and including) commit 099034f172582f5077ec1018f38aaa3ef908586c.

This tool has been tested on 'Archlinux', with 'GNOME Shell 3.34.0' and the 'nordvpn' CLI tool version 3.3.1-3, for commits before (and including) commit b009a83b298fbce6ab88a9371b8904f29a88cb31.

This tool has been tested on 'Archlinux', with 'GNOME Shell 3.36.0' and the 'nordvpn' CLI tool version 3.7.0-2, for commits before (and including) commit b1425bbff652c824e77360316b509a1b2a1a2db8.

This tool has been tested on 'Archlinux', with 'GNOME Shell 3.36.1' and the 'nordvpn' CLI tool version 3.7.2-2, for commits before (and including) commit b923bfb4bc89e3fb5f5892638a39178d0dea3331.

This tool has been tested on 'Archlinux', with 'GNOME Shell 3.36.1' and the 'nordvpn' CLI tool version 3.8.5, for commits before (and including) commit 2caed946da31ed084ad0cdd7d1783e2ea033def4.

This tool has been tested on 'Archlinux', with 'GNOME Shell 40.1.0' and the 'nordvpn' CLI tool version 3.9.2, for commits before (and including) commit f09af72e7b0a23e14e11fb51b38e42773c94bc8f.

This tool has been tested on 'Archlinux', with 'GNOME Shell 40.4.0' and the 'nordvpn' CLI tool version 3.12.0, for later commits.

Install

If you've cloned or downloaded this extension from github, copy the content of its root directory to a new directory: ~/.local/share/gnome-shell/extensions/[email protected].

Then, activate the extension (if needed).

From the start, a command line install should look like this:

git clone https://github.com/AlexPoilrouge/NordVPN-connect.git

mkdir ~/.local/share/gnome-shell/extensions/[email protected]

cp NordVPN-connect/* ~/.local/share/gnome-shell/extensions/[email protected]/

gnome-extensions enable [email protected]

I might be necessary to refresh your gnome-shell afterwards. The best way to do this is to use the hotkey Alt + F2 and then entering r.

Install (scripted)

The step above has been automated with a shell script. Once you've cloned or downloaded this extension from github, head up to the downloaded folder:

cd NordVPN-connect

and use the following script:

./setup.sh

You can also use this script to install the extension as a system-wide extension:

./setup.sh --system

After install, you might still need to refresh your gnome-shell using: Alt + F2 → enter r

More option for this script are available, be sure to check: ./setup.sh --help

Misc.

Extension settings page

Since commit aabdf8d307c1ecebf38c097b9e34987862ae859b, an “ Extension Settings ” page has been added.

Like all other Gnome-shell extensions (that provide such 'settings' page), there are several ways of accessing it:

  1. Install and use the “ gnome-tweaks ” tool. Then go to the Extensions tab. From there you should be able to access to extensions settings page, if there are any provided with corresponding extension.
  2. Go to the “ GNOME Extensions ” website, and visit the “ Installed Extensions ” section. From there you should be able to manage your installed extensions, provided your web browser had the “ GNOME Shell Integration ” plugin installed and enabled.
  3. Your Gnome environment might have been provided with the gnome-shell-extension-prefs tool. Invoke it from a terminal to manage your extensions.

Help

The extension says « tool not found. », Holly Cow!

This probably means that the 'nordvpn' CLI tool is either not installed, either not found by the system. See previous section for installation and the NordVPN website ( https://nordvpn.com/download/linux/ ).

The extension says « daemon disabled/missing », what gives?

_Enable the daemon ?

Installing the 'nordvpn' CLI tool isn't enough. The 'nordvpnd' systemd daemon must be up and running. Open a terminal and type:

systemd enable --now nordvpnd.service

_User in nordvpn group?

As pointed out by this issue, sometimes a user can't access the nordvpn CLI if the active user doesn't belong to the nordvpn group. In a terminal:

groupadd nordvpn
sudo usermod -aG nordvpn $USER

The extension says « tool not logged in », what's up?

You probably haven't set up your logins to the 'nordvpn' CLI tool. Open a terminal and type:

nordvpn login

and enter your NordVPN logins.

The extension seems to be blocked in some sort of “ waiting state ”.

This extension is supposed to react to the current state of the NordVPN server connection given by the 'nordvpn' CLI tool and the 'nordvpnd' systemd daemon. Therefore, you might need to use those tool to fix the issue.

I have a custom installation of 'nordvpn' CLI tool / I don't use 'systemd' / whatever … Am I doomed?

Pretty much. Howerver, since commit aabdf8d307c1ecebf38c097b9e34987862ae859b, a “ Settings ” page has been added to the extensions. I contains a tab that allows you to change the core shell commands that allows to monitor and connect with the nordvpn CLI tool. But you're on your own from there, sorry.

Yo, the extension say's there's a pickle with my 'shell' or something… Da fox?

This extension, by default, uses bash to run its core commands. The default path it uses is /bin/bash. However, if that doesn't fit with your install, you can try changing the default shell within the "Advanced" tab, located in the extensions 'settings' page (only possible since commit 28bbe2bb0178c8e6325683585b5268fa454798a0, i.e. version 7 of the extension).

-> Once you made the appropriate change, either reload the extension, or reload gnome shell by using Alt+F2 and entering r


From Strasbourg, with love.

Alex Poilrouge

nordvpn-connect's People

Contributors

alexpoilrouge avatar bkis avatar creatik avatar hergeirs avatar katnova avatar mateuszkubuszok avatar sandervankasteel avatar sirrhynus avatar t0phr avatar viggy96 avatar zaneselvans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nordvpn-connect's Issues

Release for Gnome 40?

This extension currently cannot be used for Gnome 40.
Will there be a Gnome 40 release? I would really appreciate it.

Fix for NordVPN Version 3.8.8

I ran an into an issue updating to NordVPN Version 3.8.8.
The extension said it couldn't connect to the Nordvpn Daemon.
A "nordvpn status" command returned "Whoops! Cannot reach System Daemon"

Here's the fix:.

groupadd nordvpn

usermod -aG nordvpn $USER

Reboot

Smaller icon

Can you make it so that I can toggle a smaller icon? As of right now it just looks out of place on my title bar.

image

Tool says: Not logged in

I am still getting not logged in on the tool. I am running the current version from the Gnome Extension website.

➜  nordvpn -v      
NordVPN Version 3.12.3

➜  echo '' | nordvpn login --nordaccount | grep -Po 'already logged'
already logged

 ➜  nordvpn login --nordaccount
You are already logged in.

 ✘1 ➜  nordvpn login              
You are already logged in.

After I connect through the cli, the extension properly displays the status.

Originally posted by @Mladia in #31 (comment)

Improvement: No color background

The option to turn off the colorful background would make the extension fit better into the else wise monochrome GNOME Status area.

Also this would be a (style wise) distinguishing factor from the other NordVPN extensions on the GNOME extensions site.

Clicking on the location marker does nothing

I can connect quickly just fine. I can list countries and groups and such via terminal.
However when I click the location marker in the menu nothing happens and the menu closes.
journalctl, syslog and gnome logs show nothing.

The other buttons work fine.

Before clicking:
image

After clicking:
image

I have tried relogging nordvpn and reinstalling the extension to no avail.
I am running Pop OS 20.10. Installed the extension through extensions.gnome.org.

Server list limited to 16 countries

Hi,

Since recently, sorry I don't when exactly (maybe since a recent nordvpn client update), the server list in the extension is reduced to 16 countries.

Those countries are: Austria, Belgium, Bosnia and Herzegovina, Canada, Cyprus, Czech Republic, Denmark, France, Germany, Hungary, Israel, Netherlands, Poland, Switchzerland, United Kingdom and United States.

screenshot_serverlist

The nordvpn client version is 3.12.4 running on Ubuntu 20.04.4 with last updates installed. Gnome version is 3.36.8.

screenshot_terminal

If I'm used the nordvpn client directly in the terminal to connect to a country not listed here (ie: ireland), it works fine and the extension detect correctly that I'm connected.

screenshot_connected

Please find screeshots to illustrate my request.
I don't know if it's normal or if it is an issue.
Thank you by advance for your time.

Error Loading Extension

Hi after updating dash to panel extension to version 23 i found the extension disappeared from the panel and i found that it has been disabled after the restart and it says : Error Loading Extension

so can you fix it please ?

My System is Manjaro 18.1.0 Juhraya
Kernel: x86_64 Linux 4.19.69-1-MANJARO
DE: GNOME 3.32.2
WM: Mutter
CPU: Intel Core i7-5500U @ 4x 3GHz

Causes freeze and stutter

Enabling this extension causes my screen to freeze (stutter) every one or two seconds. I suspect this is because it runs synchronously on the main gui thread and the extension stops for a fraction of a second to read and reload the status.
I'm not exactly sure but making the refresh functionality asynchronous might fix this issue.

This is one of my favorite extensions but this problem makes it almost unusable for me.
I'm running ArchLinux with gnome-shell 3.36.4 on X.

Thanks for your work.

Compact icon?

Which is the compact icon? I see a generic "No" symbol. Is that the compact icon?

Feature suggestion: allow user to save favorite locations (city/country)

Thank you for making a great extension! I've wanted exactly this thing for like a year.

One suggestion -- you allow folks to save a favorite server by adding whatever the current server is, but I think it might also be useful to allow folks to choose a particular country or city to save as favorites, since I think nordvpn does some load balancing to ensure you are connecting to the least busy of the servers that matches your request (of protocol, location, services, etc.). Which means hard-coding a particular server as a favorite might later mean connecting to a busy server, when really all you want to specify is a given jurisdiction.

It seems like this ought to be pretty easy to set up, since you can give the CLI a country or city as an argument, and it will connect to a server in that location.

Anyway, thank you again for making NordVPN more user friendly on Linux.

The login check is not working with 3.12.0

Using version 3.12.0 of the nordvpn-cli tool, the login check of the extension is not working anymore.
The new behavior is that the tool lets you log in and only after that it tells you whether you are already logged in or not.
It should be possible to bypass this when using the login --nordaccount option which is set to become the default in the future.

Furthermore, while debugging this, I noticed that I can't overwrite any of the commands in the advanced section even after enabling the toggle at the top.

Do let me know if you need more details.

Settings menu question

Hi, I have a quick question about one of your items on your ToDo list;

Add a 'settings' page for this extension.

Would you accept a PR with simple settings page in it? One the things I would personally like to see, is showing an icon only for example.

Panel Icon not displayed

Hello.

I have a minor issue. The extension icon on the panel is not being displayed (See image attached).

2022-08-05_08-57

I have tried using different icon theme (Papirus, Hicolor, Moka, Adwaita... etc) and they are all the same.

This is on Ubuntu 20.04 LTS.

I can see from the extension source code that it is trying to use the "network-vpn-symbolic" icon, but is this a universal icon name? I don't know at the moment, perhaps that's why it is not in the icon themes I tried.

Thanks.

Disconnected icon not vertically centered

The 'disconnected' icon isn't quite perfectly centered vertically I feel in the GNOME top bar. The connected 'key' icon is centered just right. I think the disconnected icon needs to be shifted down a couple pixels or so, and it'd be perfect. This is the smallest annoyance, affecting my OCD, lol.

It could also be that the icon should be made a touch smaller to match the size of the other top bar icons, so that it fits better.

It would also be cool if the icon were a NordVPN logo; maybe a dark one for disconnected, and light one for connected.

Colored icon background after icon reload, disregarding the setting

This is related to issue #14.
First, thank you for adding that option.

I have the colored status setting set to off.
After a reconnect or after locking the desktop the colored background is back again.
The setting has to be re-toggled to make it transparent again.

I am on Gnome 3.36.1

[AUR] Unauthenticated git protocol not allowed

When installing with the AUR package, I get an error about the git protocol no longer being supported by GitHub for unauthenticated access, directing me to https://github.blog/2021-09-01-improving-git-protocol-security-github/. By changing the source to git+https://github.com/AlexPoilrouge/NordVPN-connect.git, it fixed it and installed perfectly fine.

Please forgive me if this is the wrong place to be reporting this, but I couldn't see a more appropriate place.

Menubar icon does not change displayed status unless clicked

At some point recently (I don't recall exactly when / what version) the menubar icon displaying the NordVPN status stopped updating automatically when the VPN connection status changes. This is true when I connect or disconnect from NordVPN using the nordvpn command line tool, or when I connect to NordVPN using the extension. Disconnecting from NordVPN using the menu item does update the visual status indicator.

One of the things I really liked about the extension was having an always visible indicator of the VPN status, and this change kind of negates that feature, since I have to click on the menu bar to ensure that the displayed status is current.

Just wondering if this is something you've come across before and whether there's some easy fix. Thanks for making the extension!

I'm on Ubuntu 20.04.01, with Gnome 3.36.4, NordVPN 3.7.4, and NordVPN Connect version 14.

Nordvpn Official Icons

Hi, would you be interested to use the official nordvpn icon in the main repo, with blue/grayed-out colors to indicated status?

nvpn-off
nvpn-on

Thanks,

Ruan

Error with /usr/bin/bash

The extension should check whether bash is at /usr/bin/bash or somewhere else. I had to add a symlink in order to make it work.

Update GNOME Extensions release?

The latest version of the code seems to work perfectly for GNOME 42.1 (Ubuntu 22.04 LTS), but then downgrades every restart.

Maybe the packages needs to be re-published?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.