{"id":13548503,"url":"https://github.com/natesales/q","last_synced_at":"2025-05-14T10:00:30.394Z","repository":{"id":37400921,"uuid":"343316910","full_name":"natesales/q","owner":"natesales","description":"A tiny command line DNS client with support for UDP, TCP, DoT, DoH, DoQ and ODoH.","archived":false,"fork":false,"pushed_at":"2025-01-15T03:55:43.000Z","size":1084,"stargazers_count":1884,"open_issues_count":27,"forks_count":72,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-11T21:49:07.609Z","etag":null,"topics":["dns-client","dns-over-https","dns-over-quic","dns-over-tls","doh","oblivious-dns-over-https"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/natesales.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["natesales"]}},"created_at":"2021-03-01T06:45:22.000Z","updated_at":"2025-04-09T09:08:22.000Z","dependencies_parsed_at":"2023-10-29T05:21:12.618Z","dependency_job_id":"b6c42379-fd55-4d91-811e-059c0a71c2ce","html_url":"https://github.com/natesales/q","commit_stats":{"total_commits":413,"total_committers":12,"mean_commits":"34.416666666666664","dds":0.2009685230024213,"last_synced_commit":"1cb2639caf69bd0a9b46494a3c689130df8fb24a"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natesales%2Fq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natesales%2Fq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natesales%2Fq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natesales%2Fq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natesales","download_url":"https://codeload.github.com/natesales/q/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254119449,"owners_count":22017947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns-client","dns-over-https","dns-over-quic","dns-over-tls","doh","oblivious-dns-over-https"],"created_at":"2024-08-01T12:01:11.223Z","updated_at":"2025-05-14T10:00:30.353Z","avatar_url":"https://github.com/natesales.png","language":"Go","funding_links":["https://github.com/sponsors/natesales"],"categories":["Go"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eq\u003c/h1\u003e\n\nA tiny and feature-rich command line DNS client with support for UDP, TCP, DoT, DoH, DoQ, and ODoH.\n\n[![Release](https://img.shields.io/github/v/release/natesales/q?style=for-the-badge)](https://github.com/natesales/q/releases)\n![Coverage](coverage_badge.png)\n[![Go Report](https://goreportcard.com/badge/github.com/natesales/q?style=for-the-badge)](https://goreportcard.com/report/github.com/natesales/q)\n[![License](https://img.shields.io/github/license/natesales/q?style=for-the-badge)](https://raw.githubusercontent.com/natesales/q/main/LICENSE)\n\n![q screenshot](carbon.svg)\n\u003c/div\u003e\n\n### Examples\n\n```text\nq example.com                            Lookup default records for a domain\nq example.com MX SOA                     ...or specify a list of types\n\nq example.com MX @9.9.9.9                Query a specific server\nq example.com MX @https://dns.quad9.net  ...over HTTPS (or TCP, TLS, QUIC, or ODoH)...\nq @sdns://AgcAAAAAAAAAAAAHOS45LjkuOQA    ...or from a DNS Stamp\n\nq example.com MX --format=raw            Output in raw (dig) format\nq example.com MX --format=json           ...or as JSON (or YAML)\n```\n\n### Usage\n\n```text\nUsage:\n  q [OPTIONS] [@server] [type...] [name]\n\nAll long form (--) flags can be toggled with the dig-standard +[no]flag notation.\n\nApplication Options:\n  -q, --qname=                    Query name\n  -s, --server=                   DNS server(s)\n  -t, --type=                     RR type (e.g. A, AAAA, MX, etc.) or type\n                                  integer\n  -x, --reverse                   Reverse lookup\n  -d, --dnssec                    Set the DO (DNSSEC OK) bit in the OPT record\n  -n, --nsid                      Set EDNS0 NSID opt\n  -N, --nsid-only                 Set EDNS0 NSID opt and query only for the NSID\n      --subnet=                   Set EDNS0 client subnet\n  -c, --chaos                     Use CHAOS query class\n  -C=                             Set query class (default: IN 0x01) (default:\n                                  1)\n  -p, --odoh-proxy=               ODoH proxy\n      --timeout=                  Query timeout (default: 10s)\n      --pad                       Set EDNS0 padding\n      --http2                     Use HTTP/2 for DoH\n      --http3                     Use HTTP/3 for DoH\n      --id-check                  Check DNS response ID (default: true)\n      --reuse-conn                Reuse connections across queries to the same\n                                  server (default: true)\n      --txtconcat                 Concatenate TXT responses\n      --qid=                      Set query ID (-1 for random) (default: -1)\n  -b, --bootstrap-server=         DNS server to use for bootstrapping\n      --bootstrap-timeout=        Bootstrapping timeout (default: 5s)\n      --cookie=                   EDNS0 cookie\n      --recaxfr                   Perform recursive AXFR\n  -f, --format=                   Output format (pretty, column, json, yaml,\n                                  raw) (default: pretty)\n      --pretty-ttls               Format TTLs in human readable format\n                                  (default: true)\n      --short-ttls                Remove zero components of pretty TTLs.\n                                  (24h0m0s-\u003e24h) (default: true)\n      --color                     Enable color output\n      --question                  Show question section\n      --opt                       Show OPT records\n      --answer                    Show answer section (default: true)\n      --authority                 Show authority section\n      --additional                Show additional section\n  -S, --stats                     Show time statistics\n      --all                       Show all sections and statistics\n  -w                              Resolve ASN/ASName for A and AAAA records\n  -r, --short                     Show record values only\n  -R, --resolve-ips               Resolve PTR records for IP addresses in A and\n                                  AAAA records\n      --round-ttls                Round TTLs to the nearest minute\n      --aa                        Set AA (Authoritative Answer) flag in query\n      --ad                        Set AD (Authentic Data) flag in query\n      --cd                        Set CD (Checking Disabled) flag in query\n      --rd                        Set RD (Recursion Desired) flag in query\n                                  (default: true)\n      --ra                        Set RA (Recursion Available) flag in query\n      --z                         Set Z (Zero) flag in query\n      --t                         Set TC (Truncated) flag in query\n  -i, --tls-insecure-skip-verify  Disable TLS certificate verification\n      --tls-server-name=          TLS server name for host verification\n      --tls-min-version=          Minimum TLS version to use (default: 1.0)\n      --tls-max-version=          Maximum TLS version to use (default: 1.3)\n      --tls-next-protos=          TLS next protocols for ALPN\n      --tls-cipher-suites=        TLS cipher suites\n      --tls-curve-preferences=    TLS curve preferences\n      --tls-client-cert=          TLS client certificate file\n      --tls-client-key=           TLS client key file\n      --tls-key-log-file=         TLS key log file [$SSLKEYLOGFILE]\n      --http-user-agent=          HTTP user agent\n      --http-method=              HTTP method (default: GET)\n      --pmtud                     PMTU discovery (default: true)\n      --quic-alpn-tokens=         QUIC ALPN tokens (default: doq, doq-i11)\n      --quic-length-prefix        Add RFC 9250 compliant length prefix\n                                  (default: true)\n      --dnscrypt-tcp              Use TCP for DNSCrypt (default UDP)\n      --dnscrypt-udp-size=        Maximum size of a DNS response this client\n                                  can sent or receive (default: 0)\n      --dnscrypt-key=             DNSCrypt public key\n      --dnscrypt-provider=        DNSCrypt provider name\n      --default-rr-types=         Default record types (default: A, AAAA, NS,\n                                  MX, TXT, CNAME)\n      --udp-buffer=               Set EDNS0 UDP size in query (default: 1232)\n  -v, --verbose                   Show verbose log messages\n      --trace                     Show trace log messages\n  -V, --version                   Show version and exit\n\nHelp Options:\n  -h, --help                      Show this help message\n```\n\n### Demo\n\n[![asciicast](https://asciinema.org/a/XdWPPvZgx4hEBFwGnGwL13bsZ.svg)](https://asciinema.org/a/XdWPPvZgx4hEBFwGnGwL13bsZ)\n\n### Protocol Support\n\n- UDP/TCP DNS ([RFC 1034](https://tools.ietf.org/html/rfc1034))\n- DNS over TLS ([RFC 7858](https://tools.ietf.org/html/rfc7858))\n- DNS over HTTPS ([RFC 8484](https://tools.ietf.org/html/rfc8484))\n- DNS over QUIC ([RFC 9250](https://tools.ietf.org/html/rfc9250))\n- Oblivious DNS over HTTPS ([RFC 9230](https://tools.ietf.org/html/rfc9230))\n- DNSCrypt v2 ([draft-dennis-dprive-dnscrypt](https://dnscrypt.github.io/dnscrypt-protocol/draft-denis-dprive-dnscrypt.html))\n\n### Installation\n\n`q` is available from:\n\n- [apt/yum/brew from my package repositories](https://github.com/natesales/repo)\n- [GitHub releases](https://github.com/natesales/q/releases)\n- [q-dns-git](https://aur.archlinux.org/packages/q-dns-git/) in the AUR\n- `go install github.com/natesales/q@latest`\n- `docker run --rm -it ghcr.io/natesales/q`\n\nTo install `q` from source:\n\n```sh\ngit clone https://github.com/natesales/q \u0026\u0026 cd q\ngo install\n\n# Without debug information\ngo install -ldflags=\"-s -w -X main.version=release\"\n```\n\n### Server Selection\n\n`q` will use a server from the following sources, in order:\n\n1. `@server` argument (e.g. `@9.9.9.9` or `@https://dns.google/dns-query`)\n2. `Q_DEFAULT_SERVER` environment variable\n3. `/etc/resolv.conf`\n\n### TLS Decryption\n\n`q` supports TLS decryption through a key log file generated when\nthe `SSLKEYLOGFILE` environment variable is set to a file path.\n\n### Feature Comparison\n\n| Protocol                      | q | doggo | dog | kdig | dig | drill |\n|:------------------------------|:-:|:-----:|:---:|:----:|:---:|:-----:|\n| **Transport Protocols**       |   |       |     |      |     |       |\n| UDP/TCP                       | ✅ |   ✅   |  ✅  |  ✅   |  ✅  |   ✅   |\n| DNS over TLS                  | ✅ |   ✅   |  ✅  |  ✅   |  ❌  |   ❌   |\n| DNS over HTTPS                | ✅ |   ✅   |  ✅  |  ✅   |  ❌  |   ❌   |\n| DNS over QUIC                 | ✅ |   ✅   |  ❌  |  ❌   |  ❌  |   ❌   |\n| Oblivious DNS over HTTPS      | ✅ |   ❌   |  ❌  |  ❌   |  ❌  |   ❌   |\n| DNSCrypt v2                   | ✅ |   ✅   |  ❌  |  ❌   |  ❌  |   ❌   |\n| **Features**                  |   |       |     |      |     |       |\n| Recursive AXFR                | ✅ |   ❌   |  ❌  |  ❌   |  ❌  |   ❌   |\n| IP Whois                      | ✅ |   ❌   |  ❌  |  ❌   |  ❌  |   ❌   |\n| Resolve PTRs from A/AAAAs     | ✅ |   ❌   |  ❌  |  ❌   |  ❌  |   ❌   |\n| Server from DNS Stamp         | ✅ |   ✅   |  ❌  |  ❌   |  ❌  |   ❌   |\n| **Output Formats**            |   |       |     |      |     |       |\n| Raw (dig-style)               | ✅ |   ❌   |  ✅  |  ✅   |  ✅  |   ✅   |\n| Pretty colors                 | ✅ |   ✅   |  ✅  |  ❌   |  ❌  |   ❌   |\n| JSON                          | ✅ |   ✅   |  ✅  |  ❌   |  ❌  |   ❌   |\n| YAML                          | ✅ |   ❌   |  ❌  |  ❌   |  ✅  |   ❌   |\n| **Output Control**            |   |       |     |      |     |       |\n| Toggle question section       | ✅ |   ❌   |  ❌  |  ✅   |  ✅  |   ❌   |\n| Toggle answer section         | ✅ |   ❌   |  ❌  |  ✅   |  ✅  |   ❌   |\n| Toggle authority section      | ✅ |   ❌   |  ❌  |  ✅   |  ✅  |   ❌   |\n| Toggle additional section     | ✅ |   ❌   |  ❌  |  ✅   |  ✅  |   ❌   |\n| Show query time               | ✅ |   ✅   |  ❌  |  ✅   |  ✅  |   ❌   |\n| **Query Flags**               |   |       |     |      |     |       |\n| AA                            | ✅ |   ✅   |  ✅  |  ✅   |  ✅  |   ✅   |\n| AD                            | ✅ |   ✅   |  ✅  |  ✅   |  ✅  |   ✅   |\n| CD                            | ✅ |   ✅   |  ✅  |  ✅   |  ✅  |   ✅   |\n| RD                            | ✅ |   ✅   |  ❌  |  ✅   |  ✅  |   ✅   |\n| Z                             | ✅ |   ✅   |  ❌  |  ✅   |  ✅  |   ❌   |\n| DO                            | ✅ |   ✅   |  ✅  |  ✅   |  ✅  |   ✅   |\n| TC                            | ✅ |   ❌   |  ❌  |  ✅   |  ✅  |   ✅   |\n| **Protocol Tweaks**           |   |       |     |      |     |       |\n| HTTP Method                   | ✅ |   ❌   |  ❌  |  ❌   |  ❌  |   ❌   |\n| QUIC ALPN Tokens              | ✅ |   ❌   |  ❌  |  ❌   |  ❌  |   ❌   |\n| QUIC toggle PMTU discovery    | ✅ |   ❌   |  ❌  |  ❌   |  ❌  |   ❌   |\n| QUIC timeouts (dial and idle) | ✅ |   ❌   |  ❌  |  ❌   |  ❌  |   ❌   |\n| TLS handshake timeout         | ✅ |   ❌   |  ❌  |  ❌   |  ❌  |   ❌   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatesales%2Fq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatesales%2Fq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatesales%2Fq/lists"}