Openwrt实现翻墙智能分流及DNS抗污染

又是好久没更新博文了,赶在一个月内更新一下子。

首先ssh连接上openwrt执行以下命令

wget http://openwrt-dist.sourceforge.net/auto_install.sh
chmod +x auto_install.sh
./auto_install.sh
opkg update

然后我们安装上shadowsocks和chinadns以及配套的luci配置工具

opkg install shadowsocks-libev-spec ChinaDNS luci-app-shadowsocks-spec luci-app-chinadns

然后我们进入Luci界面开始配置
首先设置好shadowsocks的服务器密码以及加密方式我们在这里不再赘述
然后记得启用UDP转发,看图按照以下内容填写
点击查看大图
点击保存重启路由器即可生效

升级方式

opkg upgrade shadowsocks-libev-spec ChinaDNS luci-app-shadowsocks-spec luci-app-chinadns

文件 chinadns_chnroute.txt 与 ignore.list 相同, 可使用符号链接节省空间

rm -f /etc/chinadns_chnroute.txt
ln -s /etc/shadowsocks/ignore.list /etc/chinadns_chnroute.txt

更新IP 忽略列表:

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)) }' > /etc/shadowsocks/ignore.list

参考资料:
http://openwrt-dist.sourceforge.net/
http://sourceforge.net/p/openwrt-dist/wiki/Plan5/

原文:http://lentin.me/2015/01/openwrt-setup-shadowsocks-chinadns-fuck-gfw/

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s