openpyn-nordvpn icon indicating copy to clipboard operation
openpyn-nordvpn copied to clipboard

GUI

Open karlicoss opened this issue 8 years ago • 11 comments

Would be nice to have a support for simple GUI, e.g. a tray icon indicating connection status, country/server, button to kill VPN, etc. I might even try and do that myself once I have some free time, just leaving this issue as a reminder. P.S. also thanks for your work, great stuff. I have a kinda similar script for enforcing firewall rules and DNS, but your tool is clearly way more advanced and user friendly :)

karlicoss avatar Jun 06 '17 20:06 karlicoss

Its a really good idea. ATM I don't know how I should go about doing that. as I think the development would depend on the GUI environment? (Gnome, KDE). ATM, I was thinking of having something like a "status" command, which would display the status of the connection. (useful after running in --daemon mode). Thank you for the kind words :) I am glad you find it useful. I actually had a look at your script and I got the DNS servers' IPs from it.

jotyGill avatar Jun 07 '17 07:06 jotyGill

Why not use a very simple web gui? In this way you can help every OS ;)

Kipjr avatar Dec 02 '17 16:12 Kipjr

A tray icon with connection status and country/server would be very cool.


Maybe someone will find this useful in the meantime: I have the country and download speed displayed in my panel:

image

I use a panel applet that can display bash scripts outputs. I use commands that poll whois (for country code), and speedtest-cli (for download speed). On KDE I use Awesome Widget, on Ubuntu I used to use Sysmonitor Indicator.

The commands are:

Country (trimmed to just the abbreviation):

whois $(curl ipinfo.io/ip) | awk 'tolower($1) ~ /^country:/ { print $2 }'

Download speed (trimmed to just the number): python /path/to/dl-speedtest.py

#dl-speedtest.py

import speedtest
s = speedtest.Speedtest()
s.get_config()
s.get_best_server()
speed_bps = s.download()
speed_mbps = round(speed_bps / 1000 / 1000, 1)
print(speed_mbps)

Within applet settings, set refresh interval to something reasonable.

PS. If anyone has an idea of how I could get the server number displayed as well I'd really appreciate it. eg. us12 instead of just us Does openpyn have a way to check status or display server info in a simple output for example?

albaphysic avatar Feb 18 '18 04:02 albaphysic

@albaphysic thanks for pointing at sysmonitor indicator, nice stuff! As for server number.. I mean, it's a bit dirty but ps ax | grep $(pidof openvpn) | perl -n -e '/\/(\w+)\.nordvpn\.com/ && print $1' works :)

karlicoss avatar Mar 05 '18 22:03 karlicoss

Im going to start work on an Android GUI, which will be a JuiceSSH Plugin, which will use SSH to send commands to any device that supports SSH (personal pc/router)

Edit: The first public beta has been released

1951FDG avatar Mar 17 '18 09:03 1951FDG

@karlicoss Works great thanks :D I added | awk '{print toupper($0)}' to make it uppercase

albaphysic avatar Mar 27 '18 20:03 albaphysic

Writing a single script for Gnome/KDE may be possible with something like Argos (https://github.com/p-e-w/argos) which has a KDE version as well (https://github.com/lipido/kargos). I may look into this in the near future. I also tried utilizing the systemd gnome shell extension but that doesn't work very well and there's zero feedback about when you're connected. I also don't get Gnome notifications on connection any more but that's another story.

jayarc avatar Aug 27 '18 13:08 jayarc

@karlicoss works except when not connected it would be nice to have a feedback like 'nc' or 'null' if not connecten with vpn

Michele64 avatar Sep 02 '18 09:09 Michele64

@1951FDG Any progress on your JuiceSSH Plugin? I'd like to check it out.

sheafitzek avatar Oct 14 '18 14:10 sheafitzek

@sheafitzek it's almost done, https://github.com/1951FDG/openpyn-nordvpn-juiceSSH

Download will be available soon!!

1951FDG avatar Oct 15 '18 09:10 1951FDG

@sheafitzek it's ready, https://github.com/jotyGill/openpyn-nordvpn/issues/218

1951FDG avatar Nov 20 '18 16:11 1951FDG