small fixes

This commit is contained in:
gunix 2020-09-19 00:35:47 +03:00
parent 891a054a07
commit 49bf4998e0
3 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ if [[ ! $WG_SERVER_IP || ! $WG_HOSTNAME || ! $WG_TOKEN ]]; then
echo as it will guide you through getting the best server and echo as it will guide you through getting the best server and
echo also a token. Detailed information can be found here: echo also a token. Detailed information can be found here:
echo https://github.com/pia-foss/manual-connections echo https://github.com/pia-foss/manual-connections
exit 1 exit 1
fi fi
# Create ephemeral wireguard keys, that we don't need to save to disk. # Create ephemeral wireguard keys, that we don't need to save to disk.
@ -128,7 +128,7 @@ fi
echo " echo "
This script got started with PIA_PF=true. This script got started with PIA_PF=true.
Starting procedure to enable port forwarding by running the following command: Starting procedure to enable port forwarding by running the following command:
PIA_TOKEN=$WG_TOKEN \\ $ PIA_TOKEN=$WG_TOKEN \\
PF_GATEWAY=\"$(echo "$wireguard_json" | jq -r '.server_vip')\" \\ PF_GATEWAY=\"$(echo "$wireguard_json" | jq -r '.server_vip')\" \\
PF_HOSTNAME=\"$WG_HOSTNAME\" \\ PF_HOSTNAME=\"$WG_HOSTNAME\" \\
./port_forwarding.sh ./port_forwarding.sh

View File

@ -157,7 +157,7 @@ echo "The ./get_region_and_token.sh script got started with PIA_AUTOCONNECT=wire
so we will automatically connect to WireGuard, by running this command: so we will automatically connect to WireGuard, by running this command:
$ WG_TOKEN=\"$token\" \\ $ WG_TOKEN=\"$token\" \\
WG_SERVER_IP=$bestServer_WG_IP WG_HOSTNAME=$bestServer_WG_hostname \\ WG_SERVER_IP=$bestServer_WG_IP WG_HOSTNAME=$bestServer_WG_hostname \\
PIA_PF=$PIA_PF ./wireguard_port_forwarding.sh PIA_PF=$PIA_PF ./connect_to_wireguard_with_token.sh
" "
PIA_PF=$PIA_PF WG_TOKEN="$token" WG_SERVER_IP=$bestServer_WG_IP \ PIA_PF=$PIA_PF WG_TOKEN="$token" WG_SERVER_IP=$bestServer_WG_IP \

View File

@ -59,7 +59,7 @@ if [[ ! $PAYLOAD_AND_SIGNATURE ]]; then
payload_and_signature="$(curl -s -m 5 \ payload_and_signature="$(curl -s -m 5 \
--connect-to "$PF_HOSTNAME::$PF_GATEWAY:" \ --connect-to "$PF_HOSTNAME::$PF_GATEWAY:" \
--cacert "ca.rsa.4096.crt" \ --cacert "ca.rsa.4096.crt" \
-G --data-urlencode "token=${WG_TOKEN}" \ -G --data-urlencode "token=${PIA_TOKEN}" \
"https://${PF_HOSTNAME}:19999/getSignature")" "https://${PF_HOSTNAME}:19999/getSignature")"
else else
payload_and_signature="$PAYLOAD_AND_SIGNATURE" payload_and_signature="$PAYLOAD_AND_SIGNATURE"