Skip to content

Instantly share code, notes, and snippets.

@allex
Created March 10, 2021 13:58
Show Gist options
  • Select an option

  • Save allex/5b264ff483e7a67318f7ad2504e94d3c to your computer and use it in GitHub Desktop.

Select an option

Save allex/5b264ff483e7a67318f7ad2504e94d3c to your computer and use it in GitHub Desktop.
#!/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