返回更新列表
新发布Aug 7, 2026

dnsglobe v0.5.0

全局 DNS 传播检查器 TUI — 在终端的世界地图上,观察 DNS 记录在全世界 34 个公共解析器间的传播

分享

dnsglobe

crates.io dnsglobe dnsglobe-bin license

一款面向终端的世界级 DNS 传播检查工具 —— 一个 Rust TUI,它会并行查询全球 34 台公共 DNS 解析器,比较它们的应答,并在世界地图上显示你的记录的传播情况。

dnsglobe 演示 —— 检查某域名在全球 34 台解析器上的 A 和 NS 记录,使用 EDNS 客户端子网,循环切换客户端子网,然后将世界地图变形为旋转的地球

可以把 dnschecker.org / whatsmydns.net 想象成就在你的终端里,还带监视模式:启动一次检查后,它会持续重新轮询,直到记录在全球各地都完成传播。

解析器覆盖全球任播网络(Google、Cloudflare、Quad9)、北美、欧洲、俄罗斯、中东、东亚以及南半球(Telstra AU、SafeSurfer NZ、UOL BR)——每一台都被直接查询,因此你看到的是每台服务器自己当前对这条记录的看法。

每台解析器都被直接查询(无缓存、EDNS0、截断应答时回退到 TCP),因此你看到的是每台服务器当前对这条记录的看法。共享任意记录的应答会被归为一组——因此轮询 DNS(每台解析器缓存 IP 池中不同子集)会被计为一份一致的应答,而不是二十份相互冲突的应答。传播指示计会显示有多少解析器处于多数组;全部结果返回后,离群者会被标记为 ≠ DIFFERS

表格适配 80 列终端:每台解析器的完整 IPv4 地址、往返时间、TTL 和过期倒计时都完整保留,每行判决会缩小为左侧边距中的字形(✓ ≠ ! ↻ ∅ ✗),从而为应答留出空间。倒计时刻意粗略——45s4m2h1d——因为一列秒数不同步地滴答在一分钟以上只是噪音。

当终端足够宽时,右侧会出现世界视图,每个解析器一个圆点,按状态着色(绿色一致、洋红色不同、红色错误、黄色进行中)。视图会随宽度自适应:≥157 列的终端显示平面世界地图,较窄的终端(≥131 列)显示旋转 3D 地球,后者需要的列数更少;跨阈值调整大小时,两者会互相变形。Ctrl+O 可手动切换地图/地球,--view auto|map|globe(或配置文件中的 view = "...")可强制指定样式。

每台解析器都会通过 NSID(RFC 5001)被询问是哪个站点在应答你——这是 EDNS 选项,应答节点会在其中填入自己的名称(gpdns-yulyul01res721.qyul1jfk-dns1-02.inet.centurylink.net)。它不需要每个运营商都提供支持,因此你自己添加的解析器也能上报站点。如果 NSID 没有给出地点,则由运营商特定的识别查询接管:Quad9(TXT id.server.on.quad9.net)、Cloudflare(CH TXT id.server)、Google(通过 TXT o-o.myaddr.l.google.com 匹配 TXT locations.publicdns.goog 获取出口子网)、OpenDNS(TXT debug.opendns.com)、CleanBrowsing 和 Neustar UltraDNS。发现的站点会以 →YUL 风格的代码显示在 Loc 列中,解析器的地图圆点也会移动到实际为你查询提供服务的 POP。

用法

安装:

brew install 514-labs/tap/dnsglobe   # Homebrew (macOS/Linux)
cargo install dnsglobe               # from crates.io
yay -S dnsglobe                      # from archlinux aur (compile from source)
yay -S dnsglobe-bin                  # from archlinux aur (install prebuilt binary)
nix run github:514-labs/dnsglobe     # Nix flakes (builds from source)
# or grab a prebuilt binary from the GitHub Releases page

运行:

dnsglobe                            # start empty, type a domain
dnsglobe example.com                # query immediately and watch
dnsglobe example.com TXT            # same, starting on TXT records
dnsglobe --once example.com TXT     # no TUI: print results, exit (for scripts)
dnsglobe example.com --ecs 203.0.113.0/24        # see the zone as that client network does
dnsglobe --once example.com --ecs 203.0.113.0/24,198.51.100.0/24
                                    # one table per subnet + a convergence summary

EDNS 客户端子网(ECS)

--ecs(或配置文件中的 ecs = [...])会为每个查询附加 EDNS 客户端子网选项(RFC 7871),因此 GeoDNS 区域会针对该客户端网络而不是解析器自身的视角来应答。子网可以是 CIDR 或裸 IP;大多数公共解析器最多使用 /24(IPv4)或 /56(IPv6)。配置多个子网后,Ctrl+N 会循环切换活动子网(外加一个 off 位置)并立即重新查询;--once 会运行每个子网,并以每个子网的收敛摘要结束。故意忽略 ECS 的解析器(Cloudflare、Quad9 等)会被标记为 NO ECS——它们的应答仅作参考展示,不纳入传播百分比,因为它描述的是它们自己的位置,而不是被探测的网络。

按键

