Title. Is that possible? I have proton vpn setup at the network layer at home so there is no need for the app on my phone or laptop to be connected when at home. However I would like it to auto connect when I connect outside of my house. As anyone done this before? This would specifically be for android and windows devices if that matters.
I wonder if you’d be able to set up a rule in something like Tasker (Play store link, sorry) to activate the tunnel when you’re off your home network. I haven’t used Tasker in years though, sorry.
What you want is Easer: https://me.ryey.icu/Easer/en/
Like Tasker, but FOSS and available via F-Droid
Is there newer version/alternative to this?
Hey, I have done something similar to this.
I turn the VPN on every time I connect to a WiFi without the SSID of my trusted places.
Super easy with tasker.
Here is the XML to import and experiment with OP:
<TaskerData sr="" dvi="1" tv="6.4.15"> <Profile sr="prof7" ve="2"> <cdate>1693206728189</cdate> <edate>1742652330550</edate> <flags>8</flags> <id>7</id> <mid0>8</mid0> <mid1>9</mid1> <nme>VPN Automation</nme> <State sr="con0" ve="2"> <code>160</code> <pin>true</pin> <Str sr="arg0" ve="3">HomeWifi/telenet-C6DE3/My VW 4685</Str> <Str sr="arg1" ve="3"/> <Str sr="arg2" ve="3"/> <Int sr="arg3" val="2"/> </State> <State sr="con1" ve="2"> <code>110</code> <pin>true</pin> <Int sr="arg0" val="1"/> <Int sr="arg1" val="1"/> <Int sr="arg2" val="1"/> <Int sr="arg3" val="1"/> <Int sr="arg4" val="1"/> <Int sr="arg5" val="0"/> </State> <State sr="con2" ve="2"> <code>160</code> <Str sr="arg0" ve="3"/> <Str sr="arg1" ve="3"/> <Str sr="arg2" ve="3"/> <Int sr="arg3" val="2"/> </State> </Profile> <Task sr="task8"> <cdate>1693214693841</cdate> <edate>1694095080534</edate> <id>8</id> <nme>Turn On VPN</nme> <pri>100</pri> <Action sr="act0" ve="7"> <code>365</code> <Bundle sr="arg0"> <Vals sr="val"> <net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""/></net.dinglisch.android.tasker.RELEVANT_VARIABLES> <net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type> </Vals> </Bundle> <Str sr="arg1" ve="3">WireGuardSetTunnel(true,BE-wg)</Str> </Action> </Task> <Task sr="task9"> <cdate>1693214759029</cdate> <edate>1693374826981</edate> <id>9</id> <nme>Turn Off VPN</nme> <pri>100</pri> <Action sr="act0" ve="7"> <code>365</code> <Bundle sr="arg0"> <Vals sr="val"> <net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""/></net.dinglisch.android.tasker.RELEVANT_VARIABLES> <net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type> </Vals> </Bundle> <Str sr="arg1" ve="3">WireGuardSetTunnel(false,BE-wg)</Str> </Action> </Task> </TaskerData>
Thanks for that! I did consider seeing if tasker could do that as I used it a lot when I used to run android as my daily driver (was on iOS for a long time and finally flipping back).
Appreciate the example!