@ai-ecoverse/wasi-dig

中文文档
0.1.0-4发布于 2026/10/17Apache-2.0零依赖构建来源已验证近 30 天下载 3124

dig for slicc WASI: DNS over HTTPS through the realm proxy and DNS over TCP, with dig-style output

原始使用文档

@ai-ecoverse/wasi-dig

dig for slicc's kernel: DNS lookups with dig's output, as a WASI command (wasm32-wasip1). Source and recipe: homescoop/packages/wasi-dig.

slicc's kernel has no UDP, so queries go another way:

servertransport
noneDNS over HTTPS (RFC 8484) to $DIG_DOH_URL, else https://cloudflare-dns.com/dns-query, through the realm proxy
@https://host/path, +https=URLDNS over HTTPS to that endpoint
@host (-p port)DNS over TCP to host:53, e.g. a tailnet resolver (@100.100.100.100) through the uplink
dig example.com
dig +short mx example.com
dig -x 1.1.1.1 +short
dig +noall +answer txt example.com
dig @https://1.1.1.1/dns-query example.com AAAA
dig +short dnskey cloudflare.com
dig https cloudflare.com
dig @100.100.100.100 my-host.tailnet.ts.net

In a browser, the realm proxy can reach only DoH endpoints that allow cross-origin requests. cloudflare-dns.com and 1.1.1.1 do; dns.google doesn't, and dig reports HTTP 502 with a hint. A 502 from cloudflare-dns.com or 1.1.1.1 means the network or the proxy failed, and dig says so.

Types: every mnemonic BIND knows, and TYPEnnn. Records print as BIND's dig prints them: its columns, DNSSEC records (DNSKEY, DS, RRSIG, NSEC, NSEC3, NSEC3PARAM) in RFC 4034 presentation format, HTTPS/SVCB with BIND's SvcParams and unknown types as RFC 3597's \# <length> <hex>. Options: +short, +[no]all, +[no]cmd, +[no]comments, +[no]question, +[no]answer, +[no]authority, +[no]additional, +[no]stats, +[no]recurse, +[no]edns, +[no]dnssec, +[no]adflag (on by default, as in dig), +[no]cdflag, +[no]crypto, +time=N, +tries=N, +tcp. +notcp is refused (no UDP).

Exit status: 0 with an answer (NXDOMAIN included), 1 for a usage error, 9 when no server answers.

Not dig: no UDP, no -f batch files, no +trace, no TSIG, no zone transfers. Licences of the linked crates, Rust's standard library and wasi-libc are in THIRD-PARTY-NOTICES.md.

版本与发布记录

@ai-ecoverse/wasi-dig 共发布 5 个版本,首次发布于 2026/10/10;过去 12 个月发布了 5 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.0-4latest2026/10/1721 天前
0.1.0-32026/10/1622 天前
0.1.0-22026/10/1523 天前
0.1.0-12026/10/1028 天前
0.0.0-stage2026/10/1028 天前

关于 @ai-ecoverse/wasi-dig 的常见问题

@ai-ecoverse/wasi-dig 是什么?

dig for slicc WASI: DNS over HTTPS through the realm proxy and DNS over TCP, with dig-style output

如何安装 @ai-ecoverse/wasi-dig?

在项目目录运行 npm install @ai-ecoverse/wasi-dig,或使用 pnpm add / yarn add / bun add。

@ai-ecoverse/wasi-dig 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/ai-ecoverse__wasi-dig 是否存在。

@ai-ecoverse/wasi-dig 可以商用吗?

@ai-ecoverse/wasi-dig 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@ai-ecoverse/wasi-dig 的下载量有多少?

根据 npm 官方下载统计,@ai-ecoverse/wasi-dig 在 2026/10/05 – 2026/11/03 这 30 天内被下载 3,124 次,日均约 104 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ai-ecoverse/wasi-dig 还在维护吗?

最新版本 0.1.0-4 发布于 2026/10/17(21 天前);至今共发布 5 个版本,其中过去 12 个月发布了 5 个;首次发布于 2026/10/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。