glorious1 / manual-connections

Scripts for manual connections to Private Internet Access
MIT License
18 stars 9 forks source link

Extra \ in wireguard script in port forwarding section and missing export #4

Closed Baenwort closed 3 years ago

Baenwort commented 3 years ago

In the section: This script got started with PIA_PF=true. We will allow WireGuard to fully initialize and after that we will try to enable PF by running the following command: $ PIA_TOKEN=$PIA_TOKEN \\ PF_GATEWAY=\"$(echo "$wireguard_json" | jq -r '.server_vip')\" \\ PF_HOSTNAME=\"$WG_HOSTNAME\" \\ ./port_forwarding.sh which starts on line 166 of connect_to_wireguard_with_token.sh you have to many \ and you are missing some exporting of the gateway and hostname to enable them to be used by the port_forwarding.sh

the code should be (and makes this function for me): PIA_TOKEN=$PIA_TOKEN \ PF_GATEWAY="$(echo "$wireguard_json" | jq -r '.server_vip')" \ export PF_GATEWAY PF_HOSTNAME="$WG_HOSTNAME" \ export PF_HOSTNAME

glorious1 commented 3 years ago

Thanks. I'm not sure what that's all about, but it's merged. I never used Wireguard. Just to be clear, these scripts and all the magic came from pia-foss/manual-connections; I was just trying to get them going on FreeNAS/FreeBSD.

Baenwort commented 3 years ago

Fixed merged in.