This file contains hidden or 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
on idle | |
# Change these to your VPN's IP Address, and the VPN's name in your Mac's Network System Prefernces panel. | |
set vpnIPAddress to "111.222.333.444" | |
set vpnServiceName to "AlgoVPN" | |
set myIP to "127.0.0.1" | |
set shellScriptCommands to {¬ | |
"dig +short myip.opendns.com @resolver1.opendns.com", ¬ | |
"dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'\"' '{ print $2}'", ¬ | |
"curl ifconfig.me", ¬ |
This file contains hidden or 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
echo "IPForward = yes" >> /etc/systemd/network/"$(ip route get 8.8.8.8 | head -n1 | cut -d ' ' -f5)".network && systemctl restart systemd-networkd |