myVPN (a simple VPN Client app)

Moderator: Forum moderators

Post Reply
mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

myVPN (a simple VPN Client app)

Post by mow9902 »

For some time I had been looking for a simple VPN implementation I could use. After some searching I settled on the service offered by Windscribe, because their implementation uses OpenVPN (which can be installed from the puppy repository) and a CLI client.
Inspired by OscarTalks and his VPN OnOff app I decided to try to wrap a GUI around the CLI client. This is the result.

It has been written for my bionic64 system and has also been fully tested on fossapup64.

I am a "weekend coder" and all of this has been a large learning curve for me. I know that parts of the code are inefficient, and some of it is 'verbose' - sometimes on purpose so I can easily understand my own code when I come back later to change it, and sometimes because I could not find a better way.

Anyway - all of the code is standard bash scripting with gtkdialog and YAD. Use it at your own risk.

This application has been created to be as “portable” as possible, and does not (itself) require any standard system installation.
It can simply be extracted from a zip file and placed in it’s own folder wherever the user chooses.

However, these two dependencies do require installation.
• the official Windscribe VPN CLI - download and install the appropriate .deb file for your system from https://windscribe.com/guides/linux
• OpenVPN - install from the official puppy repository using the Puppy Package Manager

Once you unzip the contents - click on myVPN.sh (this will place an icon in your system tray). You can then click on the icon to display the 'control' GUI

Last Update:
14 Dec 2022 : v2.30 -
(a) - Added line to turn windscribe firewall off after failed internet check, and then back on when internet resumed
(b) - Placed all instances of variable $myVPN in double quotes to allow for execution from a directory name containing spaces
(c) - Rewrote 'about' and 'help' sections

17 Feb 2022 : v2.27 - added new functionality to check if the web is accessible even though there is an already established network connection and VPN tunnel. + improved code efficiency.
01 Aug 2021 : v2.26 - Minor code cleanup
27 Jul 2021 : v2.25 - Check for existing VPN server connection and write formatted server name to /tmp/myVPN_server_choice.txt for reporting by netinfo.yad
04 Jul 2021 : v2.24 - corrected minor error in login script; set windscribe firewall to "off" during login process and set to "auto" after confirmed connection
16 Jan 2021 : v2.23 - replaced yad-splash with gtkdialog-splash for user messaging. Works better in fosspup
06 Dec 2020 : v2.22 - Server list is now sorted on refresh
03 Nov 2020: v2.21 - Added monitor to continuously check the status of the VPN connection
29 Sep 2020 : v2.00 - Added extra functionality to set value of additional windscribe config options
20 Sep 2020 : v1.01 - fix display of help contents
09 Sep 2020 : v1.0 - original version

Download from here:
https://www.mediafire.com/file/j02o4bvo ... ar.gz/file

Last edited by mow9902 on Wed Dec 14, 2022 4:32 am, edited 15 times in total.
user1111

Re: myVPN (a simple VPN app)

Post by user1111 »

Look great mow9902. Love the icons

xscreenshot-20200920T181606.png
xscreenshot-20200920T181606.png (84.12 KiB) Viewed 4184 times

Nice tray icon as well

xscreenshot-20200920T181738.png
xscreenshot-20200920T181738.png (9.22 KiB) Viewed 4184 times

I haven't a VPN account, was just trying it out as-is. Code looks neat as well :)

Information screen looks a bit weird for me though

xscreenshot-20200920T182040.png
xscreenshot-20200920T182040.png (217.89 KiB) Viewed 4184 times
mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: myVPN (a simple VPN app)

Post by mow9902 »

Thanks for the feedback rufwoof.

I will look into placing scroll bars in the information window display.
mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: myVPN (a simple VPN Client app)

Post by mow9902 »

I have tried to fix the display of the help information by adding scroll bars. Original post attachment has been replaced with latest version 1.01
mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: myVPN (a simple VPN Client app)

