Comments (2)
不推荐这么做,你想要的这个特性其实已经实现了。
godns收到一个dns查询时,会按照下面三个步骤进行解析:
- 查询本机/etc/hosts配置
- 查询redis服务器是否有匹配记录,因此你想实现运行时更新解析结果,只要在redis中添加一条记录就ok了。添加一条redis记录也有两种方式:
- 直接操作redis,默认key是
godns:hosts
,例如redis > hset godns:hosts www.sina.com.cn 1.1.1.1
- 通过joke进行管理
- 直接操作redis,默认key是
- 上面两步都没查到相应记录,就会交给上层递归解析
因此推荐你把redis部署起来,然后通过joke来管理动态解析结果。:p
from godns.
收到了解了。我之前没尝试joke成功。现在已OK了。
from godns.
Related Issues (20)
- Domain support wildcard HOT 1
- Support multiple A entries / DNS round robin HOT 4
- zone forward HOT 4
- Limit response rate to defense DDoS HOT 3
- Error codes converted to SERVFAIL HOT 5
- redis backed cache HOT 3
- update redis refresh & makemap HOT 3
- 能否增加dockerfile? HOT 2
- wildcard in hosts file didn't work HOT 2
- i/o timeout HOT 1
- 能不能实现cname动态缓存? HOT 3
- 使用Redis,没有初始化godns:hosts的key HOT 1
- 打搅了,不知有无计划增加forwarder功能 HOT 2
- 能实现域名解析吗? HOT 5
- I have "Update ttl" code. HOT 3
- dig xxxx @127.0.0.1 AAAA block 5 seconds or so HOT 1
- 请问这是dns权威服务还是递归服务? HOT 1
- connection timed out; no servers could be reached
- Feature request: ability to listen on multiple addresses
- Festure request: ability to cache negative responses (NXDOMAIN or empty results)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godns.