Hickory DNS

minimum rustc: 1.70 Build Status codecov License: MIT License: Apache 2.0 Discord

Hickory DNS

Hickory DNS

A Rust based DNS client, server, and resolver, built to be safe and secure from the ground up.

This repo consists of multiple crates:

LibraryDescription
Hickory DNS Provides the hickory-dns binary for running a DNS server.
Proto hickory-proto Low-level DNS library, including message encoding/decoding and DNS transports.
Client hickory-client Used for sending query, update, and notify messages directly to a DNS server.
Server hickory-server Used to build DNS servers. The hickory-dns binary makes use of this library.
Resolver hickory-resolver Utilizes the client library to perform DNS resolution. Can be used in place of the standard OS resolution facilities.
Recursor hickory-recursor Performs recursive DNS resolution, looking up records from their authoritative name servers.

NOTICE This project was rebranded from Trust-DNS to Hickory DNS and has been moved to the https://github.com/hickory-dns/hickory-dns organization and repo.

Goals

Status

DNSSEC status

The current root key is bundled into the system, and used by default. This gives validation of DNSKEY and DS records back to the root. NSEC and NSEC3 are implemented.

Zones will be automatically resigned on any record updates via dynamic DNS. To enable DNSSEC, enable the dnssec-ring feature.

RFCs implemented

Basic operations

Update operations

Secure DNS operations

RFCs in progress or not yet implemented

Basic operations

Update operations

Secure DNS operations

Minimum Rust Version

Testing

Hickory DNS uses just for build workflow management. While running cargo test at the project root will work, this is not exhaustive. Install just with cargo install just. A few of the just recipes require cargo-workspaces to be installed, a plugin to optimize the workflow around cargo workspaces. Install the plugin with cargo install cargo-workspaces.

just default
just all-features
just dns-over-https-rustls

Building

cargo build --release -p hickory-dns

Using the hickory-resolver CLI

Available in 0.20

cargo install --bin resolve hickory-util

Or from source, in the hickory-dns directory

cargo install --bin resolve --path util

example:

$ resolve www.example.com.
Querying for www.example.com. A from udp:8.8.8.8:53, tcp:8.8.8.8:53, udp:8.8.4.4:53, tcp:8.8.4.4:53, udp:[2001:4860:4860::8888]:53, tcp:[2001:4860:4860::8888]:53, udp:[2001:4860:4860::8844]:53, tcp:[2001:4860:4860::8844]:53
Success for query name: www.example.com. type: A class: IN
        www.example.com. 21063 IN A 93.184.215.14

FAQ

Community

For live discussions beyond this repository, please see this Discord.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.