Closed rampageX closed 4 years ago
开启 -vv 后的日志:
E:\DNSServer\ts-dns>ts-dns.exe -vv
time="2020-05-09T16:23:11+08:00" level=debug msg="show debug log"
time="2020-05-09T16:23:11+08:00" level=warning msg="disable ipv6 resolve"
time="2020-05-09T16:23:11+08:00" level=debug msg="ecs conf: <nil>"
time="2020-05-09T16:23:11+08:00" level=warning msg="enable concurrent dns in group clean"
time="2020-05-09T16:23:11+08:00" level=debug msg="ecs conf: 202.96.134.133/32/0"
time="2020-05-09T16:23:11+08:00" level=debug msg="ecs conf: 202.67.222.222/32/0"
time="2020-05-09T16:23:11+08:00" level=warning msg="listen on :53/udp"
time="2020-05-09T16:23:12+08:00" level=info msg="resolve doh (dns.alidns.com): [223.6.6.6]"
time="2020-05-09T16:23:12+08:00" level=info msg="resolve doh (dns11.quad9.net): [9.9.9.11]"
time="2020-05-09T16:23:12+08:00" level=info msg="resolve doh (dns.google): [8.8.4.4]"
time="2020-05-09T16:23:21+08:00" level=debug msg="question: [{twitter.com. 1 1}], extract: [\n;; OPT PSEUDOSECTION:\n; EDNS: version 0; flags: ; udp: 4096\n; COOKIE: b3e919823e96fbe9]"
time="2020-05-09T16:23:21+08:00" level=debug msg="set default ecs 202.96.134.133/32/0 to msg"
time="2020-05-09T16:23:21+08:00" level=debug msg="forward question [{twitter.com. 1 1}] to &{0xc000224930 223.5.5.5:53 <nil> 0xc00017b1a0}"
time="2020-05-09T16:23:21+08:00" level=debug msg="forward question [{twitter.com. 1 1}] to &{0xc0002249a0 106.54.204.98:5353 <nil> 0xc00017b200}"
time="2020-05-09T16:23:21+08:00" level=debug msg="forward question [{twitter.com. 1 1}] to &{0xc000224a10 223.6.6.6:853 <nil> 0xc00017b260}"
time="2020-05-09T16:23:21+08:00" level=debug msg="forward question [{twitter.com. 1 1}] to &{0xc00017b290 https://dns.alidns.com:443/dns-query [223.6.6.6] 443 dns.alidns.com}"
time="2020-05-09T16:23:21+08:00" level=info msg="match gfwlist" domain=twitter.com. group=dirty src=192.168.4.1 type=A
time="2020-05-09T16:23:21+08:00" level=debug msg="forward question [{twitter.com. 1 1}] to &{0xc000224b60 9.9.9.11:9953 <nil> 0xc00017b3b0}"
time="2020-05-09T16:23:22+08:00" level=debug msg="response: [twitter.com.\t743\tIN\tA\t104.244.42.129 twitter.com.\t743\tIN\tA\t104.244.42.193]"
time="2020-05-09T16:23:55+08:00" level=debug msg="question: [{twitter.com. 1 1}], extract: [\n;; OPT PSEUDOSECTION:\n; EDNS: version 0; flags: ; udp: 4096\n; COOKIE: a1fa9d69d2d044ee]"
time="2020-05-09T16:23:55+08:00" level=debug msg="set default ecs 202.96.134.133/32/0 to msg"
time="2020-05-09T16:23:55+08:00" level=debug msg="forward question [{twitter.com. 1 1}] to &{0xc000224930 223.5.5.5:53 <nil> 0xc00017b1a0}"
time="2020-05-09T16:23:55+08:00" level=debug msg="forward question [{twitter.com. 1 1}] to &{0xc0002249a0 106.54.204.98:5353 <nil> 0xc00017b200}"
time="2020-05-09T16:23:55+08:00" level=debug msg="forward question [{twitter.com. 1 1}] to &{0xc000224a10 223.6.6.6:853 <nil> 0xc00017b260}"
time="2020-05-09T16:23:55+08:00" level=debug msg="forward question [{twitter.com. 1 1}] to &{0xc00017b290 https://dns.alidns.com:443/dns-query [223.6.6.6] 443 dns.alidns.com}"
time="2020-05-09T16:23:55+08:00" level=info msg="match gfwlist" domain=twitter.com. group=dirty src=192.168.4.1 type=A
time="2020-05-09T16:23:55+08:00" level=debug msg="forward question [{twitter.com. 1 1}] to &{0xc000224b60 9.9.9.11:9953 <nil> 0xc00017b3b0}"
time="2020-05-09T16:23:55+08:00" level=debug msg="response: [twitter.com.\t710\tIN\tA\t104.244.42.129 twitter.com.\t710\tIN\tA\t104.244.42.193]"
疑问:
level=debug msg="ecs conf: <nil>"
这个不知道怎么来的?是否影响了 dirty 组的 ecs 设置?另外,日志是否可以提供这些信息(Debug):
debug信息加的比较晚,记录点也比较凌乱……比如每个group都会输出一次ecs conf: xxx
,而不管这个group有没有配置ecs。这个会逐渐重构&改进,包括提到的新记录点。
目前ts-dns会优先请求clean组dns,只有当解析结果中出现非CN IP、且匹配gfwlist
时才会请求dirty组dns,这也是为了避免出现https://github.com/wolf-joe/ts-dns/issues/1#issuecomment-598297650 提到的问题。
如果想让gfwlist
强制走dirty组的话,可以在dirty组的rules_file
里指定gfwlist
文件。
以上提到的ecs bug、ecs缓存问题将在下个版本修复。
这个应该是 0.10 就开始引入的问题:
我的配置文件:
相关截图:
查询结果
查询日志