diff --git a/README.md b/README.md index c432c3a..5356c2c 100644 --- a/README.md +++ b/README.md @@ -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: - * [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_PASS` - your PIA password * `PIA_DNS` - true/false * `PIA_PF` - true/false * `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 * `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 @@ -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: ```bash -$ echo eyJ0b2tlbiI6Inh4eHh4eHh4eCIsInBvcnQiOjQ3MDQ3LCJjcmVhdGVkX2F0IjoiMjAyMC0wNC0zMFQyMjozMzo0NC4xMTQzNjk5MDZaIn0= | base64 -d | jq +$ echo eyJ0b2tlbiI6Inh4eHh4eHh4eCIsInBvcnQiOjQ3MDQ3LCJjcmVhdGVkX2F0IjoiMjAyMC0wNC0zMFQyMjozMzo0NC4xMTQzNjk5MDZaIn0= | base64 -d | jq { "token": "xxxxxxxxx", "port": 47047, @@ -136,7 +136,7 @@ bash-5.0# curl -sGk --data-urlencode "payload=${payload}" --data-urlencode "sign "status": "OK", "message": "port scheduled for add" } -bash-5.0# +bash-5.0# ``` Call __/bindPort__ every 15 minutes, or the port will be deleted! diff --git a/get_region.sh b/get_region.sh index c9de0f2..b9c46bf 100755 --- a/get_region.sh +++ b/get_region.sh @@ -112,7 +112,7 @@ printServerLatency() { if [ $? -eq 0 ]; then >&2 echo Got latency "${time}"s for region: "$regionName" 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 echo -e "$time" "$regionID"'\t'"$serverIP"'\t'"$regionName" >> /opt/piavpn-manual/latencyList fi @@ -171,7 +171,7 @@ if [[ $selectedRegion == "none" ]]; then echo -e $ MAX_LATENCY=1 ./get_region.sh${NC} exit 1 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} " fi diff --git a/openvpn_config/openvpn_up_dnsoverwrite.sh b/openvpn_config/openvpn_up_dnsoverwrite.sh index 417580f..3e6dbf1 100755 --- a/openvpn_config/openvpn_up_dnsoverwrite.sh +++ b/openvpn_config/openvpn_up_dnsoverwrite.sh @@ -3,7 +3,7 @@ # Write gateway IP for reference 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 echo "# Generated by /connect_to_openvpn_with_token.sh nameserver 10.0.0.241" > /etc/resolv.conf diff --git a/run_setup.sh b/run_setup.sh index 2a39f07..61cb3ed 100755 --- a/run_setup.sh +++ b/run_setup.sh @@ -158,7 +158,7 @@ ${GREEN}Defaulting to yes.${NC} echo -e ${NC} 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 [[ ! $AUTOCONNECT ]]; then echo AUTOCONNECT was not declared. @@ -184,7 +184,7 @@ else echo else 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} " 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 # 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 # to allow for numeric selection, or an easy manual review of options. 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 # 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 while read -r line; do i=$((i+1))