Releases: larsonzh/whois
whois v3.2.9
whois v3.2.9
聚焦 DNS Phase 2/3 收尾、DNS 健康记忆与调试可观测性,将当前 DNS 实现标记为新的黄金基线。
Focus on DNS Phase 2/3 wrap-up, DNS health memory and observability, turning the current DNS stack into the new golden baseline.
中文概要:
- DNS Phase 2/3 收尾:以
wc_dns+ lookup 为中心,固化“候选生成 → 负缓存 → 候选排序 → 回退层”整体设计,并通过[DNS-CAND]/[DNS-FALLBACK]/[DNS-CACHE]/[DNS-HEALTH]将关键路径暴露到 stderr,默认仅在--debug或--retry-metrics下输出,兼容既有 stdout 契约。 - 进程级 DNS 缓存统计:
--dns-cache-stats在进程退出时输出一行[DNS-CACHE-SUM] hits=<n> neg_hits=<n> misses=<n>,用于观察正向/负向缓存命中率和未命中数量,不改变解析或回退策略,可安全用于生产环境调试。 - DNS 健康记忆(Phase 3):为每个
host+family维护轻量健康状态(连续失败计数、短期惩罚窗口等),通过[DNS-HEALTH]日志暴露当前健康度,在候选排序中对“已证明不健康”的家族轻量降权,减少在被墙 IPv4/IPv6 段上的重复超时。 - 自测与 DNS 调试 quickstart:在以
-DWHOIS_LOOKUP_SELFTEST编译且加--selftest时,新增的[LOOKUP_SELFTEST]行会总结本次自测中的 DNS 候选、健康记忆与回退路径,用于在远程冒烟日志中快速 eyeball;USAGE_CN/EN与OPERATIONS_CN/EN新增了推荐命令whois-x86_64 --debug --retry-metrics --dns-cache-stats [--selftest] 8.8.8.8的 quickstart 章节。 - 运维与脚本文档补完:
tools/remote/README_*.md补充了在开启 DNS 调试与自测时,smoke_test.log中出现[DNS-CAND]/[DNS-FALLBACK]/[DNS-CACHE]/[DNS-HEALTH]/[LOOKUP_SELFTEST]的预期行为说明;RELEASE_NOTES.md、USAGE/OPERATIONS 文档中的版本标注统一到具体版本(去掉+),便于今后追踪变更。 - 版本基线更新:核心代码版本号升级为
3.2.9,README 顶部展示同步更新,本版本被视为 DNS 策略与调试可观测性的“新 golden baseline”。
English summary:
- DNS Phase 2/3 completion: the
wc_dns+ lookup stack is now treated as the canonical baseline for DNS candidate generation, negative cache, candidate ordering and layered fallbacks. Key steps are exposed via[DNS-CAND],[DNS-FALLBACK],[DNS-CACHE]and the new[DNS-HEALTH]tag, emitted only when--debugor--retry-metricsis enabled, keeping existing stdout contracts intact. - Process-level DNS cache stats:
--dns-cache-statsprints a single[DNS-CACHE-SUM] hits=<n> neg_hits=<n> misses=<n>line at process exit viaatexit, giving operators a rough view of positive/negative cache hit rates and misses without changing any resolution or fallback behavior. - DNS health memory (Phase 3):
wc_dnsnow maintains a lightweight health state perhost+family(consecutive failures and a short penalty window).[DNS-HEALTH]logs expose this state, and candidate ordering biases towards “healthier” families without ever dropping candidates, reducing repeated timeouts on clearly broken IPv4/IPv6 paths. - Selftest & DNS debug quickstart: when built with
-DWHOIS_LOOKUP_SELFTESTand run with--selftest, new[LOOKUP_SELFTEST]lines summarize DNS candidates, health memory and fallback paths for quick eyeballing in remote smoke logs.USAGE_CN/ENandOPERATIONS_CN/ENnow feature a DNS debug quickstart recommendingwhois-x86_64 --debug --retry-metrics --dns-cache-stats [--selftest] 8.8.8.8and explaining the meaning of DNS-related stderr tags. - Ops scripts & docs alignment:
tools/remote/README_*.mdcall out[DNS-CAND]/[DNS-FALLBACK]/[DNS-CACHE]/[DNS-HEALTH]/[LOOKUP_SELFTEST]as expected content insmoke_test.logwhen DNS debugging or selftests are enabled. Version annotations inRELEASE_NOTES.mdand USAGE/OPERATIONS docs are normalized to concrete versions (no trailing+), making historical tracking easier. - Version baseline: bump core version to
3.2.9and update the top-level README banner; v3.2.9 is considered the new golden baseline for DNS behavior and observability.
DNS 调试 quickstart / DNS debug quickstart
推荐用于 eyeball DNS 候选、缓存与健康记忆输出的命令:
Recommended command for eyeballing DNS candidates, cache, and health memory:
whois-x86_64 --debug --retry-metrics --dns-cache-stats --selftest 8.8.8.8要点 / Notes:
[DNS-CAND]:展示本次解析得到的候选服务器(含 IPv4/IPv6 家族、优先级等),用于确认候选生成逻辑是否符合预期。[DNS-FALLBACK]:标记发生回退的场景(如从 AI_ADDRCONFIG 失败回退到已知 RIR IPv4,或在连接失败后切换家族),帮助分析“为什么连到了这个 IP”。[DNS-CACHE]:展示命中或写入 DNS 缓存(包括负缓存)的操作,用于确认相同查询在同一进程中的加速效果。[DNS-HEALTH]:展示每个host+family的当前健康状态(如连续失败次数、是否处于 penalty 窗口),用于判断某个族是否被暂时降权。[DNS-CACHE-SUM]:在进程退出时输出的聚合统计行,仅一行;配合上方标签可帮助估算缓存带来的收益。[LOOKUP_SELFTEST]:仅在自测模式下出现,对本轮自测路径做高度概括,方便在长日志中快速定位。
下载 / Downloads
-
静态多架构 / Static multi-arch:
-
CI glibc 构建 / CI glibc build:
-
校验 / Checksums:
使用提示 / Guidance
DNS 调试与自测示例 / DNS debugging and selftest examples:
# 带 DNS 调试与缓存统计的基础查询
whois-x86_64 --debug --retry-metrics --dns-cache-stats 8.8.8.8
# 启用 lookup 自测(需以 -DWHOIS_LOOKUP_SELFTEST 编译)
whois-x86_64 --debug --retry-metrics --dns-cache-stats --selftest 8.8.8.8
# 偏向 IPv6 的 DNS 候选选择(示例)
whois-x86_64 --debug --retry-metrics --dns-cache-stats --prefer-ipv6 8.8.8.8致谢 / Acknowledgements
感谢在 DNS Phase 2/3 期间参与设计讨论、提供测试环境与日志样本的同学,本版本将 DNS 行为与调试可观测性提升到了对后续演进更友好的“黄金基线”状态。
Thanks to everyone who contributed design feedback, test environments and real-world logs during DNS Phase 2/3; this release establishes a more robust golden baseline for future DNS evolution and troubleshooting.
whois v3.2.8
whois v3.2.8
聚焦“三跳模拟 + 重试指标可视化 + 架构差异说明”与发布辅助脚本增强。
Focus on three-hop simulation, retry metrics visualization, architecture-specific errno variance, and release helper script enhancements.
中文概要:
- DNS 第一阶段(服务器解析)改进:基于
AI_ADDRCONFIG的解析;IPv4/IPv6 家族控制(仅/优先);多候选去重与上限;解析/连不通时回退到已知 RIR IPv4;统一@ <ip|unknown>显示真实连接端点。 - 稳定三跳:
apnic → iana → arin通过--selftest-force-iana-pivot实现“一次性 IANA 强制跳”,后续遵循真实 referral,保证链路可复现。 - 失败注入:中间跳(IANA)与最终跳(ARIN)可用黑洞标志分别模拟超时:
--selftest-blackhole-iana/--selftest-blackhole-arin;保持首/尾行输出契约不变。 - 重试指标:结合
--retry-metrics -t 3 -r 0,多架构 attempts≈7(前两次成功、后续超时),p95≈3s;sleep_ms=0验证节流禁用路径;为后续调优提供基线。 - 多目录同步:远程脚本
-s '<dir1>;<dir2>'支持分号分隔多目标同步,便于同时更新主仓与镜像仓。 - 冒烟超时策略:指标运行延长至 45s(SIGINT→5s→SIGKILL)避免截断
[RETRY-METRICS];普通模式仍为 8s,保持快速反馈。 - Errno 差异:连接超时在常见架构为
errno=110 (ETIMEDOUT),在 MIPS/MIPS64 交叉产物下为数值 145(同一符号常量的架构特定编号),逻辑按符号匹配不受影响。 - 黄金样例:下方多架构片段作为后续性能与回归的参考样本。
English summary:
- DNS phase‑1 (server resolution):
AI_ADDRCONFIG-aware resolution; IPv4/IPv6 family controls (only/prefer); de‑dup & cap candidates; fallback to known RIR IPv4 on resolution/connectivity failures; unify@ <ip|unknown>to reflect the actual connected endpoint. - Stable three-hop:
apnic → iana → arinchain via one-time pivot flag--selftest-force-iana-pivotensuring only the first hop is forced through IANA. - Failure injection: middle hop (
--selftest-blackhole-iana) and final hop (--selftest-blackhole-arin) deterministic timeouts preserve header/tail contract. - Retry metrics: with
--retry-metrics -t 3 -r 0we see ~7 attempts (first two succeed, remaining time out), p95 ≈ 3s,sleep_ms=0validating pacing-disabled path. - Multi-directory sync: remote script accepts semicolon-separated targets for artifact distribution to multiple local mirrors.
- Metrics-aware smoke timeout: extended to 45s for metric runs (SIGINT then SIGKILL) preventing truncated aggregates; regular runs remain 8s.
- Errno numeric variance:
ETIMEDOUTis 110 on most architectures, 145 on MIPS/MIPS64; code relies on symbolicETIMEDOUT, not numeric value. - Golden sample: multi-arch log excerpt below for future regression and performance comparisons.
多架构重试指标片段 / Multi-arch retry metrics excerpt
[RETRY-METRICS-INSTANT] attempt=1 success=1 latency_ms=185 total_attempts=1
[RETRY-METRICS-INSTANT] attempt=2 success=1 latency_ms=236 total_attempts=2
Error: Query failed for 8.8.8.8 (connect timeout, errno=110)
[RETRY-METRICS] attempts=7 successes=2 failures=5 min_ms=185 max_ms=3009 avg_ms=2206.7 p95_ms=3009 sleep_ms=0
[RETRY-ERRORS] timeouts=5 refused=0 net_unreach=0 host_unreach=0 addr_na=0 interrupted=0 other=0
---
Error: Query failed for 8.8.8.8 (connect timeout, errno=145) # MIPS/MIPS64 variant of ETIMEDOUT
[RETRY-METRICS] attempts=7 successes=2 failures=5 min_ms=210 max_ms=3006 avg_ms=2231.7 p95_ms=3006 sleep_ms=0
[RETRY-ERRORS] timeouts=5 refused=0 net_unreach=0 host_unreach=0 addr_na=0 interrupted=0 other=0
关键观察 / Key observations:
- 前两次成功尝试对应“起始服务器 + IANA 枢纽跳”;后续针对 ARIN 的尝试在黑洞场景下超时。
- 失败分类一致:仅
timeouts递增,其它类别保持 0。 - errno 数值差异不影响逻辑分类,代码按符号常量匹配。
- First two successful attempts correspond to initial server and IANA pivot; subsequent attempts target ARIN and time out (blackhole scenario).
- Consistent failure classification: only
timeoutsincrement; other categories remain zero. - Numeric errno difference does not alter classification logic; mapping uses the symbolic constant.
变更 / Changes
CN:
- 新增三跳与黑洞注入自测标志;保持输出契约与既有脚本兼容。
- 文档(README / RELEASE_NOTES / OPERATIONS_CN/EN)补充三跳用法、指标释义与 errno 差异说明。
- 远程脚本多目录同步与指标超时策略记录更新。
EN:
- Added selftest flags enabling stable three-hop and deterministic hop timeouts.
- Updated docs (README / RELEASE_NOTES / OPERATIONS_CN/EN) with usage, metric interpretation, errno mapping.
- Remote script notes updated for multi-sync and metrics-aware timeout policy.
下载 / Downloads
-
静态多架构 / Static multi-arch (GitHub Release v3.2.8):
-
CI glibc 构建 / CI glibc build:
-
校验 / Checksums:
使用提示 / Guidance
三跳模拟(最终跳失败示例):
Three-hop simulation (final-hop failure example):
--host apnic --selftest-force-iana-pivot --selftest-blackhole-arin --retry-metrics -t 3 -r 0 --ipv4-only
中间跳失败示例:
Middle-hop failure example:
--host apnic --selftest-force-iana-pivot --selftest-blackhole-iana --retry-metrics -t 3 -r 0 --ipv4-only
多目录同步示例:
Multi-directory sync example:
-s '/d/LZProjects/lzispro/release/lzispro/whois;/d/LZProjects/whois/release/lzispro/whois'
Errno 映射速查 / Errno mapping quick reference
| Symbol | Common arches | MIPS/MIPS64 |
|---|---|---|
| ETIMEDOUT | 110 | 145 |
| ECONNREFUSED | 111 | (arch value) |
| EHOSTUNREACH | 113 | (arch value) |
仅在冒烟中观察到 ETIMEDOUT 的数值差异;逻辑按“符号常量”匹配,而非具体数值。
Only ETIMEDOUT numeric divergence was observed during smoke; logic uses the symbol not the number.
致谢 / Acknowledgements
感谢多架构 QEMU 验证为重试指标提供一致的基线,并帮助发现不同架构下 errno 数值差异。
Thanks to multi-arch QEMU validation providing consistent retry metric baselines and revealing numeric errno variance across architectures.
whois v3.2.7
whois v3.2.7
本次发布聚焦“CLI-only 配置与发布流程稳定性”:
- 重试节流默认开启,迁移为纯命令行参数配置(移除全部运行时环境变量依赖)。
- 统一自测/调试入口为 CLI(fail-first/inject-empty/grep/seclog)。
- 远程构建脚本提示 CLI-only 配置;保留多架构静态产物与哈希校验;新增 SSH 调试开关。
- 冒烟断言覆盖“默认节流为非零 sleep_ms / 禁用后为零”,均通过。
更多细节见 RELEASE_NOTES.md#327 与 docs/USAGE_CN.md/docs/USAGE_EN.md 的相关章节。
English summary (focus: CLI-only configuration & release stability):
- Retry pacing now fully CLI-configured (removed all runtime env dependencies); defaults ON.
- Unified selftest/debug entry via CLI flags (
--selftest-fail-first-attempt,--selftest-inject-empty,--selftest-grep,--selftest-seclog). - Remote build script prints a "CLI-only" hint; still produces multi-arch static artifacts with hash verification; adds SSH debug via
WHOIS_DEBUG_SSH=1(ssh -vvv). - Smoke assertions cover enabled vs disabled pacing (
-M nonzero/-M zero) and pass on all arches.
See RELEASE_NOTES.md#327 and docs/USAGE_EN.md for details.
变更 / Changes
- Pacing(连接级重试节奏):
- 新增/保留参数:
--pacing-interval-ms、--pacing-jitter-ms、--pacing-backoff-factor、--pacing-max-ms、--pacing-disable、--retry-metrics。 - 默认行为:开启节流;
--retry-metrics仅在需要时输出到 stderr。
- 新增/保留参数:
- 环境变量剥离:源码移除
getenv/setenv/putenv;--selftest-*由 CLI 控制,失败仅记录诊断,不改变退出码。 - 文档与脚本:USAGE(中/英)改为 CLI-only 指南;远程构建脚本不再转发 WHOIS_*,可用
WHOIS_DEBUG_SSH=1打开ssh -vvv调试。 - CI 策略:与远程 SSH 相关的工作流改为“手动触发(workflow_dispatch)”,推荐本地脚本或自托管 Runner。
English Changes:
- Pacing (connect-level retry): new/kept flags
--pacing-interval-ms,--pacing-jitter-ms,--pacing-backoff-factor,--pacing-max-ms,--pacing-disable,--retry-metrics; pacing is ON by default; metrics only emitted to stderr when requested. - Env removal: all
getenv/setenv/putenvdeleted; selftest flags become non-fatal CLI options (diagnostics only). - Docs & scripts: CN/EN usage condensed; remote script stops forwarding WHOIS_*;
WHOIS_DEBUG_SSH=1enables verbose SSH logging. - CI strategy: remote SSH workflows switched to manual dispatch (workflow_dispatch); prefer local script or self-hosted runner.
下载 / Downloads
-
静态多架构 / Static multi-arch(GitHub 直链):
-
CI glibc 构建 / CI glibc build:
-
校验 / Checksums:
说明:
- 为压低噪音,上述链接仅挂在资产名称上;页面不展开原始 URL。
- 以上为 GitHub Release 直链;若网络不佳,可随后补充国内镜像链接。
Notes:- Links are minimal (anchor on asset name only) to reduce visual noise.
- All links are direct GitHub Release URLs; mirror links can be added later if regional access is poor.
whois v3.2.6
whois v3.2.6
本次发布聚焦稳定性与发布体验优化:
- 工作流手动触发的 tag 输入支持自动裁剪与规范化(
3.2.6/V3.2.6→v3.2.6)。 - 远程构建脚本
-s支持多路径与 Windows 路径自动规范化,VS Code 任务默认双路径同步。 - 发布正文采用“隐式下载链接”风格,减少视觉噪音。
变更 / Changes
- 重定向模块化与一致性:抽离 WHOIS 重定向检测/解析为独立模块(wc_redirect),统一大小写不敏感的重定向信号,移除 APNIC 特例;加入最小化目标校验,避免本地/私网目标。
- IANA 优先策略:跨 RIR 跳转时若尚未访问 IANA,会先经过 IANA 一跳,稳定最终权威 RIR 判定与尾行显示。
- 输出契约对齐:
- 标题行:
via <别名或域名> @ <连接 IP|unknown>(别名会映射到 RIR 主机再解析 IP;@段始终为真实连接 IP 或unknown)。 - 尾行:
=== Authoritative RIR: <RIR域名> @ <其IP|unknown> ===;若权威为 IP 字面量,则回映射到对应 RIR 域名后输出。
- 标题行:
- 自测增强:新增重定向自测(needs_redirect / is_authoritative_response / extract_refer_server),与折叠自测一并执行;可选启用 GREP 与 SECLOG 自测(编译宏
-DWHOIS_GREP_TEST -DWHOIS_SECLOG_TEST+ 运行时环境变量)。
更多细节见仓库内 RELEASE_NOTES.md#326 与 docs/USAGE_CN.md/docs/USAGE_EN.md 的 --selftest 章节。
下载 / Downloads
-
静态多架构 / Static multi-arch:
-
CI glibc 构建 / CI glibc build:
-
校验 / Checksums:
说明:
- 为压低噪音,上述链接只挂在具体资产名称上;页面不会展示一长串原始 URL。
- 以上链接为 GitHub Release 直链,Gitee Release 页面也可直接点击;若网络不佳,可稍后追加国内镜像链接。
v3.2.5
whois v3.2.5
中文摘要 / Chinese summary
- 去除双语:移除
--lang选项与WHOIS_LANG环境变量,统一英文帮助与关于/示例输出,避免在受限 SSH / 串口终端出现乱码。 - 帮助与文档精简:usage 段落去重并补齐
--debug-verbose,--selftest,--fold-unique说明;远程示例脚本不再传语言参数。 - 行为兼容:查询、重定向、条件输出(title → grep → fold)和黄金契约未改动;仅文本展示层调整。
- 发布准备:版本号提升到 3.2.5;新增发布说明与 release body;继续保持多架构全静态产物。
English summary
- De-internationalization: removed
--langoption andWHOIS_LANGenv; English-only help/about/examples to avoid mojibake on constrained SSH/serial terminals. - Help/document simplification: deduplicated usage sections; documented
--debug-verbose,--selftest,--fold-unique; remote helper examples no longer pass language switches. - Behavior unchanged: query workflow, referral following, conditional output engine (title → grep → fold) and golden output contract remain intact.
- Release prep: bumped to 3.2.5; added release notes & body; multi-arch static artifacts preserved.
Highlights / 亮点
- English-only help; simplified docs; preserved stable pipelines; ready multi-arch static binaries.
下载 / Downloads
-
静态多架构 / Static multi-arch(GitHub 直链):
-
CI glibc 构建 / CI glibc build:
-
校验 / Checksums:
说明:
- “隐式直链”风格:只在资产名称上挂可点击的直链,减少正文噪音。
- 以上为 GitHub Release 直链,Gitee Release 页面同步后亦可直接点击;若网络不佳,可后续转换为仓库相对路径(使用 relativize 脚本)。
Contracts unchanged / 对外契约不变
- Header/tail lines per query, folded output format
<query> <UPPER_VALUE_...> <RIR>, CLI option set (minus removed--lang).
Verification / 验证
- Remote multi-arch build + smoke + golden PASS (local script run before tagging). CI build-and-artifact workflow will replicate and attach assets.
Links
- Release notes / 发布说明:
RELEASE_NOTES.md#325 - Usage docs: CN
docs/USAGE_CN.md| ENdocs/USAGE_EN.md
Post-publish / 后续
- 若 CI 初始失败(例如权限或工作流脚本变更),可重新触发 build-and-artifact workflow;人工校验 artifact SHA256 与本地 out/artifacts 生成的列表保持一致。
whois v3.2.4
whois v3.2.4
中文摘要 / Chinese summary
- 稳定里程碑:在继续拆分(opts/net/cache)前冻结正确性与诊断,给下游一个安全基线。
- 模块化第一步:将条件输出拆分为
wc_title、wc_grep、wc_fold、wc_output、wc_seclog,并新增src/core/pipeline.c以便后续编排,行为保持不变。 - GREP 自测钩子:编译开启
-DWHOIS_GREP_TEST,运行时设置WHOIS_GREP_TEST=1,自动校验 block/line/line+cont 三种模式,失败时打印诊断,成功输出[GREPTEST] ... PASS。 - 块模式续行启发式改进:仅全局保留第一个“类似标题的缩进行”(如地址),后续同类缩进行若未匹配正则将被过滤,避免带入无关字段。
- 远程构建日志增强:打印 LDFLAGS/LDFLAGS_EXTRA、UPX 可用性与压缩信息、QEMU 或原生冒烟运行器。
- 文档更新(中/英):补充 grep 自测章节;解释
wc前缀(whois client modules);清理非英文残留注释。
English summary
- Stability milestone: freeze correctness and diagnostics before further modular splits (opts/net/cache), serving as a safe baseline.
- Modularization step 1: extract conditional output into
wc_title,wc_grep,wc_fold,wc_output,wc_seclog; addsrc/core/pipeline.cfor future orchestration while preserving behavior. - GREP self-test hook: build with
-DWHOIS_GREP_TESTand run withWHOIS_GREP_TEST=1to validate block/line/line+cont; emits[GREPTEST] ... PASSon success with diagnostics on failure. - Block-mode continuation heuristic: keep only the first header-like indented line globally; subsequent header-like indented lines must match the regex, preventing unrelated fields from leaking in.
- Remote build diagnostics: print LDFLAGS/LDFLAGS_EXTRA, UPX availability & compression results, and the QEMU vs native smoke runner.
- Docs updated (CN/EN): add grep self-test section; clarify the
wcprefix; remove leftover non-English comments.
Highlights / 亮点
- Stability milestone; modularization step 1; grep self-test; smarter continuation handling; enhanced diagnostics; docs updated.
Artifacts / 产物
- whois-x86_64-gnu(CI 动态编译)
- SHA256SUMS.txt(针对 whois-x86_64-gnu 或静态集)
- 七个全静态多架构二进制(musl/loongarch64 见注):x86_64, x86, aarch64, armv7, mipsel, mips64el, loongarch64
下载 / Downloads
-
GitHub Release page / 页面:
-
Gitee Release page / 页面:
-
Direct binaries / 直接下载:
- x86_64 (CI, glibc): https://github.com/larsonzh/whois/releases/download/v3.2.4/whois-x86_64-gnu
- x86_64 (static): https://github.com/larsonzh/whois/releases/download/v3.2.4/whois-x86_64
- x86 (static): https://github.com/larsonzh/whois/releases/download/v3.2.4/whois-x86
- aarch64 (static): https://github.com/larsonzh/whois/releases/download/v3.2.4/whois-aarch64
- armv7 (static): https://github.com/larsonzh/whois/releases/download/v3.2.4/whois-armv7
- loongarch64 (static): https://github.com/larsonzh/whois/releases/download/v3.2.4/whois-loongarch64
- mips64el (static): https://github.com/larsonzh/whois/releases/download/v3.2.4/whois-mips64el
- mipsel (static): https://github.com/larsonzh/whois/releases/download/v3.2.4/whois-mipsel
-
Checksums / 校验文件:
Contracts unchanged / 对外契约不变
- 产物命名(
whois-*)、命令行参数、输出头/尾契约与折叠单行格式均保持不变。
Verification / 验证
- 远程多架构静态构建通过;GREPTEST:block / line / line+cont 全部 PASS。
Links
- Release notes / 发布说明:
RELEASE_NOTES.md#324 - Usage docs: CN
docs/USAGE_CN.md| ENdocs/USAGE_EN.md - GitHub Release(发布将创建对应 tag):https://github.com/larsonzh/whois/releases/tag/v3.2.4
- Gitee Releases(发布后镜像):https://gitee.com/larsonzh/whois/releases/tag/v3.2.4
whois v3.2.3
whois v3.2.3
中文摘要 / Chinese summary
- 输出契约细化:标题与尾行显示服务器 IP(解析失败为
unknown),并对别名先映射再解析,避免 "via apnic @ unknown" 假阴性。 - 折叠输出(
--fold)保持既有单行格式<query> <UPPER_VALUE_...> <RIR>,不包含服务器 IP,确保下游管道稳定。 - 新增 ARIN IPv6 连通性提示:私网 IPv4 源可能被拒(43 端口),建议启用 IPv6 或走公网出口。
English summary
- Output contract refinement: header/tail show server IPs (DNS failure ->
unknown); aliases mapped before resolution to avoid false unknown cases. - Folded output (
--fold) remains unchanged:<query> <UPPER_VALUE_...> <RIR>(no server IPs) for pipeline stability. - Added ARIN IPv6 connectivity tip: private IPv4 LAN sources may be rejected on port 43; enable IPv6 or use public egress.
Artifacts / 产物
- whois-x86_64-gnu(CI 动态编译)
- SHA256SUMS.txt(针对 whois-x86_64-gnu)
- 七个全静态多架构二进制(musl/loongarch64 见注):x86_64, x86, aarch64, armv7, mipsel, mips64el, loongarch64
下载 / Downloads
-
GitHub Release page / 页面:
-
Gitee Release page / 页面:
-
Direct binaries / 直接下载:
- x86_64 (CI, glibc): https://github.com/larsonzh/whois/releases/download/v3.2.3/whois-x86_64-gnu
- x86_64 (static): https://github.com/larsonzh/whois/releases/download/v3.2.3/whois-x86_64
- x86 (static): https://github.com/larsonzh/whois/releases/download/v3.2.3/whois-x86
- aarch64 (static): https://github.com/larsonzh/whois/releases/download/v3.2.3/whois-aarch64
- armv7 (static): https://github.com/larsonzh/whois/releases/download/v3.2.3/whois-armv7
- loongarch64 (static): https://github.com/larsonzh/whois/releases/download/v3.2.3/whois-loongarch64
- mips64el (static): https://github.com/larsonzh/whois/releases/download/v3.2.3/whois-mips64el
- mipsel (static): https://github.com/larsonzh/whois/releases/download/v3.2.3/whois-mipsel
-
Checksums / 校验文件:
Notes
- 折叠模式输出契约未变;如需从折叠行中获取服务器信息,请结合非折叠模式或在上游/下游记录 header/tail。
whois v3.2.2
A tiny, portable whois client purpose-built for BusyBox pipelines.
本版本聚焦“安全加固 + 可观测性”,同时保持经典 WHOIS 纯文本工作流。
Highlights
- Add optional security diagnostics:
--security-log(stderr, off by default), with built-in rate limiting (~20 events/sec) and suppression summaries. - Security hardening across nine areas:
- Memory safety helpers (safe malloc/realloc/strdup)
- Signal handling & cleanup (SIGINT/TERM/HUP/PIPE)
- Input/query validation (length/charset/suspicious payloads)
- Redirect/network security (target validation, loop guards, injection/anomaly detection)
- Response sanitization/validation (strip control/ANSI sequences; structural checks)
- Config validation (illegal/out-of-range detection)
- Thread safety & cache integrity (locks/invalidation)
- Connection flood/rate monitoring
- Protocol-level anomaly detection & logging
亮点
- 新增可选安全日志:
--security-log(默认关闭,输出到 stderr),内置限频(约 20 条/秒)与抑制汇总,避免异常场景刷屏;不改变 stdout 的“标题/尾行”契约。 - 九大安全方向:
- 内存安全辅助(safe malloc/realloc/strdup 封装)
- 信号处理与清理(SIGINT/TERM/HUP/PIPE)
- 输入/查询校验(长度/字符集/可疑负载)
- 重定向/网络安全(目标校验、环路防护、注入/异常识别)
- 响应净化与校验(移除控制/ANSI 序列、结构一致性检查)
- 配置校验(非法/越界检测)
- 线程安全与缓存一致性(加锁与失效策略)
- 连接洪泛/速率监测
- 协议级异常检测与日志
Compatibility / 兼容性
- Remove all experimental RDAP features/switches. Keep classic WHOIS-only behavior to avoid semantic drift and maintenance overhead.
- 移除所有 RDAP 实验功能与开关,保持经典 WHOIS 纯文本语义与工作流,避免语义分叉与维护成本。
Other changes / 其他改进
- Fix/clean compile warnings (e.g., -Wsign-compare); convert some counters to
size_t; supportCFLAGS_EXTRAfor custom builds. Docs updated with security-log usage and troubleshooting (ARIN:43 connectivity). - 修复/清理编译警告(如 -Wsign-compare),部分计数改为
size_t,支持CFLAGS_EXTRA;文档补充安全日志使用与故障排查(含 ARIN:43 连通性提示)。
Quickstart / 快速上手
# Linux SSH
whois-x86_64 8.8.8.8
whois-x86_64 --host apnic -Q 103.89.208.0
printf "8.8.8.8\n1.1.1.1\n" | whois-x86_64 -B -g 'netname|e-mail' --grep 'GOOGLE|CLOUDFLARE' --grep-line --fold# Windows PowerShell
whois-x86_64.exe 8.8.8.8
whois-x86_64.exe --host apnic -Q 103.89.208.0
"8.8.8.8`n1.1.1.1" | .\whois-x86_64.exe -B -g 'netname|e-mail' --grep 'GOOGLE|CLOUDFLARE' --grep-line --foldDocs & Links / 文档与链接
- Usage (CN) / 使用说明(中文):https://github.com/larsonzh/whois/blob/v3.2.2/docs/USAGE_CN.md
- Usage (EN) / 使用说明(英文):https://github.com/larsonzh/whois/blob/v3.2.2/docs/USAGE_EN.md
- Fold before/after / 折叠前后示意图:
- Pipeline diagram / 处理流程图:
Artifacts / 产物
- GitHub Release attaches
whois-x86_64-gnu(CI build), checksum, and seven fully static multi-arch binaries via remote toolchains (aarch64/armv7/x86_64/x86/mipsel/mips64el/loongarch64). - Release 会附带
whois-x86_64-gnu(CI 构建)、校验文件,以及 7 个“全静态”多架构二进制(aarch64/armv7/x86_64/x86/mipsel/mips64el/loongarch64)。
Downloads / 下载
-
GitHub Release page / 页面:
-
Gitee Release page / 页面:
-
Direct binaries / 直接下载:
- x86_64 (CI, glibc): https://github.com/larsonzh/whois/releases/download/v3.2.2/whois-x86_64-gnu
- x86_64 (static): https://github.com/larsonzh/whois/releases/download/v3.2.2/whois-x86_64
- x86 (static): https://github.com/larsonzh/whois/releases/download/v3.2.2/whois-x86
- aarch64 (static): https://github.com/larsonzh/whois/releases/download/v3.2.2/whois-aarch64
- armv7 (static): https://github.com/larsonzh/whois/releases/download/v3.2.2/whois-armv7
- loongarch64 (static): https://github.com/larsonzh/whois/releases/download/v3.2.2/whois-loongarch64
- mips64el (static): https://github.com/larsonzh/whois/releases/download/v3.2.2/whois-mips64el
- mipsel (static): https://github.com/larsonzh/whois/releases/download/v3.2.2/whois-mipsel
-
Checksums / 校验文件:
v3.2.1
whois Release Notes / 发布说明
3.2.1
中文摘要
-
新增“折叠输出”开关
--fold:将经-g/--grep*筛选后的正文折叠为单行,格式为<query> <UPPER_VALUE_...> <RIR>,便于在 BusyBox 管道中直接聚合与判定;默认关闭。- 新增
--fold-sep <SEP>指定分隔符(默认空格,支持\t/\n/\r/\s);新增--no-fold-upper保留原大小写(默认转为大写)。
- 新增
-
文档:新增“续行关键词命中技巧”一节,给出推荐策略 A(
-g+ 块模式--grep+--fold)与可选策略 B(行模式 OR +--keep-continuation-lines+--fold),并说明行模式按“逐行”匹配(\n不跨行)。- 参考:
docs/USAGE_CN.md#续行关键词命中技巧推荐策略与陷阱|docs/USAGE_EN.md#continuation-line-keyword-capture-tips-recommended
- 参考:
English summary
-
Add optional folded output via
--fold: print a single folded line per query using the current selection (after-gand--grep*), formatted as<query> <UPPER_VALUE_...> <RIR>; disabled by default.- Add
--fold-sep <SEP>to customize the separator (default space; supports\t/\n/\r/\s) and--no-fold-upperto preserve original case (default uppercases).
- Add
-
Docs: add "Continuation-line keyword capture tips" with recommended Strategy A (
-g+ block--grep+--fold) and optional Strategy B (line-mode OR +--keep-continuation-lines+--fold); clarify that line mode matches per-line (\ndoes not span lines).- See:
docs/USAGE_EN.md#continuation-line-keyword-capture-tips-recommended|docs/USAGE_CN.md#续行关键词命中技巧推荐策略与陷阱
- See:
3.2.0
中文摘要
- 新增基于正则的“行模式”过滤(
--grep-line)与“块模式/行模式”切换(--grep-block/--grep-line),保持与-g/--title的投影语义兼容:先按标题前缀投影,再进行正则过滤。 - 行模式支持“续行展开”开关(
--keep-continuation-lines和--no-keep-continuation-lines),用于在命中行时输出整个字段块(标题+续行)。 - 修复行模式在部分系统上可能跨行匹配的问题:现在对“当前行”做独立的正则匹配,兼容 musl;无需
REG_STARTEND扩展。 - 连接缓存健壮性增强:使用
getsockopt(SO_ERROR)校验连接可用性并在异常时清理缓存,替代脆弱的基于select的探测。 - 文档与集成:
- USAGE(中/英)补充新选项与示例;跨链接至 lzispro,记录环境变量与集成方式。
- lzispro 的
lzispdata.sh默认切换为“行模式 + 不展开续行”,并提供环境变量回退到块模式或打开展开。
English summary
- Add regex-based line filtering mode (
--grep-line) and explicit selection mode toggles (--grep-block/--grep-line); preserve-g/--titlesemantics by applying title projection first, then regex. - Line mode supports an optional block expansion switch (
--keep-continuation-lines/--no-keep-continuation-lines) to emit the whole field block when any line matches. - Fix potential cross-line matching in line mode by matching against an isolated copy of the current line (portable on musl); no
REG_STARTENDdependency. - Improve cached-connection aliveness check using
getsockopt(SO_ERROR)and clean up invalid sockets, replacing the earlier select-based probe. - Docs and integration:
- Update USAGE (CN/EN) with new options and examples; cross-link to lzispro with env var guidance.
- lzispro
lzispdata.shdefaults to line mode without block expansion; env switches allow reverting to block mode or enabling expansion.
Artifacts / 产物:与上一版一致(动态 x86_64 与七个全静态多架构二进制),详见下文 Artifacts 一节。
中文摘要
- 轻量高性能 C 语言 whois 客户端,专为 BusyBox 管道优化:
- 批量标准输入(-B),无位置参数且 stdin 非 TTY 自动进入
- 稳定输出契约:每条首行“=== Query: … ===”,末行“=== Authoritative RIR: … ===”
- 非阻塞连接、I/O 超时、轻量重试(默认 2)、自动重定向(默认 5,支持禁用与上限)
- 多架构静态二进制(aarch64/armv7/x86_64/x86/mipsel/mips64el/loongarch64)
- 新增/重要说明:
- 文档全面更新(中英双语),补充 IPv4/IPv6 字面量作为 --host 的用法与示例
- 远端交叉编译与冒烟测试脚本:默认“联网冒烟”,支持 SMOKE_QUERIES 自定义目标
- 冒烟前增加 43/TCP 连通性预检(仅日志),失败将如实反映在 smoke_test.log 中
English summary
- Lightweight, high-performance whois client in C, optimized for BusyBox pipelines:
- Batch stdin (-B), implicitly enabled when no positional arg and stdin is not a TTY
- Stable output contract: per-query header and authoritative RIR tail line
- Non-blocking connect, IO timeouts, light retries (default 2), referral redirects (default 5, configurable/disable)
- Multi-arch static binaries (aarch64/armv7/x86_64/x86/mipsel/mips64el/loongarch64)
- New/important notes:
- Docs revamped (CN/EN), add guidance for using IPv4/IPv6 literals with --host
- Remote cross-compilation + smoke test scripts: default to networked smoke; support SMOKE_QUERIES
- Add a log-only port-43 connectivity pre-check; real failures are reflected in smoke_test.log
Artifacts / 产物
- whois-x86_64-gnu(CI 构建的 Linux x86_64 glibc 动态可执行)
- SHA256SUMS.txt(针对 whois-x86_64-gnu)
Additionally, remote toolchains produce seven fully static binaries (musl unless noted):
此外,远端交叉工具链会产出 7 个“全静态”二进制(除 loongarch64 特例外,一般为 musl 静态):
- whois-x86_64-gnu - Linux x86_64,glibc 动态链接;体积小,适合常见桌面/服务器。
- whois-x86_64 — Linux x86_64,静态(musl);与 whois-x86_64-gnu 的区别:无需依赖 glibc
- whois-x86 — Linux 32 位 x86 (i686),静态
- whois-aarch64 — Linux aarch64/ARM64,静态;适合大多数发行版/容器
- whois-armv7 — Linux 32 位 ARMv7,静态
- whois-mipsel — Linux MIPS little-endian,静态
- whois-mips64el — Linux MIPS64 little-endian,静态
- whois-loongarch64 — Linux LoongArch64,静态(使用 GNU 工具链,已链接 libgcc/libstdc++)
Usage guidance / 使用提示:
- Prefer the static binary for maximum portability on minimal systems.
- Use whois-x86_64-gnu if you are on a standard x86_64 Linux with glibc and prefer smaller size.
- 在极简系统/容器中优先选择“静态”二进制;标准 x86_64 桌面/服务器可直接用 whois-x86_64-gnu。
Usage highlights / 使用要点
- 禁止重定向:
--host <rir> -Q可固定服务器稳定输出 - 重试节奏默认:interval=300ms, jitter=300ms,可用
-i/-J调整 - 私网 IP 输出正文为 " is a private IP address",尾行为
=== Authoritative RIR: unknown ===
更多细节请参考:
- 中文: docs/USAGE_CN.md
- English: docs/USAGE_EN.md
Full Changelog: v3.2.0...v3.2.1
v3.2.0
whois Release Notes / 发布说明
3.2.0
中文摘要
- 新增基于正则的“行模式”过滤(
--grep-line)与“块模式/行模式”切换(--grep-block/--grep-line),保持与-g/--title的投影语义兼容:先按标题前缀投影,再进行正则过滤。 - 行模式支持“续行展开”开关(
--keep-continuation-lines和--no-keep-continuation-lines),用于在命中行时输出整个字段块(标题+续行)。 - 修复行模式在部分系统上可能跨行匹配的问题:现在对“当前行”做独立的正则匹配,兼容 musl;无需
REG_STARTEND扩展。 - 连接缓存健壮性增强:使用
getsockopt(SO_ERROR)校验连接可用性并在异常时清理缓存,替代脆弱的基于select的探测。 - 文档与集成:
- USAGE(中/英)补充新选项与示例;跨链接至 lzispro,记录环境变量与集成方式。
- lzispro 的
lzispdata.sh默认切换为“行模式 + 不展开续行”,并提供环境变量回退到块模式或打开展开。
English summary
- Add regex-based line filtering mode (
--grep-line) and explicit selection mode toggles (--grep-block/--grep-line); preserve-g/--titlesemantics by applying title projection first, then regex. - Line mode supports an optional block expansion switch (
--keep-continuation-lines/--no-keep-continuation-lines) to emit the whole field block when any line matches. - Fix potential cross-line matching in line mode by matching against an isolated copy of the current line (portable on musl); no
REG_STARTENDdependency. - Improve cached-connection aliveness check using
getsockopt(SO_ERROR)and clean up invalid sockets, replacing the earlier select-based probe. - Docs and integration:
- Update USAGE (CN/EN) with new options and examples; cross-link to lzispro with env var guidance.
- lzispro
lzispdata.shdefaults to line mode without block expansion; env switches allow reverting to block mode or enabling expansion.
Artifacts / 产物:与上一版一致(动态 x86_64 与七个全静态多架构二进制),详见下文 Artifacts 一节。
中文摘要
- 轻量高性能 C 语言 whois 客户端,专为 BusyBox 管道优化:
- 批量标准输入(-B),无位置参数且 stdin 非 TTY 自动进入
- 稳定输出契约:每条首行“=== Query: … ===”,末行“=== Authoritative RIR: … ===”
- 非阻塞连接、I/O 超时、轻量重试(默认 2)、自动重定向(默认 5,支持禁用与上限)
- 多架构静态二进制(aarch64/armv7/x86_64/x86/mipsel/mips64el/loongarch64)
- 新增/重要说明:
- 文档全面更新(中英双语),补充 IPv4/IPv6 字面量作为 --host 的用法与示例
- 远端交叉编译与冒烟测试脚本:默认“联网冒烟”,支持 SMOKE_QUERIES 自定义目标
- 冒烟前增加 43/TCP 连通性预检(仅日志),失败将如实反映在 smoke_test.log 中
English summary
- Lightweight, high-performance whois client in C, optimized for BusyBox pipelines:
- Batch stdin (-B), implicitly enabled when no positional arg and stdin is not a TTY
- Stable output contract: per-query header and authoritative RIR tail line
- Non-blocking connect, IO timeouts, light retries (default 2), referral redirects (default 5, configurable/disable)
- Multi-arch static binaries (aarch64/armv7/x86_64/x86/mipsel/mips64el/loongarch64)
- New/important notes:
- Docs revamped (CN/EN), add guidance for using IPv4/IPv6 literals with --host
- Remote cross-compilation + smoke test scripts: default to networked smoke; support SMOKE_QUERIES
- Add a log-only port-43 connectivity pre-check; real failures are reflected in smoke_test.log
Artifacts / 产物
- whois-x86_64-gnu(CI 构建的 Linux x86_64 glibc 动态可执行)
- SHA256SUMS.txt(针对 whois-x86_64-gnu)
Additionally, remote toolchains produce seven fully static binaries (musl unless noted):
此外,远端交叉工具链会产出 7 个“全静态”二进制(除 loongarch64 特例外,一般为 musl 静态):
- whois-x86_64-gnu - Linux x86_64,glibc 动态链接;体积小,适合常见桌面/服务器。
- whois-x86_64 — Linux x86_64,静态(musl);与 whois-x86_64-gnu 的区别:无需依赖 glibc
- whois-x86 — Linux 32 位 x86 (i686),静态
- whois-aarch64 — Linux aarch64/ARM64,静态;适合大多数发行版/容器
- whois-armv7 — Linux 32 位 ARMv7,静态
- whois-mipsel — Linux MIPS little-endian,静态
- whois-mips64el — Linux MIPS64 little-endian,静态
- whois-loongarch64 — Linux LoongArch64,静态(使用 GNU 工具链,已链接 libgcc/libstdc++)
Usage guidance / 使用提示:
- Prefer the static binary for maximum portability on minimal systems.
- Use whois-x86_64-gnu if you are on a standard x86_64 Linux with glibc and prefer smaller size.
- 在极简系统/容器中优先选择“静态”二进制;标准 x86_64 桌面/服务器可直接用 whois-x86_64-gnu。
Usage highlights / 使用要点
- 禁止重定向:
--host <rir> -Q可固定服务器稳定输出 - 重试节奏默认:interval=300ms, jitter=300ms,可用
-i/-J调整 - 私网 IP 输出正文为 " is a private IP address",尾行为
=== Authoritative RIR: unknown ===
更多细节请参考:
- 中文: docs/USAGE_CN.md
- English: docs/USAGE_EN.md