SparkLabs Forum.

Community Help.


Connect each start to a different VPN

Hey guys,

I'd like to make a suggestion:
My VPN service has a lot of servers and I've imported them all into Viscosity, which I set to auto start at boot and connect to a VPN. Now it would be nice, if Viscosity could randomize it's choice and connect with each new start to another VPN connection. That would maximize the security, since with you using only one VPN connection each time, attackers could possibly get informations about you.
I know, that I could do this manually, but I like the setting, that Viscosity automatically connects to a connection without me doing anything. I'd appreciate it very much, if you'd consider this and implement it.
Hi julis,

Thanks for the feedback - handling VPN Service Provider connections in a better fashion is definitely something we are working on.

In the meantime you may like to look into using Viscosity's scripting support to get a list of connections and then connect one at random. You could then have this script run at login (and untick Viscosity's Connect on Start option).
http://www.sparklabs.com/support/contro ... _with_app/
http://www.sparklabs.com/support/viswin_script_control/

Cheers,
James
Thanks James, I really look forward to a better connection handling in Viscosity.

I made an AppleScript like you suggested, it was easier than I thougt. Though I don't manage to find how I set it to run when Viscosity starts. Could you quickly help me out with that?

The script for those interested:

Code: Select all

set VPNList to {"Connection 1", "Connection 2", "Connection 3"}
set theItem to some item of VPNList
tell application "Viscosity" to connect theItem

Replace "Connection X" with the names of your connections like they are displayed in Viscosity. You can expand the list and add as many connections as you like.
Haven't really found a way to run the script from above at the start of Viscosity. Is there even a way?

Currently I've set a specific connection to establish at the start of Viscosity, which is then set to run the script from above. Then I disconnect the first specific connection and have then one random established connection left. Not the best solution, but it works.
Hi julis,

My recommendation would be to save your script as an "Application" from the Script Utility application, and then add it as a Login Item:
https://support.apple.com/kb/PH18881?locale=en_US

Cheers,
James
5 posts Page 1 of 1

Copyright © 2016 SparkLabs Pty Ltd. All Rights Reserved. Privacy Policy