Jump to content

Workflow for VPN services


Recommended Posts

  • 3 weeks later...
  • 1 month later...

Hey Sebastian,

 

Nice work. Thanks!

 

Out of interest, why are you returning the external IP address of the computer your using to connect to the VPN? This isn't required for the workflow to complete and is really slowing the workflow down (taking roughly 5 seconds to return the IP).

 

Cheers,

Ollie

Link to comment

Hey Sebastian,

 

Nice work. Thanks!

 

Out of interest, why are you returning the external IP address of the computer your using to connect to the VPN? This isn't required for the workflow to complete and is really slowing the workflow down (taking roughly 5 seconds to return the IP).

 

Cheers,

Ollie

 

Dear Ollie, 

 

I obtain the new IP address via a web download and this is rather slow. It is not really important but I like to see the new address.

I modified the workflow in version 1.1 such that it does not slow down the process anymore. Only the notification is delayed such that the new IP address has time to become active. Is this more convenient?

 

Bye

Sebastian

Link to comment

Thanks, works great.

 

Would VPN Tracker support be possible?

 

I will have a look but I cannot promise anything. I do not use VPN Tracker myself since IPSec and PP2P are directly supported by Mac OS.

Does VPN Tracker support Applescript?

Edited by Sebastian
Link to comment
  • 2 weeks later...
  • 3 months later...

Not really sure if this is a mavericks problem or what but doesn't seem to be working.  It will correctly list my VPN and then say connect.  I'll get a notification saying it is connected, but it definitely isn't.

 

I have a keyfob for my work VPN and when I hit connect, nothing happens (I'd expect the login prompt to open) and then get the notification via Alfred.

Link to comment

I do not have mavericks hence debugging is difficult for me but since you must be a developer to get 10.9, you can probably help me :) Just run the following code in the applescript editor (of course replace VPNCONNECTION with the correct string as given in the system preferences) and see what is happening...   

tell application "System Events"
	tell current location of network preferences
		set VPNservice to service "VPNCONNECTION"
		set isConnected to connected of current configuration of VPNservice
		if isConnected then
			disconnect VPNservice
			set output to "Disonnected"
		else
			connect VPNservice
			set output to "Connected"
		end if
	end tell
end tell
Link to comment

It always says "Connected" despite not actually connecting.... 

 

It's definitely attempting to connect to the correct VPN as if I name it something that isn't the correct VPN it throws an error on the variable.

 

 

Actually viewed the events and saw this, "missing value" (I changed the VPN name to hide it as it does contain company name)

tell application "System Events"
	get service "<VPN NAME>" of current location of network preferences
		--> service id "2F9448AF-DFE9-4F77-9828-33905B42D4E4" of network preferences
	get connected of current configuration of service id "2F9448AF-DFE9-4F77-9828-33905B42D4E4" of network preferences
		--> false
	connect service id "2F9448AF-DFE9-4F77-9828-33905B42D4E4" of network preferences
		--> missing value
end tell 

Found this on open radar which seems to be the same thing: http://openradar.appspot.com/14697626

Edited by Richman777
Link to comment

FYI - looks like Developer Preview 6 fixed this issue.  

 

Edit: I will say, that if you cancel a VPN connect that asks for a token auth, you'll still get that vpn connection popup after.  Check IP before and after to see if it connects maybe?

Edited by Richman777
Link to comment
  • 2 months later...
  • 3 weeks later...
Guest atomkraft

Hi Sebastian.

I'm having some instability issues with this nice workflow. I have currently two connections added and i can connect to them "sometimes" and it will never disconnect using your workflow. I might have fucked something up since it worked without issues a couple days ago, but atm its not reliable for me. 

 

Do you want me to supply you with further info? 

Thank you for your work mate.

Link to comment
  • 2 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...