HTPCGuides / pia-port-forwarding-scripts

PIA Port forwarding scripts
http://www.htpcguides.com/
9 stars 5 forks source link

New PIA PF API #1

Open DanielOaks opened 7 years ago

DanielOaks commented 7 years ago

Hey! I'm just opening this issue to let you know that we (PIA) have a new port forwarding API available. It'd be worth taking a look on our forums over here: https://www.privateinternetaccess.com/forum/discussion/23431/

Specifically, a few things you'll want to keep in mind with the new API are:

Any issues, feel free to reply here and I'll take a look.

drakehtpc commented 7 years ago

Hi DanielOaks thank you very much for notifying us. This is good news, I checked the new script and the new API indeed simplifies things. No username and password needed, and very nice feature that the port number will not change, no polling needed anymore. Can you specify when does the port number changes and when should the script run? Once connected to VPN server, the port number will not change until the connection is up. But if we do a restart of OpenVPN service, then we should run the script again?

DanielOaks commented 7 years ago

No problem, glad to help! We've talked about this via email and I'm gonna run those tests for you, but just for anyone else reading this:

  1. The script should only be run once, when the port number changes.
  2. It should be run once connected to the VPN server. If the OpenVPN connection is reset or you need to re-connect, it should be called again once that new connection is brought up.
GeorgeAnton1 commented 7 years ago

If anyone else stumbles upon this, I've made a pull request to use PIA's new API for requesting a port as the one in the current script no longer works.