schoeps Posted January 16, 2013 Share Posted January 16, 2013 (edited) Dear all, I have written a worklflow that shows a list of all available VPN services and allows to connect or disconnect via Alfred: VPN_Toggle.alfredworkflow (Latest Version: 1.2 as of 2013-11-03) Enjoy, Sebastian Edited November 3, 2013 by Sebastian grahams, gessulat, buzr and 6 others 9 Link to comment
Gehirnfussel Posted January 16, 2013 Share Posted January 16, 2013 Nice thing - works like a charm Link to comment
chrstn.rchl Posted February 1, 2013 Share Posted February 1, 2013 That's damn cool thanks! Link to comment
countdrachma Posted February 3, 2013 Share Posted February 3, 2013 Nice one. Thanks Sebastian! Link to comment
gattaca Posted March 18, 2013 Share Posted March 18, 2013 Perfect..thanks for sharing this. Link to comment
schoeps Posted April 1, 2013 Author Share Posted April 1, 2013 (edited) The VPN_Toggle workflow has been updated to include Alleyoop updates and it shows the current ip address. Edited April 1, 2013 by Sebastian DJay and oliverwaters 2 Link to comment
oliverwaters Posted April 1, 2013 Share Posted April 1, 2013 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
xandrik Posted April 1, 2013 Share Posted April 1, 2013 Awesome! Thank you for your brilliance! Link to comment
schoeps Posted April 2, 2013 Author Share Posted April 2, 2013 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
ridogi Posted April 4, 2013 Share Posted April 4, 2013 Thanks, works great. Would VPN Tracker support be possible? Link to comment
schoeps Posted April 5, 2013 Author Share Posted April 5, 2013 (edited) 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 April 5, 2013 by Sebastian Link to comment
jjlawren Posted April 10, 2013 Share Posted April 10, 2013 Any chance for Tunnelblick support for OpenVPN? Looks like there is documented Applescript here: http://code.google.com/p/tunnelblick/wiki/cAppleScriptSupport. Link to comment
TruckTurner Posted April 19, 2013 Share Posted April 19, 2013 What a time saver! I constantly need to connect and disconnect throughout my workday since our main customer's DB is behind a VPN. Thank you so much! Link to comment
Richman777 Posted August 16, 2013 Share Posted August 16, 2013 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
schoeps Posted August 16, 2013 Author Share Posted August 16, 2013 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
Richman777 Posted August 16, 2013 Share Posted August 16, 2013 (edited) 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 August 16, 2013 by Richman777 Link to comment
schoeps Posted August 16, 2013 Author Share Posted August 16, 2013 Thanks for posting. The post at open radar seems to further indicate that there is a bug in Mavericks. I am afraid that we need to wait since I am not aware of any other way to start the VPN connection Sorry! Link to comment
Richman777 Posted August 16, 2013 Share Posted August 16, 2013 No problem - I'll keep an eye out on it and update if its fixed in one of the next developer previews. Link to comment
Richman777 Posted August 22, 2013 Share Posted August 22, 2013 (edited) 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 August 22, 2013 by Richman777 Link to comment
schoeps Posted November 3, 2013 Author Share Posted November 3, 2013 Hi, I have uploaded version 1.2. It should fix problems with firewire showing up as vpn. Link to comment
Guest atomkraft Posted November 19, 2013 Share Posted November 19, 2013 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
schoeps Posted November 28, 2013 Author Share Posted November 28, 2013 Hi atomkraft, is the problem still present? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now