Alright, then I have some artistic critique on what can be outputted
Svrs - will one really ever go up to 9999 servers in the list? Seems like 99 would be enough, or at least 999? So minus 1 or 2 characters
Health - looks good
"VPN State" - too wide, call it "Link", and say ON or OFF ? YES or NO ? ...
"Public VPN IP" - looks good
"Ping" - would be OK to just do 3 or 4 digits, no decimals.
"City Exit / Time" - split into "Time" (goes first since it's fixed width), then City Exit (goes last)
Extra credit - some additional useful statistics to consider, say you are going to track the last 20 (N) pings:
percent of successful pings out of last N or less if just started
average successful ping in ms
standard deviation of the successful pings
For this one has a couple of arrays of N length, keep success [0 or 1], and ping value. Then as the values reach the end, start overwriting. Keep track of sum of x, and sum of x^2, so you can calculate standard deviation. So when overwriting you remove the oldest x from the sum of x, and x^2, and add the new one. If reconnecting - clear everything.
Code:
VPNMON-R3 - v1.3.5 (S)how/(H)ide Operations Menu Mon Sep 30 08:25:40 CDT 2024
Slot | Mon | Svrs | Health | VPN State | Public VPN IP | Ping-->VPN | City Exit / Time
-------|-----|--------|--------|--------------|-----------------|------------|---------------------------------
VPN1 | [X] | [0004] | [ OK ] | Connected | 108.181.092.050 | [0012.538] | Dallas: 0d 00h:42m
VPN2 | [X] | [0007] | [ OK ] | Connected | 037.120.157.250 | [0034.783] | Miami: 0d 00h:07m
VPN3 | [ ] | [0000] | [n/a ] | Disconnected | [n/a] | [n/a] | [n/a]
VPN4 | [ ] | [0000] | [n/a ] | Disconnected | [n/a] | [n/a] | [n/a]
VPN5 | [ ] | [0000] | [n/a ] | Disconnected | [n/a] | [n/a] | [n/a]
-------|-----|--------|--------|--------------|-----------------|------------|---------------------------------
6s / 10% [e=Exit] [Selection? ]
Svrs - will one really ever go up to 9999 servers in the list? Seems like 99 would be enough, or at least 999? So minus 1 or 2 characters
Health - looks good
"VPN State" - too wide, call it "Link", and say ON or OFF ? YES or NO ? ...
"Public VPN IP" - looks good
"Ping" - would be OK to just do 3 or 4 digits, no decimals.
"City Exit / Time" - split into "Time" (goes first since it's fixed width), then City Exit (goes last)
Extra credit - some additional useful statistics to consider, say you are going to track the last 20 (N) pings:
percent of successful pings out of last N or less if just started
average successful ping in ms
standard deviation of the successful pings
For this one has a couple of arrays of N length, keep success [0 or 1], and ping value. Then as the values reach the end, start overwriting. Keep track of sum of x, and sum of x^2, so you can calculate standard deviation. So when overwriting you remove the oldest x from the sum of x, and x^2, and add the new one. If reconnecting - clear everything.