Post by mow9902 »

Original post attachment has been replaced with latest version 2.00
mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: myVPN (a simple VPN Client app)

Post by mow9902 »

Original post attachment has been replaced with latest version 2.21

User avatar
mikeslr
Posts: 2969
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 179 times
Been thanked: 925 times

myVPN- Windscribe Should work under FossaPup64

Post by mikeslr »

Hi mow9902,

Thanks for publishing your package. I just wanted to report that it should work under Fossapup64. My uncertainty results from the fact that I am not running it as intended and do not yet have an account with windscribe. The lack of the latter will shortly be rectified as I am also impressed by windscribe's offering.

As I maintain various Puppies I prefer running applications either as SFSes or portables that I can use from several. So, under Bionicpup64, I used your package in the following manner:
(1) Downloaded openvpn via Bionicpup64's Puppy Package Manager (or quickpet or a specific offering on the forum via web-browser --I've forgotten which). Edit: probably was OscarTalks' openvpn-2.4.8-x86_64-bionic.pet from here, http://smokey01.com/OscarTalks/
(2) Downloaded the windscribe deb appropriate for BionicPup64 from windscribe's website.
(3) Using taresh's PaDS, viewtopic.php?f=106&t=933&p=6906&hilit=PaDS#p6906 packaged the above as an SFS.
(4) UExtracted that SFS and copied its contents into a folder named Windscribe_bionic64-2.4.8.
(5) In that folder created an /opt directory into which I copied the contents of your package.
(5a) Also created a /usr/share/pixmaps folder into which I placed an appropriate icon, created a symlink "on the path" to your myVPN.sh executable now in /opt, and a /usr/share/applications/windscribe.desktop with arguments to the icon and the symbolic link.
(6) Right-clicked the Windscribe_bionic64-2.4.8 folder and selected dir2sfs to create the windscribe.sfs.

Under both Bionicpup64 and Fossapup64, loading that SFS initially and later via the menu entry opened your GUI which seemed to be fully responsive. ListDD of the /usr/bin/windscribe and /usr/sbin/openvpn showed no missing dependencies. So I think all I now need is an account. :D

Addendum: I tried using fredx181's create-portable-AppImage, http://murga-linux.com/puppy/viewtopic. ... 2e#1011814 to create an AppImage from the Windscribe_bionic64-2.4.8 folder. This was not successful. :(

mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: myVPN (a simple VPN Client app)

Post by mow9902 »

Thanks for the information mikesir

Seems like a lot of trouble to get running as an SFS, but whatever 'floats you boat'. We all have our preferences. I will be interested to see the result when you have it working. :thumbup:

mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: myVPN (a simple VPN Client app)

Post by mow9902 »

loaded a minor variation today v2.23 - see first post for download link
16 Jan 2021 : v2.23 (replaced yad-splash with gtkdialog-splash for user messaging. Works better in fosspup)

joet12345
Posts: 305
Joined: Sun Apr 04, 2021 12:00 am
Has thanked: 15 times
Been thanked: 6 times

Re: myVPN (a simple VPN Client app)

Post by joet12345 »

Nice app :thumbup:

I have been playing with it for a short time and I am experiencing task bar icon blinking constantly. It is a distraction...any fix for this? I am using fossapup64 thanks.

FredW
Posts: 19
Joined: Sun Nov 08, 2020 8:46 pm
Been thanked: 1 time

Re: myVPN (a simple VPN Client app)

Post by FredW »

I'm grateful for myVPN but it seems to me there should be a way to stop using it without bringing down my internet connection, which is what happens to me now (right at the point where myVPN says "Reconnecting to network") on Fossapup64, and causes me to have to connect again.

But I've noticed that once I've run myVPN after starting Puppy, I can use Windscribe through terminal commands to login and connect; but if I haven't used myVPN yet that day, I can't connect. Instead I get a message:

