Back in March I had a request come in to my PIA WireGuard script for OPNsense to add support for dedicated ip feature of PIA. I’ve been waiting and waiting for PIA to release a manual connection script for this feature but 6 months have past and no sign of such a script from PIA. So I decided to look over PIA’s open source code for how they are interacting with their APIs to make the Desktop, iOS and Android clients support the usage of the dedicated ip. So I look over their code looking for key words around dedicated ip feature, thanks to their open source clients it was quite easy to use the Github search function to reserve engineer the feature. After many hours of studying the code and testing PIA’s API with Postman, I finally worked out how to retrieve information about the DIP (dedicated ip) and then use that information to workout how to then connect to PIA using that DIP token. So if you want to use a DIP with my script you simply include the DIP token in the configuration json and it’ll work straight away with no issues.
I added DIP support in commit bcf5885.
One key thing to remember, you are only provided the DIP Token once by PIA, so keep it safe in a password manager or something to this effect. I recommend Bitwarden.