2019年6月30日
小米mini openwrt安装shadowsocks
步骤一:安装ssl依赖,使wget可以下载https站点文件 opkg update opkg install libustream-openssl ca-certificates
步骤二:安装软件源 cd /tmp/ wget http://openwrt-dist.sourceforge.net/openwrt-dist.pub opkg-key add openwrt-dist.pub rm -rf openwrt-dist.pub echo "src/gz openwrt_dist http://openwrt-dist.sourceforge.net/packages/base/mipsel_24kc" >> /etc/opkg/customfeeds.conf echo "src/gz openwrt_dist_luci http://openwrt-dist.sourceforge.net/packages/luci" >> /etc/opkg/customfeeds.conf
步骤三:安装软件 opkg update opkg install luci-compat opkg install ChinaDNS opkg install luci-app-chinadns opkg install dns-forwarder opkg install luci-app-dns-forwarder opkg install shadowsocks-libev opkg install luci-app-shadowsocks
步骤四:设置影梭 [Services]-->[影梭]-->[访问控制] [外网区域] [被忽略IP列表] :[ChinaDNS路由表] [内网区域] [Interface] :[勾选] [代理类型] :[正常代理] [代理自身] :[正常代理] [附加参数] :[仅代理53,80,443端口] [内网主机] [空] [Services]-->[影梭]-->[服务器管理] 删除默认服务器,添加自己的服务器信息。 [Services]-->[影梭]-->[General Settings] [全局设置] [自启动延时] :[5秒] [透明代理] [主服务器] :选择自己刚刚添加的服务器 [UDP服务器] :[可选步骤,不玩游戏一般用不到]选择自己刚刚添加的服务器,服务器一定要开启UDP代理才有效果 其它用不到,停用即可 点击[Save & Apply]
步骤五:设置DNS转发 [Services]-->[DNS转发] [基本设置] [启用] :[勾选] [监听端口] :[5300] [监听地址] :[0.0.0.0] [上游 DNS] :[8.8.8.8] 点击[Save & Apply]
步骤六:设置ChinaDNS [Services]-->[ChinaDNS] 基本设置 [启用] :[勾选] [启用双向过滤 ] :[勾选] [监听端口] :[5353] [监听地址] :[0.0.0.0] [国内路由表] :[/etc/chinadns_chnroute.txt] [上游服务器] :[114.114.114.114,0.0.0.0#5300] 点击[Save & Apply] 使用ssh工具连接路由器,更新[/etc/chinadns_chnroute.txt]地址列表: wget -O- 'https://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' | awk -F\| '/CN\|ipv4/ { printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > /etc/chinadns_chnroute.txt重启shadowsocks:
/etc/init.d/shadowsocks restart
步骤七:设置路由器DNS设置 [Network]-->[DHCP and DNS]-->[General Settings] [DNS forwardings] :[127.0.0.1#5353] [Network]-->[DHCP and DNS]-->[Resolv and Hosts Files] [Ignore resolve file] :[勾选] 点击[Save & Apply]