You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Sign inDemoInstall

Package Overview
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies


Version published




🐶 Command-line DNS client for humans

doggo CLI usage

doggo is a modern command-line DNS client (like dig) written in Golang. It outputs information in a neat concise manner and supports protocols like DoH, DoT, DoQ, and DNSCrypt as well.

It's totally inspired from dog which is written in Rust. I wanted to add some features to it but since I don't know Rust, I found it as a nice opportunity to experiment with writing a DNS Client from scratch in Go myself. Hence the name dog +go => doggo.


  • Human readable output - supports colors and tabular format.
  • Supports JSON format - can be useful while writing scripts.
  • Has support for multiple transport protocols:
    • DNS over HTTPS (DoH)
    • DNS over TLS (DoT)
    • DNS over QUIC (DoQ)
    • DNS over TCP
    • DNS over UDP
    • DNS over DNSCrypt
  • Supports ndots and search configurations from resolv.conf or command-line arguments.
  • Supports multiple resolvers at once.
  • Supports IPv4 and IPv6 both.
  • Available as a web tool as well:
  • Shell completions for zsh and fish.
  • Reverse DNS Lookups.



You can grab the latest binaries for Linux, MacOS and Windows from the Releases section.

For eg, to pull the latest linux-amd64 binary:

$ cd "$(mktemp -d)"
$ curl -sL "" | tar xz
$ mv doggo /usr/local/bin
# doggo should be available now in your $PATH
$ doggo


Images are hosted on Github Container Registry ( You can view all the tags here. It even supports ARM so you can spin up a container on your RPi to do DNS lookups, cause why not.


docker pull


You can supply all arguments to the CLI directly to docker run command. Eg:

docker run @ MX

Package Managers


Install via Homebrew

$ brew install doggo
yay -S doggo-bin

Install via Scoop

scoop install doggo

From Source

You need to have go installed in your system.

$ go install

The binary will be available at $GOPATH/bin/doggo.

Usage Examples

Do a simple DNS Lookup for

$ doggo                                                                         
NAME            TYPE    CLASS   TTL     ADDRESS         NAMESERVER    A       IN      20s    A       IN      20s

Query MX records for using resolver

doggo MX @
NAME            TYPE    CLASS   TTL     ADDRESS                         NAMESERVER     MX      IN      3600s   10     MX      IN      3600s   5     MX      IN      3600s   10     MX      IN      3600s   5     MX      IN      3600s   1 

or using named parameters:

$ doggo -t MX -n
NAME            TYPE    CLASS   TTL     ADDRESS                         NAMESERVER     MX      IN      3600s   10     MX      IN      3600s   5     MX      IN      3600s   10     MX      IN      3600s   5     MX      IN      3600s   1 

Query DNS records for using Cloudflare DoH resolver

$ doggo @ 
NAME            TYPE    CLASS   TTL     ADDRESS         NAMESERVER                      A       IN      41s

Query DNS records for with JSON output

$ doggo --json | jq
  "responses": {
    "answers": [
        "name": "",
        "type": "A",
        "class": "IN",
        "ttl": "22s",
        "address": "",
        "rtt": "37ms",
        "nameserver": ""
        "name": "",
        "type": "A",
        "class": "IN",
        "ttl": "22s",
        "address": "",
        "rtt": "37ms",
        "nameserver": ""
        "name": "",
        "type": "A",
        "class": "IN",
        "ttl": "22s",
        "address": "",
        "rtt": "37ms",
        "nameserver": ""
    "queries": [
        "name": "",
        "type": "A",
        "class": "IN"

Query DNS records for and show RTT (Round Trip Time)

$ doggo --time                
NAME            TYPE    CLASS   TTL     ADDRESS         NAMESERVER      TIME TAKEN A       IN      30s    45ms      

Command-line Arguments

Transport Options

URL scheme of the server is used to identify which resolver to use for lookups. If no scheme is specified, defaults to udp.

  @udp://        eg: @ initiates a UDP resolver for
  @tcp://        eg: @ initiates a TCP resolver for
  @https://      eg: @ initiates a DOH resolver for Cloudflare DoH server.
  @tls://        eg: @ initiates a DoT resolver for
  @sdns://       eg: @sdns://AgcAAAAAAAAABzEuMC4wLjEAEmRucy5jbG91ZGZsYXJlLmNvbQovZG5zLXF1ZXJ5
                 initiates a DNSCrypt or DoH resolver using its DNS stamp.
  @quic://       eg: @quic://
                 initiates a DNS over QUIC resolver for Adguard DNS Resolver.

Query Options

  -q, --query=HOSTNAME        Hostname to query the DNS records for (eg
  -t, --type=TYPE             Type of the DNS Record (A, MX, NS etc).
  -n, --nameserver=ADDR       Address of a specific nameserver to send queries to (, etc).
  -c, --class=CLASS           Network class of the DNS record (IN, CH, HS etc).

Resolver Options

  --strategy=STRATEGY           Specify strategy to query nameserver listed in etc/resolv.conf. Defaults to `all` (`random`, `first`, `all`).
  --ndots=INT                   Specify ndots parameter. Takes value from /etc/resolv.conf if using the system nameserver or 1 otherwise.
  --search                      Use the search list defined in resolv.conf. Defaults to true. Set --search=false to disable search list.
  --timeout                     Specify timeout (in seconds) for the resolver to return a response.
  -4 --ipv4                     Use IPv4 only.
  -6 --ipv6                     Use IPv6 only.
  --tls-hostname=HOSTNAME       Provide a hostname for doing verification of the certificate if the provided DoT nameserver is an IP.
  --skip-hostname-verification  Skip TLS Hostname Verification in case of DOT Lookups.

Output Options

  -J, --json                  Format the output as JSON.
  --color                     Defaults to true. Set --color=false to disable colored output.
  --debug                     Enable debug logging.
  --time                      Shows how long the response took from the server.
  --short                     Short output format. Shows only the response section.


I'm open to accept feature requests and/or issues. I understand doggo is a new DNS Client in the town and there might be some edge cases I am not handling. Please feel free to open issues if you ever come across such a case. For now I am focussing more on planned features for a stable v1.0 release soon.




Package last updated on 14 Aug 2023

Did you know?


Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.


Related posts

SocketSocket SOC 2 Logo


  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog


Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc