Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 1.25 KB

README.md

File metadata and controls

52 lines (32 loc) · 1.25 KB

Tasker WireGuard Tunnel Automation

About

Helper to Automate spinning up and shutting down WireGuard tunnel via Tasker Automation (or compatible API)

I usually don’t do Android apps or Kotlin so feel free to improve on this.

Usage

This section needs to be updated. I use a MacroDroid with Android QuickTile and with following config.

NOTE: Asgard is both name of my home server and the tunnel.

App Intend Config
net.evolution515.taskerwgtunnel/.MainActivity$IntentReceiver
com.wireguard.android.action.SET_TUNNEL_UP
tunnel="Asgard"
MacroDroid
Termux

Additionally I use a Termux script (.termux/tasker/sleep-asgard).

!#/bin/sh

ssh asgard "(sleep 1; sudo pm-suspend) & disown" &
termux-toast -s "Asgard is now asleep"

Debugging

You can use something like that for debugging

 am broadcast -a com.wireguard.android.action.SET_TUNNEL_UP -n 'net.evolution515.taskerwgtunnel/.MainActivity$IntentReceiver' --es tunnel Asgard