Easer
Easer copied to clipboard
VPN support
I'd like to automatically connect to a certain VPN when connecting to a specific Wifi, thus I'd very much appreciate it if support for an operation to connect to VPN could be added.
That's interesting. I suspect Android might have some limitation on automatically enabling VPNs, but I'll try to find if there is a way.
Plus one for this. To be able to use the built-in vpn in the android settings and openvpn app would be awesome...
You can use OpenVPN for Android.
Select Launch App as an operation.
App: de.blinkt.openvpn
Class Name: de.blinkt.openvpn.api.ConnectVPN (or DisconnectVPN)
Extras:
Key: de.blinkt.openvpn.api.profileName
Value: <your_openvpn_profilename>
@fluks I wouldn't mind using this approach. Do you know how to find Class and Extras for other VPN apps? Also my scenario is: as soon as I get disconnected from particular wifi I want to turn on VPN, I'm assuming reverse scenario needs to be activated?
Do you know how to find Class and Extras for other VPN apps?
I think the app needs to have a feature to let other apps control it. If a VPN app has made it available, it reads in the documentation. That's my guess.
Also my scenario is: as soon as I get disconnected from particular wifi I want to turn on VPN, I'm assuming reverse scenario needs to be activated?
Yes. I really can't help you with that, unfortunately I find the UX very confusing, sorry about that, renyuneyun, otherwise this is a good program. I hope the maintainer or others can improve it somehow.
It would be great if I could use this app for VPN wireguard to:
- activate VPN as soon as you leave your home network
- deactivate VPN as soon as you are connected to the home network again
- and if the app would support two VPN connections one for the private and one for the work profile of Android (if you don't know the work profile see the app "Shelter")
for wireguard, there is TunnelManager$IntentReceiver. the following Broadcast profiles should work:
Enable VPN -- action: com.wireguard.android.action.SET_TUNNEL_UP, extras key: tunnel, value: <TUNNEL_NAME>
Disable VPN -- action: com.wireguard.android.action.SET_TUNNEL_DOWN, extras key: tunnel, value: <TUNNEL_NAME>
however, i believe Easer must request permission com.wireguard.android.permission.CONTROL_TUNNELS
see also: https://www.reddit.com/r/tasker/comments/fn6wou/wireguard_now_supports_control_by_remote_apps/fl93kw8/?utm_source=reddit&utm_medium=web2x&context=3
i see there is a separate issue for wireguard here: https://github.com/renyuneyun/Easer/issues/361 -- initial support is in the beta release