Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
Q

q

> 开发工具
Open source

A tiny command line DNS client with support for UDP, TCP, DoT, DoH, DoQ and ODoH.

2.5K stars0 likes1 views
WebsiteGitHub

About

A tiny command line DNS client with support for UDP, TCP, DoT, DoH, DoQ and ODoH.

Examples

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)

Usage

…

Demo

Protocol Support

  • UDP/TCP DNS (RFC 1034)
  • DNS over TLS (RFC 7858)
  • DNS over HTTPS (RFC 8484)
  • DNS over QUIC (RFC 9250)
  • Oblivious DNS over HTTPS (RFC 9230)
  • DNSCrypt v2 (draft-dennis-dprive-dnscrypt)

Installation

q is available from:

  • apt/yum/brew from my package repositories
  • Homebrew core repository
  • GitHub releases
  • q-dns-git in the AUR
  • go install github.com/natesales/q@latest
  • docker run --rm -it ghcr.io/natesales/q

To install q from source:

bash
git clone https://github.com/natesales/q && cd q
go install

# Without debug information
go install -ldflags="-s -w -X main.version=release"

Server Selection

q will use a server from the following sources, in order:

  1. @server argument (e.g. @9.9.9.9 or @https://dns.google/dns-query)
  2. Q_DEFAULT_SERVER environment variable
  3. /etc/resolv.conf

TLS Decryption

q supports TLS decryption through a key log file generated when the SSLKEYLOGFILE environment variable is set to a file path.

Feature Comparison

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· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Godns-clientdns-over-httpsdns-over-quicdns-over-tls

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具