8000 New PIA port forwarding API · Issue #35 · pschmitt/pia-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

New PIA port forwarding API #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DanielOaks opened this issue Feb 2, 2017 · 5 comments
Open

New PIA port forwarding API #35

DanielOaks opened this issue Feb 2, 2017 · 5 comments

Comments

@DanielOaks
Copy link

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:

  • You only need to call the API once and the port will stay open forever.
  • There's no need to include the username/password or the local IP, which should help simplify things.

If you run into any issues with this, feel free to reply here and I'll take a look.

@pschmitt
Copy link
Owner
pschmitt commented Feb 2, 2017

Hi, thanks for the heads-up.

You only need to call the API once and the port will stay open forever.

Does that mean that the same port would be opened regardless of the current endpoint? Ie. when I connect to say Switzerland, issue the API call and then re-connect to eg. Sweden would I need to issue another call?

@DanielOaks
Copy link
Author
DanielOaks commented Feb 2, 2017

Hey, no problem.

By that, you only need to call it once per connection (with the old API you'd need to re-call it every half an hour or so to 'keep the port active'). With the new one you open the port and it'll stay open for the life of the VPN connection.

Another thing to keep in mind is that you need to request the port within two minutes of the VPN connection being opened -- which I'd assume would result in just requesting it in/as your up script or similar, if you don't do so already.

@pschmitt
Copy link
Owner
pschmitt commented Feb 4, 2017

I implemented the new API in 3b327c4.
It hadn't quite dawned on me but, why is the API endpoint not HTTPS? I get that TLS certificates somewhat require a DNS entry, but you could just issue a self-signed cert, communicate it and let the clients (like pia-tools) verify it. Otherwise this is quite a security concern, especially since this API endpoint is to expose ports on our end.

Another request: would it be possible to always return the port that was opened? In my sense APIs should be idempotent. You could also get an actual error message back when requesting a port and you are connected to a region that does not support it (or if there is something else wrong with the request).

@kdb424
Copy link
kdb424 commented Jun 16, 2017

How would I check which port is opened using this tool? I was able to do it manually using the thread linked before, but now it's already open, though I don't know which one has been opened. Thanks.

EDIT: Read the man page and got a new port. That being said, it should report the open port when connecting somewhere I'd assume. Thanks!

@pschmitt
Copy link
Owner
pschmitt commented Jun 20, 2017

It should be stored in $PIA_CONFIG_DIR/open_port

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0