ClearDNS
ClearDNS copied to clipboard
Log file
请问怎么设置能自动保存/记录 所有解析的域名 最后使用的是什么dns服务器 国内或者国外的 dns 解析的?
我尝试添加了自定义 脚本 估计是因为 脚本只支持 ash? custom:
- "cd /etc/cleardns/ && pkill -9 overture && overture -c overture.json -v > overture.log 2>&1 &"
但是好像没成功
可以在运行启动时加入 --debug 选项,或者添加 DEBUG=TRUE 来进入 debug 模式,使 overture 输出 debug 级别日志,输出的内容将会打印在 stdout 中,由于 golang 的日志格式和其他进程不同,可以方便地过滤出来。
$ docker run --rm -it dnomd343/cleardns --debug | grep -E '\[[0-9]{4}(-[0-9]{2}){2}'
INFO[2023-04-13 07:52:10] Overture v1.8
INFO[2023-04-13 07:52:10] If you want to use overture safe and sound, please read the README.md from project repository: https://github.com/shawn1m/overture
INFO[2023-04-13 07:52:10] Domain file chinalist.txt has been loaded with 72780 records (suffix-tree)
INFO[2023-04-13 07:52:10] Domain file gfwlist.txt has been loaded with 6573 records (suffix-tree)
INFO[2023-04-13 07:52:10] IP network file china-ip.txt has been loaded with 8429 records
WARN[2023-04-13 07:52:10] No element has been loaded from IP network file: /dev/null
INFO[2023-04-13 07:52:10] Minimum TTL is disabled
INFO[2023-04-13 07:52:10] Cache is disabled
INFO[2023-04-13 07:52:10] Hosts file has been loaded successfully
DEBU[2023-04-13 07:52:10] Init resolver for Domestic succeed
DEBU[2023-04-13 07:52:10] Init resolver for Foreign succeed
INFO[2023-04-13 07:52:10] Overture is listening on :5353
DEBU[2023-04-13 07:52:10] Question from 127.0.0.1: ;adguardteam.github.io. IN A
DEBU[2023-04-13 07:52:10] Domain Primary match fail
DEBU[2023-04-13 07:52:10] Matched DNS=Alternative domain=adguardteam.github.io question=adguardteam.github.io
DEBU[2023-04-13 07:52:10] Finally use Alternative DNS
DEBU[2023-04-13 07:52:10] Question from 127.0.0.1: ;adguardteam.github.io. IN AAAA
DEBU[2023-04-13 07:52:10] Use as original ednsClientSubnetIP
DEBU[2023-04-13 07:52:10] Use as ednsClientSubnetIP
DEBU[2023-04-13 07:52:10] Domain Primary match fail
DEBU[2023-04-13 07:52:10] Matched DNS=Alternative domain=adguardteam.github.io question=adguardteam.github.io
DEBU[2023-04-13 07:52:10] Finally use Alternative DNS
DEBU[2023-04-13 07:52:10] Use as original ednsClientSubnetIP
DEBU[2023-04-13 07:52:10] Use as ednsClientSubnetIP
DEBU[2023-04-13 07:52:10] Creating new connection to 127.0.0.1:6053
DEBU[2023-04-13 07:52:10] Creating new connection to 127.0.0.1:6053
DEBU[2023-04-13 07:52:11] Answer from Foreign: adguardteam.github.io. 583 IN A 185.199.111.153
DEBU[2023-04-13 07:52:11] Answer from Foreign: adguardteam.github.io. 583 IN A 185.199.108.153
DEBU[2023-04-13 07:52:11] Answer from Foreign: adguardteam.github.io. 583 IN A 185.199.110.153
DEBU[2023-04-13 07:52:11] Answer from Foreign: adguardteam.github.io. 583 IN A 185.199.109.153
DEBU[2023-04-13 07:52:11] Answer from Foreign: adguardteam.github.io. 3340 IN AAAA 2606:50c0:8000::153
DEBU[2023-04-13 07:52:11] Answer from Foreign: adguardteam.github.io. 3340 IN AAAA 2606:50c0:8001::153
DEBU[2023-04-13 07:52:11] Answer from Foreign: adguardteam.github.io. 3340 IN AAAA 2606:50c0:8002::153
DEBU[2023-04-13 07:52:11] Answer from Foreign: adguardteam.github.io. 3340 IN AAAA 2606:50c0:8003::153
我尝试添加了自定义 脚本 估计是因为 脚本只支持 ash? custom:
- "cd /etc/cleardns/ && pkill -9 overture && overture -c overture.json -v > overture.log 2>&1 &"
但是好像没成功
这个不是 ash 的问题,custom 会在启动前执行,但这个时候 overture 还没被引导,这里先启动会导致端口冲突,但这时候是正常运行的。然后在子进程引导完成后,会触发一次自动更新,更新完成后 overture 会被重启,这个时候带有 log 输出的 overture 会被杀掉,重新替换成 cleardns 引导的进程。
因为我的docker是在爱快里面运行的 所以访问stdout 日志很不方便
能否考虑添加 自定义 log 文件?
可以的,后续版本会加上。
谢谢 目前使用起来完全没问题 就希望能添加个这个功能 最好能简化 就类似 那个客户端解析了哪个域名最后是用的是国内还是国内外的出口解析的
On Thu, Apr 13, 2023 at 4:35 PM Dnomd343 @.***> wrote:
可以的,后续版本会加上。
— Reply to this email directly, view it on GitHub https://github.com/dnomd343/ClearDNS/issues/7#issuecomment-1506570456, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANAOUF7MX3ID7D6WAMWTUB3XA63G7ANCNFSM6AAAAAAW3B7ENE . You are receiving this because you authored the thread.Message ID: @.***>