Skip to content

Instantly share code, notes, and snippets.

@chenyanzhe
Created September 25, 2015 02:35
Show Gist options
  • Save chenyanzhe/9660dfb52c1b6332418d to your computer and use it in GitHub Desktop.
Save chenyanzhe/9660dfb52c1b6332418d to your computer and use it in GitHub Desktop.
Update router list for chinadns and shadowsocks
updatelist() {
wget -O- 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F\| '/CN\|ipv4/ { printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > /tmp/ignore.list
cp /tmp/ignore.list /etc/chinadns_chnroute.txt
cp /tmp/ignore.list /etc/shadowsocks_ignore.list
}
updatelist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment