mirror of
https://github.com/pia-foss/manual-connections.git
synced 2025-02-05 14:08:29 +00:00
fix spelling
This commit is contained in:
parent
e2b9b733af
commit
27ed048374
|
@ -86,13 +86,13 @@ sudo VPN_PROTOCOL=wireguard DISABLE_IPV6="no" AUTOCONNECT=true PIA_PF=false PIA_
|
||||||
```
|
```
|
||||||
|
|
||||||
Here is a list of scripts you could find useful:
|
Here is a list of scripts you could find useful:
|
||||||
* [Prompt based connection](run_setup.sh): This script allows connections with a one-line call, or will prompt for any missing or invalid variables. Varaibles available for one-line calls include:
|
* [Prompt based connection](run_setup.sh): This script allows connections with a one-line call, or will prompt for any missing or invalid variables. Variables available for one-line calls include:
|
||||||
* `PIA_USER` - your PIA username
|
* `PIA_USER` - your PIA username
|
||||||
* `PIA_PASS` - your PIA password
|
* `PIA_PASS` - your PIA password
|
||||||
* `PIA_DNS` - true/false
|
* `PIA_DNS` - true/false
|
||||||
* `PIA_PF` - true/false
|
* `PIA_PF` - true/false
|
||||||
* `MAX_LATENCY` - numeric value, in seconds
|
* `MAX_LATENCY` - numeric value, in seconds
|
||||||
* `AUTOCONNECT` - true/false; this will test for and select the server with the lowest latency, it will overried PREFERRED_REGION
|
* `AUTOCONNECT` - true/false; this will test for and select the server with the lowest latency, it will override PREFERRED_REGION
|
||||||
* `PREFERRED_REGION` - the region ID for a PIA server
|
* `PREFERRED_REGION` - the region ID for a PIA server
|
||||||
* `VPN_PROTOCOL` - wireguard or openvpn; openvpn will default to openvpn_udp_standard, but can also specify openvpn_tcp/udp_standad/strong
|
* `VPN_PROTOCOL` - wireguard or openvpn; openvpn will default to openvpn_udp_standard, but can also specify openvpn_tcp/udp_standad/strong
|
||||||
* `DISABLE_IPV6` - yes/no
|
* `DISABLE_IPV6` - yes/no
|
||||||
|
@ -120,7 +120,7 @@ bash-5.0# curl -k "https://10.4.128.1:19999/getSignature?token=$TOKEN"
|
||||||
|
|
||||||
The payload can be decoded with base64 to see your information:
|
The payload can be decoded with base64 to see your information:
|
||||||
```bash
|
```bash
|
||||||
$ echo eyJ0b2tlbiI6Inh4eHh4eHh4eCIsInBvcnQiOjQ3MDQ3LCJjcmVhdGVkX2F0IjoiMjAyMC0wNC0zMFQyMjozMzo0NC4xMTQzNjk5MDZaIn0= | base64 -d | jq
|
$ echo eyJ0b2tlbiI6Inh4eHh4eHh4eCIsInBvcnQiOjQ3MDQ3LCJjcmVhdGVkX2F0IjoiMjAyMC0wNC0zMFQyMjozMzo0NC4xMTQzNjk5MDZaIn0= | base64 -d | jq
|
||||||
{
|
{
|
||||||
"token": "xxxxxxxxx",
|
"token": "xxxxxxxxx",
|
||||||
"port": 47047,
|
"port": 47047,
|
||||||
|
@ -136,7 +136,7 @@ bash-5.0# curl -sGk --data-urlencode "payload=${payload}" --data-urlencode "sign
|
||||||
"status": "OK",
|
"status": "OK",
|
||||||
"message": "port scheduled for add"
|
"message": "port scheduled for add"
|
||||||
}
|
}
|
||||||
bash-5.0#
|
bash-5.0#
|
||||||
```
|
```
|
||||||
|
|
||||||
Call __/bindPort__ every 15 minutes, or the port will be deleted!
|
Call __/bindPort__ every 15 minutes, or the port will be deleted!
|
||||||
|
|
|
@ -112,7 +112,7 @@ printServerLatency() {
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
>&2 echo Got latency "${time}"s for region: "$regionName"
|
>&2 echo Got latency "${time}"s for region: "$regionName"
|
||||||
echo "$time $regionID $serverIP"
|
echo "$time $regionID $serverIP"
|
||||||
# Write a list of servers with acceptable latancy
|
# Write a list of servers with acceptable latency
|
||||||
# to /opt/piavpn-manual/latencyList
|
# to /opt/piavpn-manual/latencyList
|
||||||
echo -e "$time" "$regionID"'\t'"$serverIP"'\t'"$regionName" >> /opt/piavpn-manual/latencyList
|
echo -e "$time" "$regionID"'\t'"$serverIP"'\t'"$regionName" >> /opt/piavpn-manual/latencyList
|
||||||
fi
|
fi
|
||||||
|
@ -171,7 +171,7 @@ if [[ $selectedRegion == "none" ]]; then
|
||||||
echo -e $ MAX_LATENCY=1 ./get_region.sh${NC}
|
echo -e $ MAX_LATENCY=1 ./get_region.sh${NC}
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo -e "A list of servers and connection details, ordered by latency can be
|
echo -e "A list of servers and connection details, ordered by latency can be
|
||||||
found in at : ${GREEN}/opt/piavpn-manual/latencyList${NC}
|
found in at : ${GREEN}/opt/piavpn-manual/latencyList${NC}
|
||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Write gateway IP for reference
|
# Write gateway IP for reference
|
||||||
echo "$route_vpn_gateway" > /opt/piavpn-manual/route_info
|
echo "$route_vpn_gateway" > /opt/piavpn-manual/route_info
|
||||||
|
|
||||||
# Back up resolv.conf and create new on with PIA DNS
|
# Back up resolv.conf and create new one with PIA DNS
|
||||||
cat /etc/resolv.conf > /opt/piavpn-manual/resolv_conf_backup
|
cat /etc/resolv.conf > /opt/piavpn-manual/resolv_conf_backup
|
||||||
echo "# Generated by /connect_to_openvpn_with_token.sh
|
echo "# Generated by /connect_to_openvpn_with_token.sh
|
||||||
nameserver 10.0.0.241" > /etc/resolv.conf
|
nameserver 10.0.0.241" > /etc/resolv.conf
|
||||||
|
|
|
@ -158,7 +158,7 @@ ${GREEN}Defaulting to yes.${NC}
|
||||||
echo -e ${NC}
|
echo -e ${NC}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Input validation and check for conflicting declartions of AUTOCONNECT and PREFERRED_REGION
|
# Input validation and check for conflicting declarations of AUTOCONNECT and PREFERRED_REGION
|
||||||
# If both variables are set, AUTOCONNECT has superiority and PREFERRED_REGION is ignored
|
# If both variables are set, AUTOCONNECT has superiority and PREFERRED_REGION is ignored
|
||||||
if [[ ! $AUTOCONNECT ]]; then
|
if [[ ! $AUTOCONNECT ]]; then
|
||||||
echo AUTOCONNECT was not declared.
|
echo AUTOCONNECT was not declared.
|
||||||
|
@ -184,7 +184,7 @@ else
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo AUTOCONNECT supercedes in-line definitions of PREFERRED_REGION.
|
echo AUTOCONNECT supersedes in-line definitions of PREFERRED_REGION.
|
||||||
echo -e "${RED}PREFERRED_REGION=$PREFERRED_REGION will be ignored.${NC}
|
echo -e "${RED}PREFERRED_REGION=$PREFERRED_REGION will be ignored.${NC}
|
||||||
"
|
"
|
||||||
PREFERRED_REGION=""
|
PREFERRED_REGION=""
|
||||||
|
@ -205,7 +205,7 @@ server with the lowest latency ([N]o/[y]es): "
|
||||||
|
|
||||||
# Call the region script with input to create an ordered list based upon latency
|
# Call the region script with input to create an ordered list based upon latency
|
||||||
# When $PREFERRED_REGION is set to none, get_region.sh will generate a list of servers
|
# When $PREFERRED_REGION is set to none, get_region.sh will generate a list of servers
|
||||||
# that meet the latency requirements speciied by $MAX_LATENCY.
|
# that meet the latency requirements specified by $MAX_LATENCY.
|
||||||
# When $VPN_PROTOCOL is set to no, get_region.sh will sort that list of servers
|
# When $VPN_PROTOCOL is set to no, get_region.sh will sort that list of servers
|
||||||
# to allow for numeric selection, or an easy manual review of options.
|
# to allow for numeric selection, or an easy manual review of options.
|
||||||
if echo "${selectServer:0:1}" | grep -iq y; then
|
if echo "${selectServer:0:1}" | grep -iq y; then
|
||||||
|
@ -256,7 +256,7 @@ For example, you can try 0.2 for 200ms allowed latency.
|
||||||
|
|
||||||
if [ -s /opt/piavpn-manual/latencyList ]; then
|
if [ -s /opt/piavpn-manual/latencyList ]; then
|
||||||
# Output the ordered list of servers that meet the latency specification $MAX_LATENCY
|
# Output the ordered list of servers that meet the latency specification $MAX_LATENCY
|
||||||
echo -e "Orderd list of servers with latency less than ${GREEN}$MAX_LATENCY${NC} seconds:"
|
echo -e "Ordered list of servers with latency less than ${GREEN}$MAX_LATENCY${NC} seconds:"
|
||||||
i=0
|
i=0
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
i=$((i+1))
|
i=$((i+1))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user