Git Product home page Git Product logo

Comments (6)

jacky441 avatar jacky441 commented on June 12, 2024

我尝试添加了自定义 脚本 估计是因为 脚本只支持 ash?
custom:

  • "cd /etc/cleardns/ && pkill -9 overture && overture -c overture.json -v > overture.log 2>&1 &"

但是好像没成功

from cleardns.

dnomd343 avatar dnomd343 commented on June 12, 2024

可以在运行启动时加入 --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

from cleardns.

dnomd343 avatar dnomd343 commented on June 12, 2024

我尝试添加了自定义 脚本 估计是因为 脚本只支持 ash? custom:

  • "cd /etc/cleardns/ && pkill -9 overture && overture -c overture.json -v > overture.log 2>&1 &"

但是好像没成功

这个不是 ash 的问题,custom 会在启动前执行,但这个时候 overture 还没被引导,这里先启动会导致端口冲突,但这时候是正常运行的。然后在子进程引导完成后,会触发一次自动更新,更新完成后 overture 会被重启,这个时候带有 log 输出的 overture 会被杀掉,重新替换成 cleardns 引导的进程。

from cleardns.

jacky441 avatar jacky441 commented on June 12, 2024

因为我的docker是在爱快里面运行的
所以访问stdout 日志很不方便

能否考虑添加 自定义 log 文件?

from cleardns.

dnomd343 avatar dnomd343 commented on June 12, 2024

可以的,后续版本会加上。

from cleardns.

jacky441 avatar jacky441 commented on June 12, 2024

from cleardns.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.