Coder Social home page Coder Social logo

Comments (2)

kenshinx avatar kenshinx commented on August 27, 2024

不推荐这么做,你想要的这个特性其实已经实现了。
godns收到一个dns查询时,会按照下面三个步骤进行解析:

  1. 查询本机/etc/hosts配置
  2. 查询redis服务器是否有匹配记录,因此你想实现运行时更新解析结果,只要在redis中添加一条记录就ok了。添加一条redis记录也有两种方式:
    • 直接操作redis,默认key是godns:hosts,例如redis > hset godns:hosts www.sina.com.cn 1.1.1.1
    • 通过joke进行管理
  3. 上面两步都没查到相应记录,就会交给上层递归解析

因此推荐你把redis部署起来,然后通过joke来管理动态解析结果。:p

from godns.

wuyongzhi avatar wuyongzhi commented on August 27, 2024

收到了解了。我之前没尝试joke成功。现在已OK了。

from godns.

Related Issues (20)

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.