按键动作
type / ⌫ / Del编辑域名
←/→ / Home/End在域名输入框中移动光标
Enter开始检查并监视:每 30 秒重新轮询,直到传播达到 100%
Ctrl+R停止或恢复监视
Tab / Shift-Tab选择记录类型(A、AAAA、CNAME、MX、NS、TXT、SOA)并重新查询
↑/↓ / PgUp/PgDn在解析器表格中移动高亮(随动滚动)
+为本会话添加解析器(名称、IP、可选位置和地图坐标)
Ctrl+X为本会话移除高亮解析器
Ctrl+S循环切换表格排序:解析器 / 位置 / 延迟 / 状态 / 应答
Ctrl+O在世界视图的平面地图和旋转地球之间切换
Ctrl+N循环切换 ECS 客户端子网并重新查询(仅在设置了 --ecs/配置时可用)
Ctrl+U清空域名
Esc / Ctrl+C退出

配置

可以选择在 TOML 配置文件中添加自己的解析器——或完全替换内置列表——配置文件位于 ~/.config/dnsglobe/config.toml(若设置了 $XDG_CONFIG_HOME,则为 $XDG_CONFIG_HOME/dnsglobe/config.toml)。设置 DNSGLOBE_CONFIG 可使用其他路径。

# Set to true to replace the built-in list instead of extending it —
# e.g. to watch propagation across your own nameservers only.
replace = false

# EDNS Client Subnet(s) to query with (Ctrl+N cycles; --ecs overrides).
ecs = ["203.0.113.0/24"]

# World-view style: auto (default — pick by terminal width), map, or globe.
# The --view flag overrides this.
view = "auto"

[[resolvers]]
name = "Corp DNS"        # required — shown in the Resolver column
ip = "10.0.0.53"         # required — IPv4 or IPv6, queried on port 53
location = "HQ"          # optional — Loc column / location sort
lat = 40.7               # optional — position on the world map;
lon = -74.0              #            omit both to leave it off the map

[[resolvers]]
name = "NS1 (public)"
ip = "198.51.100.53"

# Optionally recolor the UI. Every key is optional; unset roles keep their
# defaults. Colors are ANSI names ("lightcyan"), 256-color indexes ("208"),
# or hex ("#ff8700" — needs truecolor support).
[theme]
accent   = "lightcyan"    # borders, titles, cursor, anycast sites
agree    = "lightgreen"   # answers matching the majority; fast latency
differ   = "lightmagenta" # answers disagreeing with the majority
error    = "white on lightred"
                          # ERR / SERVFAIL / NONE; slow latency. Written
                          # "<fg> on <bg>", it becomes a filled badge on the
                          # status glyph and word — legible on any background;
                          # a plain color like "lightred" drops the badge
pending  = "lightyellow"  # queries in flight; middling latency
stale    = "208"          # caches serving an answer past its own TTL
upstream = "lightblue"    # refetched but upstream still has the old data
muted    = "faint"        # labels, hints, countdowns, quiet borders —
                          # "faint" dims your terminal's default foreground;
                          # set a color if your terminal renders faint poorly
coastline = "gray"        # map/globe land outline
grid      = "244"         # globe graticule and limb

无效配置(IP 错误、未知键、无法识别的颜色、ecs 子网错误、有 latlonreplace = true 但没有解析器)会在启动时报告,并指出问题条目。

备注

  • 一些解析器是任播网络,因此响应的节点是离你最近的节点。能识别其节点(通过 NSID 或识别查询)的网络会报告实际应答站点(→YUL);其余解析器的位置列是运营商所在区域。
  • 内置解析器列表位于 src/resolvers.rs;使用上面的配置文件即可扩展或替换它,而无需重新构建。每个内置条目都经过验证可应答外部查询;许多知名 ISP 解析器(尤其是所有主要非洲解析器)会拒绝来自其网络之外的查询,因此无法被包含在内。

Nix

该项目为已经在使用 Nix 的用户提供可选的 Nix flake 输出。flake 从源码构建。

# Latest source from default branch
nix run github:514-labs/dnsglobe

# Specific release (uses the flake at that git tag)
nix run github:514-labs/dnsglobe/v0.4.0

# Named outputs (if the flake exposes them): #latest, #source
nix run github:514-labs/dnsglobe#source

# Build / develop
nix build github:514-labs/dnsglobe
nix develop github:514-labs/dnsglobe

该 flake 暴露了 packages.<system>.defaultapps.<system>.defaultdevShells.<system>.defaultoverlays.default

通过你安装时所用的同一 Nix 工作流进行更新。对于 profile 安装,运行 nix profile list,然后运行 nix profile upgrade <index-or-name>。对于 flake inputs,在你自己的 flake 中运行 nix flake update <repo> 并重新构建。

Devbox

如需可复现的开发环境,请使用 Devbox:

# Install Devbox first (if not already installed)
curl -fsSL https://get.jetify.dev/devbox | bash

# Initialize the environment
devbox shell

# Build the project
devbox run build

或通过 Homebrew 安装 Devbox:

brew install jetify-com/devbox/devbox

514.ax 团队用 ❤️ 打造。

分类