What's new

VPNMON VPNMON-R2 v2.0 -Jul 10, 2022- Monitor your VPN connection's Health (Thread locked/closed)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

OK @JAX1337 ... please give this Beta 3 a try? Would love your feedback! If anyone else out there wants to send feedback - I'm all ears. Would love to hear from our Surfshark and Perfect Privacy friends as well! :)

Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-1.9b3.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"

Please make sure you step through the "-config" to address the 2 questions that affect your situation...

View attachment 42404

What's new since v1.9b2?
* ADDED:
new functionality thanks to a suggestion from @JAX1337... this will let you be able to use VPNMON-R2 reset connections based on best speed/ping to your pre-configured VPN client slots. Going through the "-config", new question 5 will let you choose whether you want it to randomly pick, or use the lowest ping when choosing your VPN servers. In the process, the UI now shows average ping going to each of your configured slots, and will notify you on the bottom of the UI if it has found a better server to connect to. You have the option in question 5a to specify how many chances you would like your current VPN connection to deal with other servers that might have a lower ping, giving your current connection a chance to recover. I have found that if you have other servers configured in your vicinity, there's a chance they will compete with each other, which would be causing your connection to drop and reconnect to the "now" fastest server repeatedly. This configurable counter will help alleviate this behavior. ;)
* CHANGED: reduced the amount of clutter that a reset produces on the screen, and is much less verbose, and looks much cleaner. Using on-screen indicators to show what's currently happening in the script. Will continue to refine these.
For 5a; I was thinking something simple.

From what I understand, according to the current condition 5a. The script actively looks for the shortest ping every 60 (default interval) and if another server has a lower ping, it is continuously checked for 5(times) x 60 (default Interval) i.e. for 5 mins and if It's still low, connection is switched to the new low ping server.

This is an amazing way to solve the ping problem, but too complicated for my small mind to comprehend.

The problem being, if one has 2 or more similar ping servers it would be switching back and forth too often like you mentioned.


I was thinking something simpler : i.e. Only when there is a reset, which could be because of a ping or server load, check for the lowest ping from among the other servers thereby eliminating the probability of constant back and forth.

Another problem with actively scanning is: if the switched server based on ping is having a higher load, which again brings us back to the beginning


1656827104685.jpeg


1656826649878.png



I have just started testing the script, will run it for 24hrs, will key an eye out and upload the logs once I see something,


I can already see a lot of activity in the logs, looks like it's going to be fun figuring this out
 
From what I understand, according to the current condition 5a. The script actively looks for the shortest ping every 60 (default interval) and if another server has a lower ping, it is continuously checked for 5(times) x 60 (default Interval) i.e. for 5 mins and if It's still low, connection is switched to the new low ping server.
That is correct...

This is an amazing way to solve the ping problem, but too complicated for my small mind to comprehend.
Lol... it was a workaround because I was experiencing the same continuous flipping between servers. ;)

The problem being, if one has 2 or more similar ping servers it would be switching back and forth too often like you mentioned.
That is exactly the problem, which is why the counter is an important piece to this to create some kind of stability. Throughout the night here, I've been testing and watching my own connection, and every so often I will see it give me the warning, that 4 or 3 more chances are left... but then it redeems itself and comes out to be the fastest connection, and resets the counter. And that was exactly what I was hoping for in order to make sure we see a stable connection. Increasing this to 10 would probably be even better in cases where there is lots of volatility.
I was thinking something simpler : i.e. Only when there is a reset, which could be because of a ping or server load, check for the lowest ping from among the other servers thereby eliminating the probability of constant back and forth.
Actually, it does do that. When it resets, it will check through each VPN connection and look for the fastest connection, and connect to it. In the case where you're using NordVPN SuperRandom, it will randomly assign 5 different VPN endpoint, and look for the fastest among those, and connect to it. I think in your case, if you're not regularly resetting the connection on a scheduled basis, you probably just want to increase the counter from 5 to something a bit higher, in order to create a higher order of stability on that connection.

Another problem with actively scanning is: if the switched server based on ping is having a higher load, which again brings us back to the beginning
Right, but before it reconnects, it will check each VPN client slot for the fastest connection, and then establish the tunnel using it.

I have just started testing the script, will run it for 24hrs, will key an eye out and upload the logs once I see something,

