What's new

VPNMON VPNMON-R3 Custom Server List Generation Tutorials and Examples

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

You definitely have a gift, and what seems a much easier time developing these statements than I do! :)

I gave your "for i" loop sample a try, and while New York resulted in 3 returns, Alabama (as in @JTnola's case) only comes back with 1 result for me... I would have expected 5 for each... I wasn't sure if posix could handle a loop like that, so I changed it up... also added a sleep 1 in there, to see if that would cause the API to give me more IPs as well... so this statement consistently gives me 4 IPs:

Code:
i=0; while [ $i -ne 5 ]; do i=$((i + 1)); curl --silent --retry 3 --connect-timeout 3 --max-time 6 --retry-delay 1 --retry-all-errors https://serverlist.piaservers.net/vpninfo/servers/v6 | jq --raw-output '.regions[] | select(.name=="US Alabama") | .servers.ovpnudp[].ip' 2>/dev/null; sleep 1; done | sort | uniq
Yep just tested the for loop sample i posted in VPNMON it wasn't detected as a valid command i had to reformat it all on a single line :

Code:
for i in {1..5}; do curl --silent --retry 3 --connect-timeout 3 --max-time 6 --retry-delay 1 --retry-all-errors https://serverlist.piaservers.net/vpninfo/servers/v6 | jq --raw-output '.regions[] | select(.name=="US New York") | .servers.ovpnudp[].ip' 2>/dev/null; done | sort | uniq

What i noticed is that if i run the command manually in a Linux terminal I get more results.
----------------------------------------------------------------------------------------------------

Bash:
i=0; while [ $i -ne 5 ]; do i=$((i + 1)); curl --silent --retry 3 --connect-timeout 3 --max-time 6 --retry-delay 1 --retry-all-errors https://serverlist.piaservers.net/vpninfo/servers/v6 | jq --raw-output '.regions[] | select(.name=="US Alabama") | .servers.ovpnudp[].ip' 2>/dev/null; sleep 1; done | sort | uniq

Your command seems to get results more consistently with VPNMON List Automation.

Awesome job.

Edit:
Raising the sleep value will give you more results since there might be timer for when the ip's rotate.
With sleep 1 i got 4 rows with sleep 5 i got 6 rows.
 
Last edited:
Edit:
Raising the sleep value will give you more results since there might be timer for when the ip's rotate.
With sleep 1 i got 4 rows with sleep 5 i got 6 rows.
Super interesting find, @Rajjco! Totally worth the wait, especially if this automatically kicks off at 2am, @JTnola! :)

EDIT: just validated, changing to sleep 5 gave me 5 returns. Changing it to sleep 10 still kept it at 5 returns... either there's no more servers, or this is the limit of returns... not sure. Think this should really help @JTnola get more IPs on his list this way!

Code:
i=0; while [ $i -ne 5 ]; do i=$((i + 1)); curl --silent --retry 3 --connect-timeout 3 --max-time 6 --retry-delay 1 --retry-all-errors https://serverlist.piaservers.net/vpninfo/servers/v6 | jq --raw-output '.regions[] | select(.name=="US Alabama") | .servers.ovpnudp[].ip' 2>/dev/null; sleep 5; done | sort | uniq
 
Last edited:
Super interesting find, @Rajjco! Totally worth the wait, especially if this automatically kicks off at 2am, @JTnola! :)

EDIT: just validated, changing to sleep 5 gave me 5 returns. Changing it to sleep 10 still kept it at 5 returns... either there's no more servers, or this is the limit of returns... not sure. Think this should really help @JTnola get more IPs on his list this way!

Code:
i=0; while [ $i -ne 5 ]; do i=$((i + 1)); curl --silent --retry 3 --connect-timeout 3 --max-time 6 --retry-delay 1 --retry-all-errors https://serverlist.piaservers.net/vpninfo/servers/v6 | jq --raw-output '.regions[] | select(.name=="US Alabama") | .servers.ovpnudp[].ip' 2>/dev/null; sleep 5; done | sort | uniq
Excellent! Thank you! So far, so good!
Yall are awesome!!!!
 
Excellent! Thank you! So far, so good!
Yall are awesome!!!!
With your blessing, I'll add these PIA instructions to the main OP thread... ;) These are great!
 

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

Staff online

Top