vpnmon [BETA] VPNMON-R2 BETA is currently closed... thank you for participating!

Viktor Jaep

Very Senior Member
Calling all beta testers! Some new functionality has been added for NordVPN users that I would like to open up for others to try. This is a major change in how VPN slots are selected, using NordVPN's built-in "recommended servers" selection, allowing you to easily connect to the closest/fastest servers to your location. VPNMON-R2 will pick up to 5 of these recommended servers and populate your VPN slots with these NordVPN hosts. If you are located in a different country, and you've configured your default country to be a country different than your own, it will pick "recommended servers" for the country you have specified in the config!

What's new?:
v2.24b6 - (TBA)
- ADDED:
Included new "Recommended Server(s)" functionality for NordVPN users! As with the PC/Mobile app, when hitting the "Quick Connect" button, you are taken to the nearest, most fastest servers to your location. This functionality has now been built into VPNMON-R2, allowing you to fill your 1-N VPN slots with a selection of the closest/fastest NordVPN end points. Thanks to @monakh for the great suggestion! Make sure you go into the config menu -> option #6 -> when selecting NordVPN you will have the option to choose this functionality as long as you do not enable "SuperRandom", as it operates completely opposite from using NordVPN's recommended servers function. NOTE: Recommended servers are chosen from the country you have specified as your home country under the config options.
- CHANGED: Included JQ as part of the prerequisites needed to be installed when VPNMON-R2 is set up for the first time. This was my error, thinking that the JQ tool was either already installed by default, or came along with an Entware install by default. Now, when going into Setup -> Config, the script will check for the existence of JQ, and will prompt an install if it's not already present under /opt/bin. JQ is necessary for pulling data from the various supported VPN Providers in order to populate VPN host lists for the country you have configured. Added a check when the script starts up to ensure that all prerequisites are in place before running the script. Thanks to @monakh for noticing this behavior with JQ on a fresh install of VPNMON-R2!
- CHANGED: The behavior of the (R)eset button no longer waits to initiate a reset until the timer runs out, and begins the reset function process immediately. Same goes going to/from the (S)etup menu, and is now exiting directly back into the main VPNMON-R2 UI loop without waiting.
- CHANGED: Revamped the reset conditions screens, which now display on a cleared page, instead of appending the reset output to the main UI.
- CHANGED: Joined the reset condition checks together into their own function in order to allow the (R)eset command to work instantaneously, instead of waiting for a cycle to finish.
- FIXED: I "may" have repaired the elusive unbound operand error that would occasionally appear on the main UI.

Significant Screenshots:

vpnmon-r2-224b4-2.jpg
vpnmon-r2-224b4-1.jpg


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

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

SomeWhereOverTheRainBow

Part of the Furniture
I thought I'd put this into its own thread for visibility reasons... Calling all WeVPN beta testers! VPNMON-R2 v2.20b1 officially supports WeVPN, including SuperRandom(r) and Multi-Country SuperRandom(r)!! :) I'm looking to see if one of you might be able to please give this a whirl, make sure it behaves OK with WeVPN client slots, is populating your slots with the right info, randomly making a new connection when dropped/reset, and that the SuperRandom functionality works. If you wouldn't mind posting or PM'ing me a screenshot to make sure everything looks right on your end in the UI? Thank you!! That saves me having to spend $$$ on a WeVPN subscription, but I will if necessary. Lol

1660877666719.png



Please note: WeVPN does not provide server loads (yet), and will incorporate that when it becomes available. Also, they don't provide straight IP addresses for their VPN hosts, which makes it more difficult to make it compatible with Skynet, so these two options are grayed out.

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

Stable Release:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.15sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"
I am getting there. Let you know soon how it is! ;)
 

Don->

Occasional Visitor
I thought I'd put this into its own thread for visibility reasons... Calling all WeVPN beta testers! VPNMON-R2 v2.20b1 officially supports WeVPN, including SuperRandom(r) and Multi-Country SuperRandom(r)!! :) I'm looking to see if one of you might be able to please give this a whirl, make sure it behaves OK with WeVPN client slots, is populating your slots with the right info, randomly making a new connection when dropped/reset, and that the SuperRandom functionality works. If you wouldn't mind posting or PM'ing me a screenshot to make sure everything looks right on your end in the UI? Thank you!! That saves me having to spend $$$ on a WeVPN subscription, but I will if necessary. Lol

1660877666719.png



Please note: WeVPN does not provide server loads (yet), and will incorporate that when it becomes available. Also, they don't provide straight IP addresses for their VPN hosts, which makes it more difficult to make it compatible with Skynet, so these two options are grayed out.

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

