schwabe / ics-openvpn

OpenVPN for Android
3.31k stars 1.2k forks source link

Feature request: Disconnect using Intent without confirmation #1580

Closed pszabaciuk closed 1 year ago

pszabaciuk commented 1 year ago

Hello. I am using android 12 automations for connect/disconnect openvpn with vpn network. Events are using Intents. As connection works great as disconnection requires confirmation. Could you make Intent disconnect working without confirmation? Or at least configuration for this?

schwabe commented 1 year ago

I think the Intent de.blinkt.openvpn.api.DisconnectVPN does not require confirmation apart from the first time where the users is asked to allow remote control from the querying application in general.

I am not familar with "Android 12 automations". Could you point me to Google documentation about this feature?

pszabaciuk commented 1 year ago

It is simple if else command chain which can call intents when specific conditions are meet. I always get question I I want to disconnect vpn right after I get home.

schwabe commented 1 year ago

Yes. The intent for that is there but I never heard of that Android feature so I have no idea how to use it. My Pixel phone does not seem to have it.

pszabaciuk commented 1 year ago

Sorry for delay. This is called Modes and Routines i settings: image image At Then action I have selected Disconnect Intent from OpenVPN for Android. In file: https://github.com/schwabe/ics-openvpn/blob/master/main/src/main/java/de/blinkt/openvpn/activities/DisconnectVPN.java line 54 there is show dialog. If this would be configurable (to show or disconnect without asking), I think would cover this problem.

schwabe commented 1 year ago

That is no normal Android feature but a Samsung extension. There is another ticket about this but these are not activities for automasation that you can select there but home screen actions. And they are designed for normal user interaction in Android and not automasation.