Page 1 of 1

Script on Connect

Posted: Wed Sep 02, 2009 12:44 am
by ofueckert
Hi,

Let me first say, I really like your program and I am pretty close to get my optimal setup.

I need to open an ssh tunnel forward to my OpenVPN server before I start the VPN.
Is there a way to call a script (which will setup the SSH forward) before Connect and then again after disconnect ?

I guess it could be done with a wrapper script, but would be nice if I can get it done within Viscosity.

best regards,

Oliver.

Re: Script on Connect

Posted: Wed Sep 16, 2009 3:52 am
by James
Hi Oliver,

Well you can use OpenVPN's up and down commands (see this post). However up scripts are called once the connection has been established, rather than before connecting. Until Viscosity gets additional support for running custom scripts, the only solution I can see is to write your own script that sets up your SSH forward, and then tells Viscosity to connect via AppleScript.

Regards,
James