Jump to content

Recommended Posts

Hello,

 

I didn't see a workflow for a VPN service client I use called Private Internet Access. So I decided to give it a try.

 

I'm not sure if there are many people that use this service but I just wanted to share a simple workflow that connects and disconnects the VPN connection using Alfred.

 

Here's the code/instructions/download:

 

Start Demo:

 
Stop Demo:

 

Thanks,

Sean

Edited by groundhogday
Link to comment
  • 1 year later...

Appears this has broken in the new PIA v 8.1.  I was able to start PIA, but the stop version keeps timing out, and never fully stops all apps.   I played with it for a bit, but when you kill the process with "-run" the rest keeps running.  Ideas?

Link to comment
  • 2 months later...

@groundhogday Thank you for this—I had been trying to do this myself and kept having a zombie process result and have been unable to make it work even after finding the sub and parent processes and trying to "kill" them from the command line. Often I had to restart my computer entirely, as even the PIA app woudl show greyed out in Activity monitor... on but not really.

 

I downloaded your workflow, but am having issues with it as well, similar to @r00tnix

 

It is likely that it's because I have v81 and the GitHub page lists v66 as the supported version. I read over the descriptions and explanations you have on the page, but sadly an not proficient enough with the coding to figure this out (the version I'd been working on for a while was applescript-based, though eventually got to command line, but still hitting the zombie process issue).

 

I just thought I'd check in and see if you were planning to update this at all for the v81?  Or have any tips?

 

Many thanks for your time!

Link to comment
On 10/10/2018 at 4:58 PM, deanishe said:

This is terribly bad form promoting my own "wares" in another workflow's thread, but as @groundhogday doesn't seem to be responding…

 

My VPN Manager workflow (forum thread) supports PIA and other OpenVPN, err, VPNs via Tunnelblick (free and open source) or Viscosity (fairly cheap).

 

It's generally always up-to-date because I use it a lot myself.

 

 

Thank you @deanishe  I don't know if I am missing something—I see you mention Private Internet Access on the Github page at the bottom when recommending a service, but when I do the "vpnconfig" it only has the options for Tunnelblick and Viscosity. Private Internet Access doesn't show up and I'm not seeing how to set it as my application?

 

I have the feeling I'm conflating PIA with Tunnelblick and Viscocity and that perhaps they are an additional "controler" of the PIA which controls the VPN?  (Sorry, even though I've long used a VPN and even gotten a bit handy with scripting things, I still have a very difficult time "grasping" the concepts of VPN things, so I am likely misunderstanding entirely how all of these things interact).

 

I do try to take time and read and search before just asking someone to "do the work for me" type of thing. :P

 

I use the PIA app that works as the menubar process ( v81). Even though it's launched via the .app in the applications folder, Exiting the whole app isn't possible through any app quitting approach (which is what had led me to UI scripting menu clicks and whatnot, but even though these worked in ScriptEditor and Automator, they'd fail when launched via a keyboard shortcut, saying the app didn't have permissions, despite me putting them explicitly on the list of approved apps to control my computer).

 

Anyways, that's an aside :P

 

The PIA doesn't show in my Network preferences either... I'd come across VPN controlling workflows that required it to be through the Mac's network settings.

 

 

-----

 

Edited by AuspiringMind
Misunderstood
Link to comment

The workflow uses either Tunnelblick or Viscosity to manage OpenVPN connections, not the PIA app because the PIA app only works with PIA connections, whereas these apps work with any OpenVPN connections (PIA, Nord, Streisand etc.).

 

You need to download and install the OpenVPN configurations from this page (under the application/extension downloads) and install them in Tunnelblick (or Viscosity).

 

9 hours ago, AuspiringMind said:

The PIA doesn't show in my Network preferences either...

 

Of course not. It also uses OpenVPN, which isn't supported natively by macOS. Only natively-supported VPNs show up in network preferences.

Link to comment
On 10/14/2018 at 1:23 AM, deanishe said:

The workflow uses either Tunnelblick or Viscosity to manage OpenVPN connections, not the PIA app because the PIA app only works with PIA connections, whereas these apps work with any OpenVPN connections (PIA, Nord, Streisand etc.).

 

Thank you again @deanishe I figured I wasn't understanding the role of things. I still don't quite get the division of the VPN service vs. app. Like I think I pay PIA for their VPN service, but that their app is just one of several choices for managing the service? [It doesn't seem like it, but I promise I have read a lot about this... just seems to not "click" for me!]  Is there a way to control the PIA app through scripting and workflows? That's what I'd originally attempted. As I only have PIA, is there a benefit to using another app to manage the connection? (other than that I can finally use an Alfred workflow).

 

Regardless, I will look more into Tunnelblick and Viscosity—I read on the Github that the main difference is open source vs. proprietary, with Viscosity having a nicer interface as well. Do you recommend one over the other, or does it just come down to personal preference?

 

On 10/14/2018 at 1:23 AM, deanishe said:

You need to download and install the OpenVPN configurations from this page (under the application/extension downloads) and install them in Tunnelblick (or Viscosity).

 

I found the link, which opened to a variety of options. Is there one you recommend?

 

image.thumb.png.3c173256d759e0bf877973ccf7684a7c.png

 

 

As for Network preferences, I figured it was something like that... just seemed to be the only results when looking to toggle VPN via a script were for ones that were natively supported.

Link to comment
3 minutes ago, AuspiringMind said:

Like I think I pay PIA for their VPN service, but that their app is just one of several choices for managing the service?

 

Exactly. PIA offers OpenVPN VPNs (amongst others, IIRC), and their app is just a frontend to the actual OpenVPN software. Viscosity and Tunnelblick are the same, but they don't come with a bunch of pre-configured VPN connections (as the PIA app does), and they can also be used with any OpenVPN connection.

 

5 minutes ago, AuspiringMind said:

Is there one you recommend?

 

Just use the recommended default unless you have a reason not to.

 

If you have any more questions about my workflow, please post them it its thread:

 

 

It was rude enough of me to "pimp my wares" in this thread. It is not appropriate to fill it with posts about another workflow.

 

Link to comment
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...