mirror of
https://github.com/pia-foss/manual-connections.git
synced 2025-02-05 22:18:30 +00:00
do not display regions where PF is blocked if PIA_PF=true
This commit is contained in:
parent
9a3d77ac4e
commit
e9aa8545ca
|
@ -76,9 +76,19 @@ fi
|
||||||
# Notify the user that we got the server list.
|
# Notify the user that we got the server list.
|
||||||
echo "OK!"
|
echo "OK!"
|
||||||
|
|
||||||
# Test one server from each region to get the closest region:
|
# Test one server from each region to get the closest region
|
||||||
summarized_region_data="$( echo $all_region_data |
|
# Only filter port forwarding enabled servers if specified
|
||||||
jq -r '.regions[] | .servers.meta[0].ip+" "+.id+" "+.name+" "+(.geo|tostring)' )"
|
if [[ $PIA_PF == "true" ]]; then
|
||||||
|
echo Port Forwarding is enabled, so regions that do not support
|
||||||
|
echo port forwarding will get filtered out.
|
||||||
|
summarized_region_data="$( echo $all_region_data |
|
||||||
|
jq -r '.regions[] | select(.port_forward==true) |
|
||||||
|
.servers.meta[0].ip+" "+.id+" "+.name+" "+(.geo|tostring)' )"
|
||||||
|
else
|
||||||
|
summarized_region_data="$( echo $all_region_data |
|
||||||
|
jq -r '.regions[] |
|
||||||
|
.servers.meta[0].ip+" "+.id+" "+.name+" "+(.geo|tostring)' )"
|
||||||
|
fi
|
||||||
echo Testing regions that respond \
|
echo Testing regions that respond \
|
||||||
faster than $MAX_LATENCY seconds:
|
faster than $MAX_LATENCY seconds:
|
||||||
bestRegion="$(echo "$summarized_region_data" |
|
bestRegion="$(echo "$summarized_region_data" |
|
||||||
|
|
Loading…
Reference in New Issue
Block a user