What's new
  • 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!

VPNMON VPNMON-R3 Custom Server List Generation Tutorials and Examples

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!
 
I just wanted to share that I came up with this query for ProtonVPN to sort the list by load and then limit it to the top 5 results (I'm using France and load limit of 50 in this example):
Bash:
curl --silent --retry 3 --connect-timeout 3 --max-time 6 --retry-delay 1 --retry-all-errors https://api.protonvpn.ch/vpn/logicals | jq -r '[.LogicalServers[] | select(.EntryCountry=="FR" and .ExitCountry=="FR" and .Load < 50) | (. as $parent | $parent.Servers[] | {ip: .EntryIP, load: $parent.Load})] | unique_by(.ip) | sort_by(.load) | .[:5] | .[].ip'
 
I just wanted to share that I came up with this query for ProtonVPN to sort the list by load and then limit it to the top 5 results (I'm using France and load limit of 50 in this example):
Bash:
curl --silent --retry 3 --connect-timeout 3 --max-time 6 --retry-delay 1 --retry-all-errors https://api.protonvpn.ch/vpn/logicals | jq -r '[.LogicalServers[] | select(.EntryCountry=="FR" and .ExitCountry=="FR" and .Load < 50) | (. as $parent | $parent.Servers[] | {ip: .EntryIP, load: $parent.Load})] | unique_by(.ip) | sort_by(.load) | .[:5] | .[].ip'
Nice work! :)
 
Wanted to see if anyone else is getting this error when querying a server list from Proton VPN? This was working fine for months until today. I caught hell from my wife while the VPN/connection was bouncing up and down all day long not being able to make a connection. <sigh>

=> yields the following error: {"Code":0,"Error":"Invalid access token","Details":{}}

My CURL statement:
Code:
curl --silent --retry 3 --connect-timeout 3 --max-time 6 --retry-delay 1 --retry-all-errors https://api.protonvpn.ch/vpn/logicals | jq --raw-output '.LogicalServers[] | select(.EntryCountry=="US") | .Servers[].EntryIP' | sort | uniq

I put in a support request, so we'll see where that leads.
 
Bad news. Looks like Proton VPN will need to get taken off the compatibility list. 😟

----

Thank you for contacting us.

Public access to https://api.protonvpn.ch/vpn/logicals is no longer available due to security reasons.

You can either use our native application to access the servers or manually download config files for a manual connection from https://account.protonvpn.com/downloads.

Let me also know if there is anything else I can assist you with.
 
They won't explain how to create an access token? That is horrible. I was just thinking of switching completely to them and dropping Nord.
 
Bad news. Looks like Proton VPN will need to get taken off the compatibility list. 😟

----

Thank you for contacting us.

Public access to https://api.protonvpn.ch/vpn/logicals is no longer available due to security reasons.

You can either use our native application to access the servers or manually download config files for a manual connection from https://account.protonvpn.com/downloads.

Let me also know if there is anything else I can assist you with.
FYI - Here is what I did for now:
Download the country config for the country I want.
1744905321829.png
Use a combination of https://protonvpn.com/support/openvpn-asuswrt-merlin-router/ and https://protonvpn.com/support/pfsense-openvpn/ to configure the settings.

For example, here is my custom config for France:
Code:
server-poll-timeout 20
remote-random
resolv-retry infinite
cipher AES-256-GCM
setenv CLIENT_CERT 0
tun-mtu 1500
mssfix 0
remote-cert-tls server
fast-io
remote 149.102.245.156 51820
remote 146.70.194.82 5060
remote 79.127.134.82 5060
remote 146.70.194.82 51820
remote 149.102.245.156 4569
remote 185.246.211.72 80
remote 146.70.194.50 1194
remote 185.246.211.72 51820
remote 185.246.211.193 5060
remote 146.70.194.98 5060
remote 79.127.134.82 5060
remote 79.127.134.82 51820
remote 79.127.134.82 4569
remote 146.70.194.98 51820
remote 146.70.194.82 80
remote 185.246.211.193 80
remote 149.102.245.129 4569
remote 185.246.211.72 4569
remote 185.246.211.193 51820
remote 149.102.245.156 51820
remote 149.102.245.156 5060
remote 146.70.194.98 80
remote 146.70.194.98 4569
remote 149.102.245.129 51820
remote 149.102.245.156 4569
remote 185.246.211.193 1194
remote 149.102.245.156 4569
remote 185.246.211.193 4569
remote 149.102.245.156 5060
remote 146.70.194.82 1194
remote 79.127.134.1 51820
remote 79.127.134.1 1194
remote 79.127.134.1 4569
remote 185.246.211.72 5060
remote 79.127.134.82 80
remote 185.246.211.72 1194
remote 149.102.245.156 80
remote 149.102.245.156 5060
remote 149.102.245.156 80
remote 149.102.245.129 1194
remote 79.127.134.82 4569
remote 146.70.194.50 51820
remote 79.127.134.1 5060
remote 149.102.245.156 80
remote 149.102.245.156 1194
remote 146.70.194.82 4569
remote 149.102.245.129 80
remote 146.70.194.98 1194
remote 79.127.134.82 1194
remote 149.102.245.156 1194
remote 146.70.194.50 5060
remote 79.127.134.82 51820
remote 149.102.245.156 51820
remote 149.102.245.156 1194
remote 146.70.194.50 80
remote 79.127.134.82 1194
remote 149.102.245.129 5060
remote 146.70.194.50 4569
remote 79.127.134.82 80

The remote servers are important.

Then I used Excel to remove duplicates so I had a list of all the unique IPs. I put that list in VPNMON-R3.

1744905511541.png
I removed the automation from VPN4 (what I am using to connect to France).
I continue to allow VPNMON-R3 to monitor the VPN4 connection. It seems to work, though I don't know if it uses the various port options upon connection.
 
FYI - Here is what I did for now:
Download the country config for the country I want.
Use a combination of https://protonvpn.com/support/openvpn-asuswrt-merlin-router/ and https://protonvpn.com/support/pfsense-openvpn/ to configure the settings.

For example, here is my custom config for France:
Code:
server-poll-timeout 20
remote-random
resolv-retry infinite
cipher AES-256-GCM
setenv CLIENT_CERT 0
tun-mtu 1500
mssfix 0
remote-cert-tls server
fast-io
remote 149.102.245.156 51820
remote 146.70.194.82 5060
remote 79.127.134.82 5060
remote 146.70.194.82 51820
remote 149.102.245.156 4569
remote 185.246.211.72 80
remote 146.70.194.50 1194
remote 185.246.211.72 51820
remote 185.246.211.193 5060
remote 146.70.194.98 5060
remote 79.127.134.82 5060
remote 79.127.134.82 51820
remote 79.127.134.82 4569
remote 146.70.194.98 51820
remote 146.70.194.82 80
remote 185.246.211.193 80
remote 149.102.245.129 4569
remote 185.246.211.72 4569
remote 185.246.211.193 51820
remote 149.102.245.156 51820
remote 149.102.245.156 5060
remote 146.70.194.98 80
remote 146.70.194.98 4569
remote 149.102.245.129 51820
remote 149.102.245.156 4569
remote 185.246.211.193 1194
remote 149.102.245.156 4569
remote 185.246.211.193 4569
remote 149.102.245.156 5060
remote 146.70.194.82 1194
remote 79.127.134.1 51820
remote 79.127.134.1 1194
remote 79.127.134.1 4569
remote 185.246.211.72 5060
remote 79.127.134.82 80
remote 185.246.211.72 1194
remote 149.102.245.156 80
remote 149.102.245.156 5060
remote 149.102.245.156 80
remote 149.102.245.129 1194
remote 79.127.134.82 4569
remote 146.70.194.50 51820
remote 79.127.134.1 5060
remote 149.102.245.156 80
remote 149.102.245.156 1194
remote 146.70.194.82 4569
remote 149.102.245.129 80
remote 146.70.194.98 1194
remote 79.127.134.82 1194
remote 149.102.245.156 1194
remote 146.70.194.50 5060
remote 79.127.134.82 51820
remote 149.102.245.156 51820
remote 149.102.245.156 1194
remote 146.70.194.50 80
remote 79.127.134.82 1194
remote 149.102.245.129 5060
remote 146.70.194.50 4569
remote 79.127.134.82 80

The remote servers are important.

Then I used Excel to remove duplicates so I had a list of all the unique IPs. I put that list in VPNMON-R3.

I removed the automation from VPN4 (what I am using to connect to France).
I continue to allow VPNMON-R3 to monitor the VPN4 connection. It seems to work, though I don't know if it uses the various port options upon connection.
Good job, but it's not very automated. I'm trying to cancel my subscription. Guess I'm back on Nord again for the time being. 🤬
 
Last edited:

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!
Back
Top