Created
March 10, 2021 13:58
-
-
Save allex/5b264ff483e7a67318f7ad2504e94d3c to your computer and use it in GitHub Desktop.
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
| #!/bin/sh | |
| set -x | |
| # do some route cleanup after vpn connected. | |
| # by @allex_wang | |
| # GistID: 5b264ff483e7a67318f7ad2504e94d3c | |
| exec >/tmp/tidu-vpn.log 2>&1 | |
| if [ ! "$EUID" = "0" ]; then | |
| # This script must be run as root | |
| # sudo $0 | |
| osascript -e "do shell script \"$0\" with prompt \"Fix tiduyun VPN routes\" with administrator privileges" | |
| else | |
| whoami | |
| route delete 0/1 | |
| route delete 128.0/1 | |
| fi | |
| netstat -nr -finet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment