Skip to content

Commit

Permalink
changed documentation and comments to make it easier to read through
Browse files Browse the repository at this point in the history
  • Loading branch information
g00nix committed Sep 19, 2020
1 parent d35694d commit 53d2da4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ The functionality of the scripts within this repository has been tested and conf

### Disclaimers

These scripts do not touch IPv6 or DNS in order to give you the freedom of configuring your setup the way you desire it to work. This means you should have good understanding of VPN and cybersecurity in order to properly configure your setup.

The scripts are also really fresh at this moment, so please take into consideration the fact that you will probably be one of the first users that use the scripts. The scripts work only on the NextGen network.

For battle-tested security, please use the official PIA App, as it was designed to protect you in all scenarios.
* Port Forwarding is disabled on server-side in the United States.
* These scripts do not touch IPv6 or DNS, so that you have the freedom to configure your setup the way you desire it to work. This means you should have good understanding of VPN and cybersecurity in order to properly configure your setup.
* For battle-tested security, please use the official PIA App, as it was designed to protect you in all scenarios.
* This repo is really fresh at this moment, so please take into consideration the fact that you will probably be one of the first users that use the scripts.

## PIA Port Forwarding

Expand Down
12 changes: 5 additions & 7 deletions get_region_and_token.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ fi
echo "OK!"

# Test one server from each region to get the closest region:
summarized_region_data="$( echo $all_region_data |
jq -r '.regions[] | .servers.meta[0].ip+" "+.id+" "+.name+" "+(.geo|tostring)' )"
echo Testing regions that respond \
faster than $maximum_allowed_latency seconds:
region_latency_report="$( echo $all_region_data |
jq -r '.regions[] | .servers.meta[0].ip+" "+.id+" "+.name+" "+(.geo|tostring)' )"

# Get the best region
bestRegion="$(echo "$region_latency_report" |
bestRegion="$(echo "$summarized_region_data" |
xargs -i bash -c 'printServerLatency {}' |
sort | head -1 | awk '{ print $2 }')"

Expand Down Expand Up @@ -143,8 +141,8 @@ if [ "$PIA_AUTOCONNECT" != wireguard ]; then
echo $ PIA_USER=p0123456 PIA_PASS=xxx \
PIA_AUTOCONNECT=true PIA_PF=true ./sort_regions_by_latency.sh
echo
echo You can also connect manually by running:
echo WG_TOKEN=\"$token\" WG_SERVER_IP=$bestServer_WG_IP \
echo You can also connect now by running this command:
echo $ WG_TOKEN=\"$token\" WG_SERVER_IP=$bestServer_WG_IP \
WG_HOSTNAME=$bestServer_WG_hostname ./connect_to_wireguard_with_token.sh
exit
fi
Expand Down

0 comments on commit 53d2da4

Please sign in to comment.