I can already see a lot of activity in the logs, looks like it's going to be fun figuring this out
I'm right there with you on that! Going to get some sleep, and will be checking some more logs tomorrow. ;) Thanks for your help and input on this!
 
Pleased to release v1.9! Happy 4th of July! :)

v1.9 - (July 3, 2022)
* ADDED:
A fourth qualifier variable thanks to @JAX1337 that will reset the VPN connection if the average ping across the tunnel is greater than the specified amount, in the hopes of eliminating a slow connection in favor of something a little faster. Please make sure you run through the config to change the default of 100ms to something you prefer.
* ADDED: new functionality thanks to a suggestion from @JAX1337... this option will let you be able to use VPNMON-R2 to reset connections based on best speed/ping to your pre-configured VPN client slots. Going through the "-config", new question 5 will let you choose whether you want it to randomly pick, or use the lowest ping when choosing your VPN servers. In the process, the UI now shows average ping going to each of your configured slots, and will notify you on the bottom of the UI if it has found a better server to connect to. You have the option in question 5a to specify how many chances you would like your current VPN connection to deal with other servers that might have a lower ping, giving your current connection a chance to recover. I have found that if you have other servers configured in your vicinity, there's a chance they will compete with each other, which would be causing your connection to drop and reconnect to the "now" fastest server repeatedly. This configurable counter will help alleviate this behavior. ;)
* ADDED: the capability to use a keypress from the main UI to get into the -setup menu using (S), or forcing a reset with the {R} key, and of course being able to gracefully exit using the (E) key. Please note, you can press these keys at any time, but they won't get picked up until the main progress bar starts its interval count. These keypress options are indicated at the top right of the UI at all times. Sounds like an opportunity to build in some Easter Eggs now. :)
* CHANGED: Enhanced and simplified some of the setup process when it comes to asking questions about NordVPN, SurfShark and PerfectPrivacy, and assigning variables to each. Also completely revamped the -config process to either let you start from scratch with default values, or use already existing values that you have modified in your current config file. Great suggestion by @iTyPsIDg to prevent you from having to continually modify the same entries over and over when a new version comes out.
* CHANGED: reduced the amount of clutter that a reset produces on the screen, and is much less verbose, and looks much cleaner. Using on-screen indicators to show what's currently happening in the script. Will continue to refine these.

Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-1.9.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"

vpnmon-r2-19.jpg
 
Pleased to release v1.9! Happy 4th of July! :)

I think I found a minor cosmetic cut'n'paste error. Question 13 in the "-config".

Trim Logs.jpg


Instead of "Trim Logs?" it is probably meant to say "Sync with YazFi?" or something like that I'm guessing?

Anyway, nice work @Viktor Jaep !

(Apologies for not paying enough attention during the Betas :D)
 
I think I found a minor cosmetic cut'n'paste error. Question 13 in the "-config".

View attachment 42431

Instead of "Trim Logs?" it is probably meant to say "Sync with YazFi?" or something like that I'm guessing?

Anyway, nice work @Viktor Jaep !

(Apologies for not paying enough attention during the Betas :D)
Lol! Nice catch, @Stephen Harrington! Fixed it. If anything else comes up, I'll issue a minor release.

PS. Guess I can't blame this one on the cat. Ha!
 
Last edited:
Minor version update to tidy up a couple small post-golive irritations on my end... ;)

v1.91 - (July 4, 2022)
* FIXED: Minor wording changes, small bug fixes from some stuff I've noticed while running it to help with further increasing stability.

Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-1.91.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"
 
Last edited:
Hello,

Firstly, nice script, it really helps me, so i thank you!

Secondly, when i am configured the new script, i noticed two things:

The first is that the script wrongly detects my router model has RT-AX58U_EPA and not has RT-AX82U (my actual router model);

Secondly, when i run the setup script, and go to setup and configure VPNMON, it gives me the option to install additionally
the CoreUtils-Timeout and Screen utility and i assume the VPNMON script, but when i say yes, it installs the first two, and then goes back to the initial setup screen without installing the VPNMON script.

To install, then, the VPNMON script, i must repeat the first step, and choose no, only then i succeed.

I don't know if it is a bug or by design...Can you confirm?
 