Stable Release:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R2/master/vpnmon-r2-2.15sh" -o "/jffs/scripts/vpnmon-r2.sh" && chmod a+rx "/jffs/scripts/vpnmon-r2.sh"
There is a typo in the stable release i think it should be ........../vpnmon-r2-2.15.sh" - a missing "."
 

Viktor Jaep

Very Senior Member
There is a typo in the stable release i think it should be ........../vpnmon-r2-2.15.sh" - a missing "."
Nice find! ;) Fixed!
 

IKNOWNOTHING

New Around Here
Viktor Jaep,

Excellent work on vpnmon-r2. I really love the script and it is perfect for recovering from dropped VPN connections. I would suggest a minor change in your next version. I used to run several vpn's simultaniously each in another country, but vpnmon-r2 resets all vpn's that startup on boot. Would it be possible to only reset the vpn's that were entered as available vpn slots while configuration vpnmon-r2?

thanks in advance
 

Viktor Jaep

Very Senior Member
Viktor Jaep,

Excellent work on vpnmon-r2. I really love the script and it is perfect for recovering from dropped VPN connections. I would suggest a minor change in your next version. I used to run several vpn's simultaniously each in another country, but vpnmon-r2 resets all vpn's that startup on boot. Would it be possible to only reset the vpn's that were entered as available vpn slots while configuration vpnmon-r2?

thanks in advance
Thanks @IKNOWNOTHING, that is a really great request! I didn't even think of that until you just mentioned this, because yes, it does kill all 5 client slots no matter how many you actually have configured. I'll get that in before the next release. ;)
 

Viktor Jaep

Very Senior Member
@Viktor Jaep Wow, what a great and friendly response! Thank you very much. I will be looking out for it :D
Hey @IKNOWNOTHING ... I've thrown Beta 2 out there that takes care of your issue with only killing the configured number of VPN slots now. Please let me know how it works out for you, OK?

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

Viktor Jaep

Very Senior Member
New BETA is available... enjoy! :)

See the [OP]!
 

kuki68ster

Occasional Visitor
Hello,

After installing the beta i got the following error, when trying to access amtm:

ASUSWRT-Merlin RT-AX86U 386.7_2 Sun Jul 24 21:37:08 UTC 2022
[email protected]:/tmp/home/root# amtm
/usr/sbin/amtm: /jffs/addons/amtm/availUpd.txt: line 10: syntax error: unterminated quoted string
[email protected]:/tmp/home/root#

The router is working as it should, apart from the error...

Apart from reinstalling from scratch amtm, what can i do?

Thanks for the help
 

Attachments

  • Captura de ecrã 2022-09-27, às 20.58.24.png
    Captura de ecrã 2022-09-27, às 20.58.24.png
    75.8 KB · Views: 6

Viktor Jaep

Very Senior Member
Hello,

After installing the beta i got the following error, when trying to access amtm:

ASUSWRT-Merlin RT-AX86U 386.7_2 Sun Jul 24 21:37:08 UTC 2022
[email protected]:/tmp/home/root# amtm
/usr/sbin/amtm: /jffs/addons/amtm/availUpd.txt: line 10: syntax error: unterminated quoted string
[email protected]:/tmp/home/root#

The router is working as it should, apart from the error...

Apart from reinstalling from scratch amtm, what can i do?

Thanks for the help

This is what mine currently comes back with... what does your availUpd.txt look like?

Code:
vpnmonUpate="<- v2.22"
vpnmonMD5="d6eca2e4d7c8d1b320b1c0c8e9b34c96"
 

Viktor Jaep

Very Senior Member
The next daily beta - v2.24b5 is now available... this is what's new:

- CHANGED: Revamped the reset conditions screens, which now display on a cleared page, instead of appending the reset output to the main UI.
- FIXED: I "may" have repaired the elusive unbound operand error that would occasionally appear on the main UI. FYI: @monakh!

See the [OP] for the download link!
 

Viktor Jaep

Very Senior Member
The next daily beta - v2.24b6 is now available - here's what's new:

- CHANGED: Joined the reset condition checks together into their own function in order to allow the (R)eset command to work instantaneously, instead of waiting for a cycle to finish.

See the [OP] for the download link!
 

monakh

Regular Contributor
Alright, here's an update from me on B3 / AXE16000.

As you know, I have been trying really hard to capture the "WAN down" issue via the troubleshooting script, but running it at the same time as B3 effectively resulted in random reboots within minutes of running the two together. In any event, I have given up on trying to discern exactly what "State: 2" means because it NEVER changes, at least not during the failures I have been experiencing.

