Coder Social home page Coder Social logo

dog's Introduction

dog

dog is a command-line DNS client.

Build status Say thanks!

A screenshot of dog making a DNS request


Dogs can look up!

dog is a command-line DNS client, like dig. It has colourful output, understands normal command-line argument syntax, supports the DNS-over-TLS and DNS-over-HTTPS protocols, and can emit JSON.

Examples

dog example.net                          Query a domain using default settings
dog example.net MX                       ...looking up MX records instead
dog example.net MX @1.1.1.1              ...using a specific nameserver instead
dog example.net MX @1.1.1.1 -T           ...using TCP rather than UDP
dog -q example.net -t MX -n 1.1.1.1 -T   As above, but using explicit arguments

Command-line options

Query options

<arguments>              Human-readable host names, nameservers, types, or classes
-q, --query=HOST         Host name or IP address to query
-t, --type=TYPE          Type of the DNS record being queried (A, MX, NS...)
-n, --nameserver=ADDR    Address of the nameserver to send packets to
--class=CLASS            Network class of the DNS record being queried (IN, CH, HS)

Sending options

--edns=SETTING           Whether to OPT in to EDNS (disable, hide, show)
--txid=NUMBER            Set the transaction ID to a specific value
-Z=TWEAKS                Set uncommon protocol-level tweaks

Protocol options

-U, --udp                Use the DNS protocol over UDP
-T, --tcp                Use the DNS protocol over TCP
-S, --tls                Use the DNS-over-TLS protocol
-H, --https              Use the DNS-over-HTTPS protocol

Output options

-1, --short              Short mode: display nothing but the first result
-J, --json               Display the output as JSON
--color, --colour=WHEN   When to colourise the output (always, automatic, never)
--seconds                Do not format durations, display them as seconds
--time                   Print how long the response took to arrive

Installation

Installing dog requires building it from source.

Compilation

dog is written in Rust. You will need rustc version 1.45.0 or higher. The recommended way to install Rust for development is from the official download page, using rustup.

To build, download the source code and run:

$ cargo build
$ cargo test
  • The just command runner can be used to run some helpful development commands, in a manner similar to make. Run just --tasks to get an overview of what’s available.

  • If you are compiling a copy for yourself, be sure to run cargo build --release or just build-release to benefit from release-mode optimisations. Copy the resulting binary, which will be in the target/release directory, into a folder in your $PATH. /usr/local/bin is usually a good choice.

  • To compile and install the manual pages, you will need pandoc. The just man command will compile the Markdown into manual pages, which it will place in the target/man directory. To use them, copy them into a directory that man will read. /usr/local/share/man is usually a good choice.

Testing

dog has an integration test suite written as Specsheet check documents. If you have a copy installed, you can run:

just xtests

Specsheet will test the compiled binary by making DNS requests over the network, checking that dog returns results and does not crash.


Documentation

For documentation on how to use dog, see the website: https://dns.lookup.dog/

See also

mutt, tail, sleep, roff

Licence

dog’s source code is licenced under the European Union Public Licence.

dog's People

Contributors

ogham avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.