Skip to content

DNS CLISimple DNS Client and Server

A powerful DNS client and server CLI tool written in Go

Quick Start

Installation

bash
go install github.com/go-idp/dns/cmd/dns@latest

DNS Client Query

bash
# Query A record
dns client lookup google.com --type A

# Query AAAA record (IPv6)
dns client lookup google.com --type AAAA

# Use DoT server
dns client lookup example.com --server tls://1.1.1.1

DNS Server

bash
# Start basic DNS server
dns server --port 53

# Start DNS server with DoT support
dns server --port 53 --dot --tls-cert /path/to/cert.pem --tls-key /path/to/key.pem

# Start DNS server with configuration file
dns server --config /path/to/config.yaml

Visit the Guide for detailed usage instructions.

Features

Client Features

  • ✅ Plain DNS (UDP/TCP)
  • ✅ DNS-over-TLS (DoT)
  • ✅ DNS-over-HTTPS (DoH)
  • ✅ DNS-over-QUIC (DoQ)
  • ✅ DNSCrypt

Server Features

  • ✅ Plain DNS (UDP/TCP)
  • ✅ DNS-over-TLS (DoT)
  • ✅ DNS-over-HTTPS (DoH)
  • ✅ DNS-over-QUIC (DoQ)
  • ✅ Custom host mappings
  • ✅ Wildcard and regex pattern support
  • ✅ System hosts file integration
  • ✅ Upstream DNS server fallback
  • ✅ YAML configuration file support

License

MIT License - see LICENSE for details.

Released under the MIT License.