I usually use OpenVPN Connect android client for connecting to my OpenVPN server in a raspberry. I also use Tasker to automatically connect to the VPN when I am outside from home. My configuration is:
Send Intent Action:android.intent.action.VIEW Cat:None Extra:vpn.AUTOSTART_PROFILE_NAME: <PROFILE NAME> Package:net.openvpn.openvpn Class:net.openvpn.openvpn.OpenVPNClient Target:Activity
Few days ago, the OpenVPN version has been changed to 3.0.1 , and my tasker is not working any more. At least the tasks are not able any more to start a VPN connection or disconnect it.
Obviously, that means that with the new version of the App, some configuration must be changed. Do any body knows what are these new configurations?
Ok, thanks to this web. Seems that I am right and the configuration has been changed. The new settings for connecting will be:
Send Intent Action:android.intent.action.MAIN Cat:None Extra:de.blinkt.openvpn.shortcutProfileName:PROFIL ENAME Package:de.blinkt.openvpn Class:de.blinkt.openvpn.LaunchVPN Target:Activity
This is able to start the OpenVPN connection using a OVPN file. For disconnection, I also need to change the profile:
Send Intent Action:android.intent.action.MAIN Cat:None Extra:de.blinkt.openvpn.shortcutProfileName:PROFIL ENAME Package:de.blinkt.openvpn Class:de.blinkt.openvpn.activities.DisconnectVPN Target:Activity
The author comments -and it is true- that when disconnecting the application remains opened on the screen at foreground. A solution proposed on this forum for this issue is to use a not existing profile as a connection. When trying to connect to this non existing profile, the first action will be to disconnect the current one. As the profile does not exists no connection will be performed.