So, today, I updated to B6 and have left out the troubleshooting script, let's see if the router stays stable. I think this AXE16000 hardware is just too new. It will take time to sort out all the various different kinks. You're ahead of the curve, though, methinks.

As an aside, it's very odd that the script only pulls recommended servers from a single city only. In my case, it is NY (used to be Tel Aviv, if you recall from a couple of days back). Is there a way to check if it's just me/my location or something else at play? When I go to the Nord recommended server site via the web browser, I get a different city every time.

Edit: Here's the log--on second thought, I don't think it's the troubleshooting script, could be AMTM:

A couple of days back:
Sep 27 23:07:37 kernel: Hardware name: GTAXE16000_2GB (DT)
Sep 27 23:07:37 kernel: pstate: 200f0010 (nzCv q A32 LE aif)
Sep 27 23:07:37 kernel: pc : 00000000f7c1c9d8
Sep 27 23:07:37 kernel: lr : 0000000080808080
Sep 27 23:07:37 kernel: sp : 00000000ffd0f920
Sep 27 23:07:37 kernel: x12: 0000000000000000
Sep 27 23:07:37 kernel: x11: 0000000000000000 x10: 000000000007e66c
Sep 27 23:07:37 kernel: x9 : 00000000f6afd008 x8 : 00000000000a387e
Sep 27 23:07:37 kernel: x7 : 0000000000000010 x6 : 0000000000000000
Sep 27 23:07:37 kernel: x5 : 00000000000a3884 x4 : 00000000fefefeff
Sep 27 23:07:37 kernel: x3 : 0000000000000000 x2 : 0000000000000000
Sep 27 23:07:37 kernel: x1 : 0000000000000107 x0 : 0000000000000000
Sep 27 23:13:46 kernel: Ax:4x:Bx:Bx:7x:2x not mesh client, can't delete it
May 5 08:05:21 syslogd started: BusyBox v1.25.1
May 5 08:05:21 crashlog: ^A
May 5 08:05:21 crashlog: <4>INFO MerlinSupport::merlin16_serdes_init(): END Merlin Initialization procedure
May 5 08:05:21 crashlog: <4>MerlinSupport::merline_speed_set_core(): Step 7 Config Speed to 2
May 5 08:05:21 crashlog: <4>--- Step 8 PLL/PMD setup configuration for speed 0, mode 13.

Just now:
Sep 29 21:02:07 kernel: Ax:4x:Bx:Bx:8x:9x not mesh client, can't delete it
May 5 08:05:21 syslogd started: BusyBox v1.25.1
May 5 08:05:21 kernel: klogd started: BusyBox v1.25.1 (2022-08-13 16:53:39 EDT)
May 5 08:05:21 kernel: Booting Linux on physical CPU 0x0000000000 [0x420f1000]
May 5 08:05:21 kernel: Linux version 4.19.183 ([email protected]) (gcc version 9.2.0 (Buildroot 2019.11.1)) #1 SMP PREEMPT Sat Aug 13 16:53:54 EDT 2022
May 5 08:05:21 kernel: Machine model: GTAXE16000_2GB

I am getting this "not mesh client" quite a bit but it's only when I run either AMTM or VPNMON that the router reboots after that error (my money is on AMTM at the moment). No clue what that means!
 
Last edited:

Viktor Jaep

Very Senior Member
As you know, I have been trying really hard to capture the "WAN down" issue via the troubleshooting script, but running it at the same time as B3 effectively resulted in random reboots within minutes of running the two together. In any event, I have given up on trying to discern exactly what "State: 2" means because it NEVER changes, at least not during the failures I have been experiencing.
I really appreciate the report, @monakh! Have you been able to look at the log it generates under /jffs/scripts/wan0mon.log? That would be the smoking gun, if there are instances where it flips to a different state than 2 that would somehow cause vpnmon-r2 to fall into that weird loop? State:2 means "connected", which is the normal state it should be in.

Random reboots would be a MAJOR concern. A simple script like this should not be causing reboots. I would definitely look into this further! Or even post some event logs into the main thread for RMerlin or others to dissect?

So, today, I updated to B6 and have left out the troubleshooting script, let's see if the router stays stable. I think this AXE16000 hardware is just too new. It will take time to sort out all the various different kinks. You're ahead of the curve, though, methinks.
The hardware may be new, but the Merlin firmware running on there is new as well. Definitely some opportunities to see if we can find any behaviors or bugs that we can report to RMerlin. ;)

