naiba / nbdns Goto Github PK
View Code? Open in Web Editor NEW:seal: 一个聪明的 DNS 中继器
License: MIT License
:seal: 一个聪明的 DNS 中继器
License: MIT License
nbdns我是跑在k3s集群中,多副本的,将缓存改成redis了,发现redis没有数据。改回go-cache,添加了一些debug信息,从日志来看缓存好像没用上。
0:36 ➜ ~ kubectl logs pods/nbdns-wqp4f -n pangu | head -10
Defaulted container "nbdns" out of: nbdns, dnspod
2023/12/16 00:34:13 ==== DNS Server ====
2023/12/16 00:34:13 端口: 0.0.0.0:8853
2023/12/16 00:34:13 模式: 最快结果
2023/12/16 00:34:13 启用内置缓存: true
2023/12/16 00:34:13 启用 DoH 服务器: 0.0.0.0:8080
2023/12/16 00:34:13 版本: ysicing-743fd50
2023/12/16 00:34:16 tracing exchange udp://223.5.5.5:53 worker_count: 1 pool_count: 0 go_routine: 10 --> enter
2023/12/16 00:34:16 tracing exchange tcp-tls://dns.google:853 worker_count: 1 pool_count: 0 go_routine: 18 --> enter
2023/12/16 00:34:16 connecting to tcp-tls://dns.google:853
2023/12/16 00:34:16 tracing exchange udp://119.29.29.29:53 worker_count: 1 pool_count: 0 go_routine: 20 --> enter
dalao每次启动都要手动./nbdns 还有其他方法么
我本地试了一下, 配置文件如下。用natesales/q命令请求
{
"debug": true,
"profiling": false,
"strategy": 2,
"timeout": 2,
"serve_addr": "0.0.0.0:8853",
"socks_proxy": "127.0.0.1:7374",
"built_in_cache": true,
"doh_server": {
"host": "0.0.0.0:8080",
"username": "",
"password": ""
},
"bootstrap": [
{
"address": "udp://223.5.5.5:53"
},
{
"address": "udp://119.29.29.29:53"
}
],
"upstreams": [
{
"address": "udp://223.5.5.5:53",
"is_primary": true
},
{
"address": "udp://120.53.53.38:53",
"is_primary": true
},
{
"address": "udp://119.28.28.28:53",
"is_primary": true
},
{
"address": "https://doh.dns.sb/dns-query",
"use_socks": true
},
{
"address": "tcp-tls://one.one.one.one:853",
"use_socks": true
},
{
"address": "tcp-tls://dot.sb:853",
"use_socks": true
},
{
"address": "tcp-tls://dns.google:853",
"use_socks": true
}
],
"blacklist": [
"^.*\\.?bing.com*"
]
}
请求日志:
23:33 ➜ ~ q www.google.com A @https://nbdns.ysicing.local
FATA[0000] got status code 400 from https://nbdns.ysicing.local:443/dns-query?dns=mEYBAAABAAAAAAAAA3d3dwZnb29nbGUDY29tAAABAAE
23:33 ➜ ~ q www.baidu.com A @https://nbdns.ysicing.local
FATA[0000] got status code 400 from https://nbdns.ysicing.local:443/dns-query?dns=sKkBAAABAAAAAAAAA3d3dwViYWlkdQNjb20AAAEAAQ
请问这种情况如何排查?
没缓存,效果不佳。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.