"Windscribe is not running. Start with: sudo systemctl start Windscribe"

But if I try that, I'm returned from sudo: "systemctl: command not found" Do you know how I can start Windscribe on my own without using myVPN? Is there a command or two I could get things going to the point where I could log in and connect? Once I get over the hurdle of getting Windscribe running, I actually prefer using the terminal commands, which seem quite straightforward.

P.S. Several other observations: Without having started myVPN, if I type at the terminal "Windscribe login", Windscribe says I am already logged in even though I'm trying to use it for the first time that day. If I start myVPN, I still need to run myVPN from the "Run" slider to be able to connect using the terminal instead of getting the previously mentioned "Start with sudo ...." message. And if I turn off myVPN, and, after reconnecting to the internet, try to connect to Windscribe from the terminal, I then have to login before I can connect to Windscribe, which, by the way, always seems to remember the location I connected to, even after having stopped Puppy.

mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: myVPN (a simple VPN Client app)

Post by mow9902 »

Regarding the 'blinking icon' question posed by joet12345

Refer to page page 3 and page 6&7 of the manual.

When using a VPN it is important that you can rely on its stability ie there is nothing worse than using the system thinking that the VPN is active when it is not. The blinking icon is a visual confirmation of the state of the VPN, and I don't plan to make any changes to this.

When the application is launched it also launches a program called vpnmonitor.sh to invoke a continuous loop while myVPN is running to regularly check that status of the VPN tunnel and update the tray icon accordingly.

However - if you find the blinking icon distracting, you can change the frequency of the monitoring program using the config facility. (refer page 6&7). Simply change the frequency to a large value like 300 seconds ...and the blink will happen less frequently.

mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: myVPN (a simple VPN Client app)

Post by mow9902 »

FredW wrote: Wed May 05, 2021 6:52 pm

I'm grateful for myVPN but it seems to me there should be a way to stop using it without bringing down my internet connection, which is what happens to me now (right at the point where myVPN says "Reconnecting to network") on Fossapup64, and causes me to have to connect again.

But I've noticed that once I've run myVPN after starting Puppy, I can use Windscribe through terminal commands to login and connect; but if I haven't used myVPN yet that day, I can't connect. Instead I get a message:

"Windscribe is not running. Start with: sudo systemctl start Windscribe"

But if I try that, I'm returned from sudo: "systemctl: command not found" Do you know how I can start Windscribe on my own without using myVPN? Is there a command or two I could get things going to the point where I could log in and connect? Once I get over the hurdle of getting Windscribe running, I actually prefer using the terminal commands, which seem quite straightforward.

P.S. Several other observations: Without having started myVPN, if I type at the terminal "Windscribe login", Windscribe says I am already logged in even though I'm trying to use it for the first time that day. If I start myVPN, I still need to run myVPN from the "Run" slider to be able to connect using the terminal instead of getting the previously mentioned "Start with sudo ...." message. And if I turn off myVPN, and, after reconnecting to the internet, try to connect to Windscribe from the terminal, I then have to login before I can connect to Windscribe, which, by the way, always seems to remember the location I connected to, even after having stopped Puppy.

Response:

To connect to windscribe you would normally:

  • connect to the windscribe network (windscribe connect)
    login to windscribe (windscribe login)
    activate the windscribe firewall (windscribe firewall on)

To disconnect from the windscribe network you can:

  • de-activate the windscribe firewall (windscribe firewall off)
    logout from the windscribe network (windscribe logout)
    disconnect from the windscribe network (windscribe disconnect)

However, IF you disconnect a session BUT do not logout first, the windscribe connection will be closed, BUT the login session will still remain on the windscribe servers.

If you wish to establish a VPN session again later then IF you did not logout after your last session, then the new connection will simply reconnect with the existing login session which is still running.
This is what the myVPN app does. When it starts it checks if there is an existing windscribe login session still active, and if there is, then it uses it. If there is no existing windscribe login session, then it prompts for you to re-enter your login credentials.

