Automatically connect to VPN when connecting to WiFi? My university has an open WiFi that requires me to log into a specific VPN before I can access the internet.

Is there any built-in way or app that allows me to specify which VPN I want to start together with a certain WiFi connection? (Similar to Ubuntu's option to combine a WiFi with a VPN) Right now I have to start the VPN manually every time, and if I loose connectivity, the VPN will not automatically reconnect together with the network connection.

I am using cyanogenmod 10.2.0

EDIT:

To clarify, this is what the option looks like in Ubuntu's network manager:  



I want to achieve a similar effect in Android/Cyanogenmod.
Feature of VPNroot does exactly do what you want:


auto connect/disconnect on a specific WiFi (only for Pro)


https://play.google.com/store/apps/details?id=com.did.vpnroot&amp;hl=en