Skip to content

Commit

Permalink
Fixes the generateToken URL as per pia-foss/manual-connections#137
Browse files Browse the repository at this point in the history
  • Loading branch information
hitchan committed Nov 15, 2021
1 parent bc3b5e0 commit b85f14c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run/root/getvpnport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ function get_incoming_port_nextgen() {
# get token json response AFTER vpn established
# note binding to the vpn interface (using --interface flag for curl) is required
# due to users potentially using the 10.x.x.x range for lan, causing failure
token_json_response=$(curl --interface "${VPN_DEVICE_TYPE}" --silent --insecure -u "${VPN_USER}:${VPN_PASS}" "https://privateinternetaccess.com/gtoken/generateToken")
token_json_response=$(curl --interface "${VPN_DEVICE_TYPE}" --silent --insecure -u "${VPN_USER}:${VPN_PASS}" "https://www.privateinternetaccess.com/gtoken/generateToken")

if [ "$(echo "${token_json_response}" | jq -r '.status')" != "OK" ]; then

echo "[warn] Unable to successfully download PIA json to generate token from URL 'https://privateinternetaccess.com/gtoken/generateToken'"
echo "[warn] Unable to successfully download PIA json to generate token from URL 'https://www.privateinternetaccess.com/gtoken/generateToken'"
echo "[info] ${retry_count} retries left"
echo "[info] Retrying in ${retry_wait_secs} secs..."
retry_count=$((retry_count-1))
Expand Down

0 comments on commit b85f14c

Please sign in to comment.