shadowsocks / ChinaDNS

Protect yourself against DNS poisoning in China.
GNU General Public License v3.0
3.6k stars 1.29k forks source link

-s 114.114.114.114,127.0.0.1:5353 指定的upstream dns server智能区分国内外问题 #129

Closed warking closed 7 years ago

warking commented 7 years ago

chinadns 对于-s 后面的dns server会判断国内外地址。那么对于127.0.0.1 是否当成国内地址? 其实这里我期望的是用127.0.0.1:5353 来拿国外IP地址解析结果的。 所以-s 后面的国内国外是否分开两个参数更加明显指定?

yv-code commented 7 years ago

记得是不属于 china_router 文件中的网段都被标记为国外,所以 127 也被视为国外地址

warking commented 7 years ago

OK,明白了,多谢指教 我翻看了代码, static int test_ip_in_list(struct in_addr ip, const net_list_t *netlist); 所以这里算是有个implicit的指定国内外的办法