Attachments

  • Captura de ecrã 2022-07-05, às 21.55.04.png
    Captura de ecrã 2022-07-05, às 21.55.04.png
    335.5 KB · Views: 48
Hello,

Firstly, nice script, it really helps me, so i thank you!

Secondly, when i am configured the new script, i noticed two things:

The first is that the script wrongly detects my router model has RT-AX58U_EPA and not has RT-AX82U (my actual router model);

Secondly, when i run the setup script, and go to setup and configure VPNMON, it gives me the option to install additionally
the CoreUtils-Timeout and Screen utility and i assume the VPNMON script, but when i say yes, it installs the first two, and then goes back to the initial setup screen without installing the VPNMON script.

To install, then, the VPNMON script, i must repeat the first step, and choose no, only then i succeed.

I don't know if it is a bug or by design...Can you confirm?
Hey @kuki68ster! That's a GREAT catch... thank you so much. Yes, that is a bug - apparently I misspelled the function name. I've corrected it, and will be in a new version that I will release here shortly. ;)

So regarding the router model - I'm pulling this directly from NVRAM... so if you open up an SSH session and type:

Code:
nvram get model

What do you see? I found this site that mentions that the RT-AX58U_EPA is a Chinese router only? http://en.techinfodepot.shoutwiki.com/wiki/ASUS_RT-AX58U
 
Last edited:
Another minor release today - v1.92... sorry for the successive updates, but in preparation for some big news!

v1.92 - (July 5, 2022)
* FIXED:
A bug in the setup menu (thanks @kuki68ster), and now checks for the existence of the timeout and screen utilities - if they exist, then it just continues on to the configuration menu, bypassing the need to answer whether you want to install these two utilities.
* CHANGED: Resets the terminal colors on exit to play more friendly with other scripts.
* ADDED: An easter-egg. Let me know if you find it, and if it gave you a chuckle. ;)

Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-1.92.sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"
 
Let me know if you find it, and if it gave you a chuckle. ;)

How old IS your Boss that he'd be fooled by that? :D
Always hated WordStar anyway, got onto WordPerfect pretty quick smart!
Probably showing MY age I guess ...
 
How old IS your Boss that he'd be fooled by that?
Always hated WordStar anyway, got onto WordPerfect pretty quick smart!
Probably showing MY age I guess ...
Bahahah!! :) Easily fooled... but yeah, I agree. Wordperfect for DOS was amazing.
 
* ADDED: An easter-egg. Let me know if you find it, and if it gave you a chuckle. ;)
There's a small easter egg built into Diversion since March 2020, I'm still waiting for someone to report it.
 
Hey @kuki68ster! That's a GREAT catch... thank you so much. Yes, that is a bug - apparently I misspelled the function name. I've corrected it, and will be in a new version that I will release here shortly. ;)

So regarding the router model - I'm pulling this directly from NVRAM... so if you open up an SSH session and type:

Code:
nvram get model

What do you see? I found this site that mentions that the RT-AX58U_EPA is a Chinese router only? http://en.techinfodepot.shoutwiki.com/wiki/ASUS_RT-AX58U
Id does say RT-AX58U_EPA when i pull the router model directly from NVRAM.

I bought the router from a Chinese Online site, but it is the RT-AX82U model...
 

Attachments

  • Captura de ecrã 2022-07-06, às 08.38.22.png
    Captura de ecrã 2022-07-06, às 08.38.22.png
    55.6 KB · Views: 43
  • Captura de ecrã 2022-07-06, às 08.44.14.png
    Captura de ecrã 2022-07-06, às 08.44.14.png
    64.9 KB · Views: 43
Id does say RT-AX58U_EPA when i pull the router model directly from NVRAM.

I bought the router from a Chinese Online site, but it is the RT-AX82U model...
Well, as long as it continues to function on that AX82U level, I guess there's nothing to worry about, so you can ignore that info. Now at least you're aware incase any future issues arise. ;)
 
Will this script extend to wireguard aswell?
Once it becomes more mainstream, and a standard interface to manipulate it is in place on our routers, then I will certainly be working on expanding this to handle wireguard as well. I'm looking forward to it!
 
Once it becomes more mainstream, and a standard interface to manipulate it is in place on our routers, then I will certainly be working on expanding this to handle wireguard as well. I'm looking forward to it!
Very nice!
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top