zw963 / asuswrt-merlin-transparent-proxy

transparent proxy base on ss, v2ray, xray, ipset, iptables, chinadns on asuswrt merlin or side router.
MIT License
380 stars 80 forks source link

为什么不使用 dnsmasq.conf.add 呢?感觉更方便一些。 #36

Closed AxIauk closed 7 years ago

AxIauk commented 7 years ago

echo "no-resolv" > /jffs/configs/dnsmasq.conf.add echo "server=127.0.0.1#1082" >> /jffs/configs/dnsmasq.conf.add

这样后每次重启自动加入到/etc/dnsmasq.conf 中就不用再倒腾维护dnsmasq了。 dnsmasq(127.0.0.1#1082) -> ChinaDNS(-p 1082 127.0.0.1:1081) -> ss-tunnel(1081) 维护chinadns的地区判断数据更简单一些吧,命令更精简?

AxIauk commented 7 years ago

另外看了一个篇文章 http://fooy.github.io/blog/2016/06/18/setup-transparent-proxy-on-r7000/ 使用了 xt_geoip.ko 模块去判断 cn 域名与ip。不知道数据量大不大,好不好用。

AxIauk commented 7 years ago

另外 ss 启动 -b 参数都建议使用0.0.0.0 不是127.0.0.1吧? (若想使路由器自身和局域网内的机器都能够使用到 shadowsocks 服务,则需将该地址指定为 0.0.0.0。)

zw963 commented 7 years ago

这样后每次重启自动加入到/etc/dnsmasq.conf 中就不用再倒腾维护dnsmasq了。 dnsmasq(127.0.0.1#1082) -> ChinaDNS(-p 1082 127.0.0.1:1081) -> ss-tunnel(1081) 维护chinadns的地区判断数据更简单一些吧,命令更精简?

之前用过, 之前的命令是: echo 'conf-dir=/opt/etc/dnsmasq.d/,*.conf' >> /jffs/configs/dnsmasq.conf.add, 这种情况, 当 /opt/etc 不存在时, 仍旧会执行, 会造成 dhcp 服务 不工作, 所以干脆不用了。

另外看了一个篇文章 http://fooy.github.io/blog/2016/06/18/setup-transparent-proxy-on-r7000/ 使用了 xt_geoip.ko 模块去判断 cn 域名与ip。不知道数据量大不大,好不好用。

这个也许有用, 不过现在基于 ipset, 性能貌似够用。

另外 ss 启动 -b 参数都建议使用0.0.0.0 不是127.0.0.1吧? (若想使路由器自身和局域网内的机器都能够使用到 shadowsocks 服务,则需将该地址指定为 0.0.0.0。)

你是 ss-redir, 又不是 ss-local, 暴露出去完全无用。