As an aside, it's very odd that the script only pulls recommended servers from a single city only. In my case, it is NY (used to be Tel Aviv, if you recall from a couple of days back). Is there a way to check if it's just me/my location or something else at play? When I go to the Nord recommended server site via the web browser, I get a different city every time.
The way I understand it, these would be the fastest/lowest load/lowest latency servers that are closest to you from a connection standpoint. I'm going to guess that the main pipe that traffic takes coming from across the pond/Tel Aviv exits in NY. The NordVPN API I use basically gives me a list of about 30 servers that it sorts in fastest order, and I pick the top 5 to use. I noticed that even the vast majority of these 30 servers are all located in the same city. It did the same thing for me when I was testing locally to Atlanta, and when picking other countries. These are what NordVPN programmatically recommends... so who am I to argue, right? LOL. It would be interesting to see what location these recommended servers are that it recommends using a tool like this https://www.iplocation.net/ip-lookup -- and I would also be scratching my head if they're not all NY servers. ;)
 

monakh

Regular Contributor
Aha, I FORGOT to mention the 'smoking gun'. There is NO log being generated as part of the script. Sorry, should have led with that! I have started it again, let's see what happens. What I meant to say earlier is that I have given up on what state: 2 means because it never seems to change even though the WAN goes offline (an entry in the log and everything yet it doesn't change).

I updated the post above with some sys log entries. If I were to guess, it would be a memory leak being caused by something (but only when the scripts are running). I have been checking the scMerlin stats once in a while and the remaining memory is in double-digits MB. When I left the router alone without running AMTM, VPNMON or the WAN-check script, there were no reboots for two days.

OK, the connection points to the cities in terms of speed/load/latency make sense. Wish I could diversify though!

Edit: K 20 minutes later, memory is down to < 200 MB. It's definitely a memory leak. The question is what? It's only happening when I run the scripts (they are both running in their own screen). Can't be screen, that's decades-old solid code!
 
Last edited:

Viktor Jaep

Very Senior Member
Aha, I FORGOT to mention the 'smoking gun'. There is NO log being generated as part of the script. Sorry, should have led with that! I have started it again, let's see what happens.
So yeah, it would need to run continuously to be able to generate any log entries should the router be changing wan states...
I updated the post above with some sys log entries. If I were to guess, it would be a memory leak being caused by something (but only when the scripts are running). I have been checking the scMerlin stats once in a while and the remaining memory is in double-digits MB. When I left the router alone without running AMTM, VPNMON or the WAN-check script, there were no reboots for two days.
Wow... I don't know what to make of it. Mesh client means that it's looking for a secondary router to join to the mesh, or perhaps you had a mesh client before that it's not liking and can't get rid of? I would recommend posting this in the main Merlin thread, and seeing if someone might be able to help analyze that... it may need to get run by RMerlin.
OK, the connection points to the cities in terms of speed/load/latency make sense. Wish I could diversify though!
That's why I created SuperRandom(r)!! :p

Edit: K 20 minutes later, memory is down to < 200 MB. It's definitely a memory leak. The question is what? It's only happening when I run the scripts (they are both running in their own screen). Can't be screen, that's decades-old solid code!
Again... more tell-tale signs that we may be dealing with some bugs here. I'd run that by the main thread as well... You might be able to use the tool Top or HTop to see if you can find out what's taking up that memory?
 

monakh

Regular Contributor
And another ten minutes after that, reboot. Looks like it's only happening now with the scripts. Let me revert back to the stable v2.22 just to rule out VPNMON. Let's do the basic troubleshooting before I mention it in the Merlin thread, he's super-no-nonsense, I need to have my ducks in a row :D

Can super-random work in tandem with recommended servers? That would awesome!
 

Viktor Jaep

Very Senior Member
And another ten minutes after that, reboot. Looks like it's only happening now with the scripts. Let me revert back to the stable v2.22 just to rule out VPNMON. Let's do the basic troubleshooting before I mention it in the Merlin thread, he's super-no-nonsense, I need to have my ducks in a row :D
I don't know of anything in any script that would cause a crash... I once built a proof of concept script that exposed a flaw in the AC86U that proved that a simple NVRAM GET statement would hang the script... but it didn't reboot anything. :) I don't think reversion is going to help either... but let me know how it goes, and yes... definitely have your ducks in a row. lol

Also know you are basically running a preview version for the AXE16000... nobody else is on that level of code yet. So I'm sure he's going to be very interested in hearing about this. And the memory leak behavior as well! ;)

Can super-random work in tandem with recommended servers? That would awesome!
I think the next step here would be to allow you to pick which cities you'd like to get recommended servers from. Right now, I'm just giving you the fastest ones available. :)
 

Sign Up For SNBForums Daily Digest

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