• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help VPN on/off

zkab

Newbie
I have OpenVPN Connect for Android 6.0.1 and want to dis/re-connect when I enter/leave my home wifi network.
How can that be done ?
 
Hi

I use that app on my note 4 with Private Tunnel vpn service. Once the app is started and connected, I can turn off my wifi and/or go out of range and it of course disconnects - when I return or turn it back on it automatically reconnects. Just leave the app running. Its the only vpn app I could find that does this.

If you want it to only connect on your home network (and nowhere else) you would need to use Tasker or similar (I have never tried to do this)
 
I want the opposite - when I am within range of my wifi home network it should disconnect and outside my wifi home network it should connect - howto do that with Tasker I don't know.
 
I understand why you want that.

Using macrodroid I can open the app when leaving home and close it when returning, but I still need to manually press "connect" after the app opens. I guess I could have a macro to sound a reminder for me to do this. Not sure how to automate it.

Once on, the app should autoconnect to any network your phone uses until it turns off when you next get to your home Wi-Fi
 
OK - I maid a try with Tasker ...
I tested the tasks Connect & Disconnect separately and they worked but it seems that Tasker don't start them when the correct conditions are meet.
My home wifi is Neverland.
Disconnect should stop OpenVPN and Connect should start it.
Please check attachments.
 

Attachments

  • VPN.jpg
    VPN.jpg
    36 KB · Views: 203
Back
Top Bottom