Last active
June 28, 2020 03:59
-
-
Save freemandealer/8f9fc523ada3a8e319ef7866f511130b to your computer and use it in GitHub Desktop.
Android tasker pseudo script to automate vpn on/off when using Chrome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# turn on chrome | |
if VPNISON ~ 0 | |
connect vpn | |
set VPNISON 1 | |
wait 30sec // wait 30 sec and set disconnectable to avoid frequent on/off | |
set VPNISON 2 // disconnectable | |
endif | |
# turn on others (turn off chrome) | |
if VPNISON ~ 2 | |
disconnect vpn | |
set VPNISON 0 | |
stop | |
# give this app another chance to switch off VPN | |
# if hadn't been off when start | |
wait 30sec until VPNINON ~ 2 | |
if VPNISON ~ 2 | |
disconnect vpn | |
set VPNISON 0 | |
set VPNISON 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment