一个小巧的命令行 DNS 客户端,支持 UDP、TCP、DoT、DoH、DoQ 和 ODoH。
q example.com Lookup default records for a domain
q example.com MX SOA ...or specify a list of types
q example.com MX @9.9.9.9 Query a specific server
q example.com MX @https://dns.quad9.net ...over HTTPS (or TCP, TLS, QUIC, or ODoH)...
q @sdns://AgcAAAAAAAAAAAAHOS45LjkuOQA ...or from a DNS Stamp
q example.com MX --format=raw Output in raw (dig) format
q example.com MX --format=json ...or as JSON (or YAML)…q is available from:
go install github.com/natesales/q@latestdocker run --rm -it ghcr.io/natesales/qTo install q from source:
git clone https://github.com/natesales/q && cd q
go install
# Without debug information
go install -ldflags="-s -w -X main.version=release"q will use a server from the following sources, in order:
@server argument (e.g. @9.9.9.9 or @https://dns.google/dns-query)Q_DEFAULT_SERVER environment variable/etc/resolv.confq supports TLS decryption through a key log file generated when
the SSLKEYLOGFILE environment variable is set to a file path.
| Protocol | q | doggo | dog | kdig | dig | drill |
|---|---|---|---|---|---|---|
| Transport Protocols | ||||||
| UDP/TCP | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| DNS over TLS | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| DNS over HTTPS | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| DNS over QUIC | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Oblivious DNS over HTTPS | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| DNSCrypt v2 | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Features | ||||||
| Recursive AXFR | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| IP Whois | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Resolve PTRs from A/AAAAs | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Server from DNS Stamp | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Output Formats | ||||||
| Raw (dig-style) | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
| Pretty colors | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
| JSON | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
| YAML | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ |
| Output Control | ||||||
| Toggle question section | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ |
| Toggle answer section | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ |
| Toggle authority section | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ |
| Toggle additional section | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ |
| Show query time | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ |
| Query Flags | ||||||
| AA | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| AD | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| CD | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| RD | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ |
| Z | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ |
| DO | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| TC | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ |
| Protocol Tweaks | ||||||
| HTTP Method | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| HTTP Headers | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| QUIC ALPN Tokens | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| QUIC toggle PMTU discovery | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| QUIC timeouts (dial and idle) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| TLS handshake timeout | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
暂无开放 Issues,或尚未同步最近议题。