You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
urlVerify=False# As we're connecting via local loopback I guess we don't really need to check the certificate. (I've noticed alot of people have the default self sigend anyway)
91
99
92
100
helpArg=False
@@ -196,6 +204,14 @@ def printDebug(text):
196
204
print("Please define opnsenseURL variable with the correct value in the json file")
printDebug(f"PIA tunnel ip now set to route over WAN gateway {config['tunnelGateway']} via static route")
471
540
472
-
# Get token from wanted region server - Tokens lasts 24 hours, so we can make our requests for a WG connection information and port is required
473
-
# because PIA use custom certs which just have a SAN of their name eg london401, we have to put a temporary dns override in, to make it so london401 points to the meta IP
# Get PIA token from meta server for non DIP Servers
542
+
ifconfig['piaUseDip'] ==False:
543
+
# Get PIA token from wanted region server - Tokens lasts 24 hours, so we can make our requests for a WG connection information and port is required
544
+
# because PIA use custom certs which just have a SAN of their name eg london401, we have to put a temporary dns override in, to make it so london401 points to the meta IP
printDebug("Your PIA Token, DO NOT GIVE THIS TO ANYONE")
487
-
printDebug(generateTokenResponse.text)
552
+
printDebug("Your PIA Token (Meta), DO NOT GIVE THIS TO ANYONE")
553
+
printDebug(generateTokenResponse.text)
488
554
489
-
# Now we have our PIA token, we can now request our WG connection information
555
+
# Now we have our PIA details, we can now request our WG connection information
490
556
# because PIA use custom certs which just have a SAN of their name eg london401, we have to put a temporary dns override in, to make it so london401 points to the wg IP
print("wireguardserver addKey request failed non 200 status code - Trying to add instance public key to server in exchnage for connection information")
496
576
sys.exit(2)
@@ -501,8 +581,8 @@ def printDebug(text):
501
581
502
582
# Write wireguard connection information to file, for later use.
Note: Not all server locations support port forwarding.
96
96
97
+
***Dedicated IP***
98
+
99
+
If you have purchased a Dedicated IP from PIA. Add your DIP token to `piaDipToken` in the json file, then to enable the usage simply set `piaUseDip` to `true`. Remember PIA only give you the DIP token once, so make sure you have backed up the token somewhere.
100
+
101
+
I have developed this functionality by reserve engineering the PIA client, at this moment in time manual connections for DIP is not offically supported by PIA.
In some deployments, people may be running dual or even triple WAN configurations, in this case due to how WireGuard is configured in FreeBSD (OPNsense), it'll route the PIA tunnel over the default WAN interface. Some people will want to change this to use another WAN interface as the gateway to route the PIA tunnel over.
0 commit comments