corrects nordvpn host selector, hopefully.
This commit is contained in:
parent
01680ed48d
commit
3a8d88d566
@ -48,29 +48,29 @@ pipeline {
|
|||||||
// list of urls that return different nordVPN servers
|
// list of urls that return different nordVPN servers
|
||||||
def nordURLs = [
|
def nordURLs = [
|
||||||
// canada
|
// canada
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:38,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}",
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=38&filters\\[servers_technologies\\]=5"
|
||||||
// denmark
|
// denmark
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:58,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}",
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=58&filters\\[servers_technologies\\]=5",
|
||||||
// france
|
// france
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:74,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}",
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=74&filters\\[servers_technologies\\]=5",
|
||||||
// gremany
|
// germany
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:81,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}",
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=81&filters\\[servers_technologies\\]=5",
|
||||||
// ireland
|
// ireland
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:104,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}",
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=10&filters\\[servers_technologies\\]=5",
|
||||||
// japan
|
// japan
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:108,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}",
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=108&filters\\[servers_technologies\\]=5",
|
||||||
// sweden
|
// sweden
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:208,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}",
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=208&filters\\[servers_technologies\\]=5",
|
||||||
// switzerland
|
// switzerland
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:209,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}",
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=209&filters\\[servers_technologies\\]=5",
|
||||||
// mexico
|
// mexico
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:140,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}",
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=140&filters\\[servers_technologies\\]=5",
|
||||||
// netherlands
|
// netherlands
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:153,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}",
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=153&filters\\[servers_technologies\\]=5",
|
||||||
// united kingdom
|
// united kingdom
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:38,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}",
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=38&filters\\[servers_technologies\\]=5",
|
||||||
// united states
|
// united states
|
||||||
"https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\\{%22country_id%22:228,%22servers_groups%22:\\[15\\],%22servers_technologies%22:\\[5\\]\\}"
|
"https://api.nordvpn.com/v2/servers?limit=5&filters\\[country_id\\]=228&filters\\[servers_technologies\\]=5",
|
||||||
]
|
]
|
||||||
// randomly select one from the list
|
// randomly select one from the list
|
||||||
nordURL = nordURLs[Math.abs(new Random().nextInt() % [8])]
|
nordURL = nordURLs[Math.abs(new Random().nextInt() % [8])]
|
||||||
@ -106,7 +106,7 @@ pipeline {
|
|||||||
'""" + nordURL + """' \
|
'""" + nordURL + """' \
|
||||||
| jq \
|
| jq \
|
||||||
--raw-output \
|
--raw-output \
|
||||||
'[.[] | select(.technologies[] | .identifier == "openvpn_tcp")][0] | .hostname' \
|
'.servers | ([ .[].load ] | min) as \$m | first(.[] | select(.load == \$m)) | .hostname' \
|
||||||
).tcp.ovpn" \
|
).tcp.ovpn" \
|
||||||
| sed \
|
| sed \
|
||||||
--regexp-extended \
|
--regexp-extended \
|
||||||
|
Reference in New Issue
Block a user