blurayne / TaskerWgTunner

WireGuard Automation for Tasker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

WireGuard Automation for Tasker

License:The Unlicense


Languages

Language:Kotlin 100.0%