ZeroTierOne icon indicating copy to clipboard operation
ZeroTierOne copied to clipboard

Integrate Android app with automation frameworks

Open fakuivan opened this issue 5 years ago • 15 comments

Is your feature request related to a problem? Please describe.

On Android apps that work as VPN providers usually expose intents that allow apps like Tasker, Automate, Intent and many others to bring up the tunnel, turn it off or even add other networks without having to use any GUI hacks or integrating the VPN provider app in unnatural ways.

Describe the solution you'd like

As I mentioned, this is usually achieved by declaring intent filters and a permission for applications that want to use them them. WireGuard's implementation does not excede 50 lines of code and allows other apps to bring a named tunnel up and down. As an extra given how simple it's to add new networks, it'd be nice if the zt implementation could join the network in case the device is not a member of it.

With this, the apps mentioned and many more will be able to interact with the zt app, as long as the user grants them permission to do so.

In case the devs want to go the extra mile, some apps like VPN Client Pro or OpenVpn Tasker Plugin provide "plugins" for Tasker to allow scripts to check if or when the some state changes (for example, if the tunnel is or goes down), I'm not so familiar with how such a plugin could be implemented in the code, but it'd be nice to have that for sure.

Describe alternatives you've considered

  • I've tried to use GUI hacks to achieve this but the result is very unreliable and inconvenient.

Links:

fakuivan avatar May 02 '20 21:05 fakuivan

Just to add some User Stories to support this suggestion for development and testing:

  • As an end user, I want to connect to Zero Tier in my Android phone only when I'm not connected to my home/work office physical network in order to securely connect to my network through ZT only when I don't have direct lan connection.
  • As an end user, I want to connect to Zero Tier when I'm on cellular network only to keep my phone connected to my ZT network when I'm roaming through different locations.

diamant-x avatar Sep 22 '20 09:09 diamant-x

That's interesting. Or for example enable zt connection once an app is opened 😊

hardwareadictos avatar Oct 03 '20 19:10 hardwareadictos

I'd like to voice my support for this feature as well. In addition to what @diamant-x said, the main reason I don't just keep ZT on all the time is to conserve battery. The app is overally pretty battery-friendly but if it were to even use 5% of my phone's battery during the day when I don't need it is too much in my opinion. Having the ability to dynamically enable/disable it via Tasker would be amazing.

pearlythepirate avatar May 25 '21 17:05 pearlythepirate

My support is more so because the zerotier Android app occasionally disconnects. If I could set up an automation to reconnect Everytime it disconnects that'd be great. This is related to #1130.

joshpetit avatar Jan 09 '22 13:01 joshpetit

I would also strongly be in favour of adding this. I have a variety of uses for this for some embedded applications where I have an Android device that I want to "wake up" and perform a variety of functions including enabling the VPN when external power is connected.

adub08 avatar May 27 '22 09:05 adub08

Would also like this for similar reasons. In windows there's metrics so it always chooses the shortest path, but it's a pain trying to do something similar on android.

brainiac19 avatar Sep 01 '22 13:09 brainiac19

I really need this feature too for reasons stated above.

bwims avatar Sep 24 '22 11:09 bwims

Im sad this has not received any love for 3 years

sandorex avatar Feb 02 '23 23:02 sandorex

Tailscale can do this well now.

yyqwe158 avatar Jul 09 '23 23:07 yyqwe158