Acris / shadowsocks-asuswrt-merlin

Shadowsock for Asuswrt-Merlin New Gen
MIT License
255 stars 44 forks source link

Question about DNS route #8

Closed soliujing closed 5 years ago

soliujing commented 5 years ago

Have experienced long loading latency of images from zhihu.com (.zhimg.com) & qq.com (.gtimg.com)

Further looked dnsmasq & unbound configuration, seems all DNS request forwarded to dns.rubyfish.cn and responded some IPs not friendly to china hosts. China whitelist didn't work either.

unbound upstream query thru DoT rubbyfish

  forward-addr: 118.89.110.78@853
  forward-addr: 47.99.165.31@853
  forward-tls-upstream: yes

Below command is replacing 114.114.114.114 with 127.0.0.1 but I doubt it end up forwarding everything to unbound. (Not proved yet, I don't have the router now for testing)

Any request -> local 53 -> local unbound

sed "s#114\.114\.114\.114#${default_dns_ip}#" ${ACCELERATED_CONFIG}.bak > ${ACCELERATED_CONFIG}

dnsmasq forwarding all to unbound with wildcard "#" server=/#/127.0.0.1#15253

Not sure if you have same problem, if yes I suggest to

  1. China whitelist mode: keep 114.114.114.114 for DNS request forwarding, use unbound as local default
  2. GFW mode: Remove default forwarding, forward only gfwlist domain to unbound service
Acris commented 5 years ago

Thanks, I've fixed it.