What's new

VPNMON VPNMON-R3 v1.3.7 -Oct 20, 2024- Monitor WAN/Dual-WAN/OpenVPN Health & Reset Multiple OpenVPN Connections (Now available in AMTM!)

  • 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!

I noticed that my city exits are no longer showing up. They simply show up blank. This happens under WAN and VPN.
 
Are they blank or do they show [n/a]?
I noticed that my city exits are no longer showing up. They simply show up blank. This happens under WAN and VPN.
 
Really weird. Works for me immediately on start. I'm starting it from command line...not AMTM.
Thanks Viktor, I'll test launching from terminal when I get back home and report back.
Again, it's not critical in any way, just a small delay. Mostly I posted up to let others know that if this happens to not worry, just wait a couple of minutes. ;)
 
@Viktor Jaep well, I tested it, exiting vpnmon and then re-launching directly from terminal using vpnmon-r3 -screen and it came right up.
Found that strange, so I exited and re-launched via amtm and this time no delay either.
🫤
No words. 😋
 
Again, what it takes is waiting for 2 full cycles and then everything works as normal, as I indicated in my posts :)
Yeah, I got that from your initial post. That's why I did not say "the script is getting stuck forever within the main loop when gathering the data …" Only that the script appears to be getting "stuck" *while* gathering the data …

IOW, to make it clear, my hypothesis is:

It seems like the script is getting "stuck" temporarily somewhere within the main loop while gathering the data to display on the screen.
 
I noticed that my city exits are no longer showing up. They simply show up blank. This happens under WAN and VPN.

Noticed Skynet was blocking ip-api.com which is queried by the script to display ip information in the cli this might be related but not sure.
...

Exactly... That's probably what was blocking city name lookups.

This kind of scenario (i.e. empty values) should be easy to handle. I recall there's already some code that checks the results of the curl cmd for specific "failure" strings, but most likely it's not handling NULL strings. I'll take a look while I'm fixing a minor issue that one of my cousins saw yesterday evening WRT incorrect elapsed time percentages when in the main loop.

UPDATE:
----------

I've submitted a PR to the 'develop' branch with the following fixes/improvements:

1) Modified code to handle scenarios where getting the "city exit" value returns an empty/NULL string.

2) Modified code to ignore invalid key presses within the main loop.

3) Added code to prevent updating the timer prematurely within the main loop due to repeatedly fast key presses.

4) Modified code to get elapsed time percentage values with 1 decimal place (e.g. 0.5%)
This allows displaying non-integer values for percentages of the elapsed time.​

The last fix is about showing 0% when the elapsed time was > 0 sec. This was recreated by setting the maximum loop timer to a large value (e.g. 600 sec.)

BEFORE Fix:

VPNMON-R3_TimerPercentageBad.jpg


AFTER Fix:

VPNMON-R3_TimerPercentageOK.jpg
 
Last edited:
I've submitted a PR to the 'develop' branch with the following fixes/improvements:
Thanks again, @Martinski! I really appreciate you continuing to look into this! I'm excited to take a look to see how you handled the invalid keypresses during the loop part. This has been a major frustration for me, especially in RTRMON. I hope I can duplicate your methods!
The last fix is about showing 0% when the elapsed time was > 0 sec. This was recreated by setting the maximum loop timer to a large value (e.g. 600 sec.)
Ahem... "legitimate rounding errors"?? :p
 
Thanks again, @Martinski! I really appreciate you continuing to look into this! I'm excited to take a look to see how you handled the invalid keypresses during the loop part. This has been a major frustration for me, especially in RTRMON. I hope I can duplicate your methods!
You're welcome. And, of course, feel free to reuse and port the code over to your other scripts. If you have any questions, you know where to find me. ;)

Ahem... "legitimate rounding errors"?? :p
Yeah, the issue was indeed caused by rounding off to the nearest integer value due to the method used to calculate it. In your particular case, getting a floating point number with one significant decimal place is sufficiently precise and makes it more meaningful to the user (IMO), especially when the maximum loop timer is set to a value much greater than 100 seconds.

RE: "legitimate rounding errors"??
Well... Your "OCD tendencies" might feel differently... 😄;)
 
Again, thank you @Martinski for the welcome changes and fixes! Here's what's new:

What's new:
v1.3.7 - (October 20, 2024)
- PATCH:
Modified code to handle scenarios where getting the "city exit" value returns an empty/NULL string.
- PATCH: Modified code to ignore invalid key presses within the main loop.
- PATCH: Added code to prevent updating the timer prematurely within the main loop due to repeatedly fast key presses.
- PATCH: Modified code to get elapsed time percentage values with 1 decimal place (e.g. 0.5%). This allows displaying non-integer values for percentages of the elapsed time.
- PATCH: More minor coding improvements & fine-tuning.
- PATCH: Fixed the Y/N prompts so they now require you to hit <enter> after typing either y or n. This changes its behavior from automatically moving on and possibly causing issues from people also using the enter key accidentally.

Download link:
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/VPNMON-R3/main/vpnmon-r3.sh" -o "/jffs/scripts/vpnmon-r3.sh" && chmod 755 "/jffs/scripts/vpnmon-r3.sh"

Significant Screenshots:
Check @Martinski's post for some of these changes:

 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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