When you make a connection to the windscribe service, it also includes a firewall functionality. This firewall prevents any network access if the windscribe VPN session is interrupted or drops out for any reason. The user can set this firewall to a state of ON, OFF, or auto (which will be ON when a connection is first made and OFF when a session is disconnected).
However - if you have the windscribe firewall set to ON (or auto) and the windscribe VPN connection drops out (perhaps a power failure or whatever) then the windscribe firewall will remain set to ON and when you restart your PC you will not have access to any network since your windscribe session was interrupted and the windscribe firewall will prevent access to/from any other network.

So, I have designed the myVPN app so that when you choose to 'Stop the VPN' it will:

  • issue a windscribe firewall auto command
    issue a windscribe disconnect command

After this, to make sure that all PC network settings are correct for the local network, it re-connects to the local networking using the default network connection script. On bionicpup64 (and probably most other puppies) this is "/usr/sbin/network_default_connect"

So, when you click the 'Stop the VPN' button it correctly tries to re-connect to the local network and in doing so will drop and refresh your current network connection. This does mean a small delay while this happens ...but if you wait...it should reconnect successfully.
I have no plans to change the way this works, because this makes sure that once the windscribe connection is stopped (either deliberately or by some accident) you can once more have access to your local network and internet.

If the myVPN app is giving you some problems, then yes - please just perform all of the actions required directly from the terminal using the windscribe executable. Just be aware of your connection and the windscribe firewall setting so you don't find yourself 'locked' out from both the windscribe network and your local network.

joet12345
Posts: 305
Joined: Sun Apr 04, 2021 12:00 am
Has thanked: 15 times
Been thanked: 6 times

Re: myVPN (a simple VPN Client app)

Post by joet12345 »

mow9902 wrote: Sat May 08, 2021 10:52 pm

Regarding the 'blinking icon' question posed by joet12345

Refer to page page 3 and page 6&7 of the manual.

When using a VPN it is important that you can rely on its stability ie there is nothing worse than using the system thinking that the VPN is active when it is not. The blinking icon is a visual confirmation of the state of the VPN, and I don't plan to make any changes to this.

When the application is launched it also launches a program called vpnmonitor.sh to invoke a continuous loop while myVPN is running to regularly check that status of the VPN tunnel and update the tray icon accordingly.

However - if you find the blinking icon distracting, you can change the frequency of the monitoring program using the config facility. (refer page 6&7). Simply change the frequency to a large value like 300 seconds ...and the blink will happen less frequently.

Thanks for the explanation I will look into it further...

But for now,

I just Autohide the taskbar...simple solition. :thumbup:

User avatar
mikeslr
Posts: 2969
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 179 times
Been thanked: 925 times

Re: myVPN (a simple VPN Client app)

Post by mikeslr »

You've posted to the "myVPN (a simple VPN Client app)". Your questions do not directly pertain to that application.
You've been with us long enough to know that each Puppy has its own Section or Thread and each Application its own thread; that the Beginner's Section is the place to post questions relating to getting a Puppy up-running-and-functioning-properly; and that the User's Section is the place to ask about general technical matters especially if those matters do not directly pertain to One Puppy or One Application.
In replying to a question the answer may have to be broad and far-reaching. But the question, itself, should be posted in a Section where people likely to provide an answer will find the question, and people in the future having similar questions are likely to look for answers.
It is everyone's responsibility to try to maintain some order to the Forum so that information already provided can in the future be easily found. Please respect the decorum of the Forum and the time of those who voluntarily try to provide help in the areas where they have knowledge.

mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: myVPN (a simple VPN Client app)

Post by mow9902 »

myVPN version 2.27 posted. See link in original entry

mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: myVPN (a simple VPN Client app)

Post by mow9902 »

myVPN version 2.30 posted - see link in original entry

Post Reply

Return to “Network”