hickory-dns/README.md

379 lines
20 KiB
Markdown
Raw Permalink Normal View History

2023-09-23 08:44:36 +00:00
[![minimum rustc: 1.67](https://img.shields.io/badge/minimum%20rustc-1.67-green?logo=rust)](https://www.whatrustisit.com)
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
[![Build Status](https://github.com/hickory-dns/hickory-dns/workflows/test/badge.svg?branch=main)](https://github.com/hickory-dns/hickory-dns/actions?query=workflow%3Atest)
[![codecov](https://codecov.io/gh/hickory-dns/hickory-dns/branch/main/graph/badge.svg)](https://codecov.io/gh/hickory-dns/hickory-dns)
2016-08-18 20:17:29 +00:00
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE-MIT)
[![License: Apache 2.0](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](LICENSE-APACHE)
2019-06-17 14:09:10 +00:00
[![Discord](https://img.shields.io/discord/590067103822774272.svg)](https://discord.gg/89nxE4n)
<div class="oranda-hide">
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
![Hickory DNS](logo.png)
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
# Hickory DNS
2019-01-27 21:09:04 +00:00
</div>
2019-01-27 21:09:04 +00:00
A Rust based DNS client, server, and Resolver, built to be safe and secure from the
2015-08-22 00:29:00 +00:00
ground up.
2015-08-14 23:28:01 +00:00
This repo consists of multiple crates:
2022-08-03 11:04:07 +00:00
| Library | Description |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
| **Hickory DNS** | [![](https://img.shields.io/crates/v/hickory-dns.svg)](https://crates.io/crates/hickory-dns) Binaries for running a DNS authoritative server. |
| **Proto** | [![](https://img.shields.io/crates/v/hickory-proto.svg)](https://crates.io/crates/hickory-proto) [![hickory-proto](https://docs.rs/hickory-proto/badge.svg)](https://docs.rs/hickory-proto) Raw DNS library, exposes an unstable API and only for use by the other Hickory DNS libraries, not intended for end-user use. |
| **Client** | [![](https://img.shields.io/crates/v/hickory-client.svg)](https://crates.io/crates/hickory-client) [![hickory-client](https://docs.rs/hickory-client/badge.svg)](https://docs.rs/hickory-client) Used for sending `query`, `update`, and `notify` messages directly to a DNS server. |
| **Server** | [![](https://img.shields.io/crates/v/hickory-server.svg)](https://crates.io/crates/hickory-server) [![hickory-server](https://docs.rs/hickory-server/badge.svg)](https://docs.rs/hickory-server) Use to host DNS records, this also has a `hickory-dns` binary for running in a daemon form. |
| **Resolver** | [![](https://img.shields.io/crates/v/hickory-resolver.svg)](https://crates.io/crates/hickory-resolver) [![hickory-resolver](https://docs.rs/hickory-resolver/badge.svg)](https://docs.rs/hickory-resolver) Utilizes the client library to perform DNS resolution. Can be used in place of the standard OS resolution facilities. |
**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.
2015-08-14 23:28:01 +00:00
# Goals
- Build a safe and secure DNS server and client with modern features.
2015-10-17 22:33:13 +00:00
- No panics, all code is guarded
2015-08-22 00:29:00 +00:00
- Use only safe Rust, and avoid all panics with proper Error handling
- Use only stable Rust
2015-08-14 23:28:01 +00:00
- Protect against DDOS attacks (to a degree)
2015-10-17 22:33:13 +00:00
- Support options for Global Load Balancing functions
- Make it dead simple to operate
2015-08-14 23:28:01 +00:00
2022-02-26 15:31:11 +00:00
# Status
2015-08-14 23:28:01 +00:00
2019-12-22 19:47:34 +00:00
## Resolver
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
The Hickory DNS Resolver is a native Rust implementation for stub resolution in Rust applications. The Resolver supports many common query patterns, all of which can be configured when creating the Resolver. It is capable of using system configuration on Unix and Windows. On Windows there is a known issue that relates to a large set of interfaces being registered for use, so might require ignoring the system configuration.
2019-12-22 19:47:34 +00:00
The Resolver will properly follow CNAME chains as well as SRV record lookups. There is a long term plan to make the Resolver capable of fully recursive queries, but that's not currently possible.
## Client
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
The Hickory DNS Client is intended to be used for operating against a DNS server directly. It can be used for verifying records or updating records for servers that support SIG0 and dynamic update. The Client is also capable of validating DNSSEC. As of now NSEC3 validation is not yet supported, though NSEC is. There are two interfaces that can be used, the async/await compatible AsyncClient and a blocking Client for ease of use. Today, Tokio is required for the executor Runtime.
2016-11-03 07:12:50 +00:00
2016-06-02 06:24:25 +00:00
### Unique client side implementations
These are standards supported by the DNS protocol. The client implements them
2022-08-03 11:04:07 +00:00
as high level interfaces, which is a bit more rare.
2023-09-23 08:44:36 +00:00
| Feature | Description |
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
| [SyncDnssecClient](https://docs.rs/hickory-client/latest/hickory_client/client/struct.SyncDnssecClient.html) | DNSSEC validation |
| [create](https://docs.rs/hickory-client/latest/hickory_client/client/trait.Client.html#method.create) | atomic create of a record, with authenticated request |
| [append](https://docs.rs/hickory-client/latest/hickory_client/client/trait.Client.html#method.append) | verify existence of a record and append to it |
| [compare_and_swap](https://docs.rs/hickory-client/latest/hickory_client/client/trait.Client.html#method.compare_and_swap) | atomic (depends on server) compare and swap |
| [delete_by_rdata](https://docs.rs/hickory-client/latest/hickory_client/client/trait.Client.html#method.delete_by_rdata) | delete a specific record |
| [delete_rrset](https://docs.rs/hickory-client/latest/hickory_client/client/trait.Client.html#method.delete_rrset) | delete an entire record set |
| [delete_all](https://docs.rs/hickory-client/latest/hickory_client/client/trait.Client.html#method.delete_all) | delete all records sets with a given name |
| [notify](https://docs.rs/hickory-client/latest/hickory_client/client/trait.Client.html#method.notify) | notify server that it should reload a zone |
## Server
2015-08-14 23:28:01 +00:00
2015-11-16 04:57:59 +00:00
The server code is complete, the daemon supports IPv4 and IPv6, UDP and TCP.
2022-08-03 11:04:07 +00:00
There currently is no way to limit TCP and AXFR operations, so it is still not
recommended to put into production as TCP can be used to DOS the service.
Zone file parsing is complete and supported. There is currently no forking
option, and the server is not yet threaded (although it is implemented with
async IO, so threading may not be a huge benefit). There is still a lot of work
to do before a server can be trusted with this externally. Running it behind a
firewall on a private network would be safe.
2016-06-21 06:28:34 +00:00
Zone signing support is complete, to insert a key store a pem encoded rsa file
2022-08-03 11:04:07 +00:00
in the same directory as the initial zone file with the `.key` suffix. _Note_:
this must be only readable by the current user. If one is not present one will
be created and written to the correct location. This also acts as the initial
key for dynamic update SIG(0) validation. To get the public key, the `DNSKEY`
record for the zone can be queried. This is needed to provide to other
upstream servers to create the `DS` key. Dynamic DNS is also complete,
if enabled, a journal file will be stored next to the zone file with the
`jrnl` suffix. _Note_: if the key is changed or updated, it is currently the
operators responsibility to remove the only public key from the zone, this
allows for the `DNSKEY` to exist for some unspecified period of time during
key rotation. Rotating the key currently is not available online and requires
a restart of the server process.
2019-12-22 19:47:34 +00:00
### DNS-over-TLS and DNS-over-HTTPS on the Server
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
Support of TLS on the Server is managed through a pkcs12 der file. The documentation is captured in the example test config file, [example.toml](https://github.com/hickory-dns/hickory-dns/blob/main/tests/test-data/test_configs/example.toml). A registered certificate to the server can be pinned to the Client with the `add_ca()` method. Alternatively, as the client uses the rust-native-tls library, it should work with certificate signed by any standard CA.
2019-12-22 19:47:34 +00:00
## DNS-over-TLS and DNS-over-HTTPS
2024-04-28 16:37:01 +00:00
DoT and DoH are supported. This is accomplished through the use of one of `native-tls`, `openssl`, or `rustls` (only `rustls` is currently supported for DoH). The Resolver requires valid DoT or DoH resolvers being registered in order to be used.
2019-12-22 19:47:34 +00:00
To use with the `Client`, the `TlsClientConnection` or `HttpsClientConnection` should be used. Similarly, to use with the tokio `AsyncClient` the `TlsClientStream` or `HttpsClientStream` should be used. ClientAuth, mTLS, is currently not supported, there are some issues still being worked on. TLS is useful for Server authentication and connection privacy.
To enable DoT one of the features `dns-over-native-tls`, `dns-over-openssl`, or `dns-over-rustls` must be enabled, `dns-over-https-rustls` is used for DoH.
2022-12-15 14:40:55 +00:00
## DNSSEC status
2016-03-10 06:50:11 +00:00
Currently the root key is hardcoded into the system. This gives validation of
2022-08-03 11:04:07 +00:00
DNSKEY and DS records back to the root. NSEC is implemented, but not NSEC3.
Because caching is not yet enabled, it has been noticed that some DNS servers
appear to rate limit the connections, validating RRSIG records back to the root
can require a significant number of additional queries for those records.
2015-08-22 00:29:00 +00:00
Zones will be automatically resigned on any record updates via dynamic DNS. To enable DNSSEC, one of the features `dnssec-openssl` or `dnssec-ring` must be enabled.
2016-06-02 06:24:25 +00:00
2019-01-12 13:46:31 +00:00
## RFCs implemented
2015-09-17 21:13:01 +00:00
- [RFC 8499](https://tools.ietf.org/html/rfc8499): No more master/slave, in honor of [Juneteenth](https://en.wikipedia.org/wiki/Juneteenth)
2015-11-16 04:57:59 +00:00
### Basic operations
2022-02-26 15:31:11 +00:00
2017-09-25 10:50:34 +00:00
- [RFC 1035](https://tools.ietf.org/html/rfc1035): Base DNS spec (see the Resolver for caching)
- [RFC 2308](https://tools.ietf.org/html/rfc2308): Negative Caching of DNS Queries (see the Resolver)
2015-11-16 04:57:59 +00:00
- [RFC 2782](https://tools.ietf.org/html/rfc2782): Service location
2017-09-25 10:50:34 +00:00
- [RFC 3596](https://tools.ietf.org/html/rfc3596): IPv6
- [RFC 6891](https://tools.ietf.org/html/rfc6891): Extension Mechanisms for DNS
2018-01-25 06:21:04 +00:00
- [RFC 6761](https://tools.ietf.org/html/rfc6761): Special-Use Domain Names (resolver)
2018-10-08 05:26:25 +00:00
- [RFC 6762](https://tools.ietf.org/html/rfc6762): mDNS Multicast DNS (experimental feature: `mdns`)
- [RFC 6763](https://tools.ietf.org/html/rfc6763): DNS-SD Service Discovery (experimental feature: `mdns`)
2019-03-26 06:49:34 +00:00
- [RFC ANAME](https://tools.ietf.org/html/draft-ietf-dnsop-aname-02): Address-specific DNS aliases (`ANAME`)
2015-11-16 04:57:59 +00:00
### Update operations
2022-02-26 15:31:11 +00:00
2015-10-18 20:45:31 +00:00
- [RFC 2136](https://tools.ietf.org/html/rfc2136): Dynamic Update
2021-10-28 02:40:23 +00:00
- [RFC 7477](https://tools.ietf.org/html/rfc7477): Child-to-Parent Synchronization in DNS
2015-10-17 22:33:13 +00:00
2016-03-10 06:50:11 +00:00
### Secure DNS operations
2022-02-26 15:31:11 +00:00
2024-05-18 22:16:12 +00:00
- [RFC 2931](https://datatracker.ietf.org/doc/html/rfc2931): SIG(0)
2016-03-10 06:50:11 +00:00
- [RFC 3007](https://tools.ietf.org/html/rfc3007): Secure Dynamic Update
- [RFC 4034](https://tools.ietf.org/html/rfc4034): DNSSEC Resource Records
- [RFC 4035](https://tools.ietf.org/html/rfc4035): Protocol Modifications for DNSSEC
- [RFC 4509](https://tools.ietf.org/html/rfc4509): SHA-256 in DNSSEC Delegation Signer
- [RFC 5702](https://tools.ietf.org/html/rfc5702): SHA-2 Algorithms with RSA in DNSKEY and RRSIG for DNSSEC
2017-11-30 06:52:12 +00:00
- [RFC 6844](https://tools.ietf.org/html/rfc6844): DNS Certification Authority Authorization (CAA) Resource Record
2017-11-10 21:37:14 +00:00
- [RFC 6698](https://tools.ietf.org/html/rfc6698): The DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA
2016-03-10 06:50:11 +00:00
- [RFC 6840](https://tools.ietf.org/html/rfc6840): Clarifications and Implementation Notes for DNSSEC
2017-11-08 05:13:05 +00:00
- [RFC 6844](https://tools.ietf.org/html/rfc6844): DNS Certification Authority Authorization Resource Record
2016-03-10 06:50:11 +00:00
- [RFC 6944](https://tools.ietf.org/html/rfc6944): DNSKEY Algorithm Implementation Status
- [RFC 6975](https://tools.ietf.org/html/rfc6975): Signaling Cryptographic Algorithm Understanding
2018-04-15 17:48:19 +00:00
- [RFC 7858](https://tools.ietf.org/html/rfc7858): DNS over TLS (feature: `dns-over-rustls`, `dns-over-native-tls`, or `dns-over-openssl`)
2018-10-08 05:26:25 +00:00
- [RFC DoH](https://tools.ietf.org/html/draft-ietf-doh-dns-over-https-14): DNS over HTTPS, DoH (feature: `dns-over-https-rustls`)
2016-03-10 06:50:11 +00:00
2019-01-12 13:46:31 +00:00
## RFCs in progress or not yet implemented
2015-10-17 22:33:13 +00:00
2015-11-16 04:57:59 +00:00
### Basic operations
2022-02-26 15:31:11 +00:00
2015-11-16 04:57:59 +00:00
- [RFC 2317](https://tools.ietf.org/html/rfc2317): Classless IN-ADDR.ARPA delegation
### Update operations
2022-02-26 15:31:11 +00:00
2015-10-18 20:45:31 +00:00
- [RFC 1995](https://tools.ietf.org/html/rfc1995): Incremental Zone Transfer
- [RFC 1996](https://tools.ietf.org/html/rfc1996): Notify secondaries of update
2015-11-16 04:57:59 +00:00
- [Update Leases](https://tools.ietf.org/html/draft-sekar-dns-ul-01): Dynamic DNS Update Leases
2021-07-12 14:13:41 +00:00
- [Long-Lived Queries](https://tools.ietf.org/html/draft-sekar-dns-llq-01): Notify with bells
2015-11-16 04:57:59 +00:00
### Secure DNS operations
2022-02-26 15:31:11 +00:00
2015-11-16 04:57:59 +00:00
- [RFC 5155](https://tools.ietf.org/html/rfc5155): DNSSEC Hashed Authenticated Denial of Existence
2015-10-18 20:45:31 +00:00
- [DNSCrypt](https://dnscrypt.org): Trusted DNS queries
- [S/MIME](https://tools.ietf.org/html/draft-ietf-dane-smime-09): Domain Names For S/MIME
2015-10-17 22:33:13 +00:00
# Usage
2015-10-18 20:45:31 +00:00
This assumes that you have [Rust](https://www.rust-lang.org) stable installed. These
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
presume that the hickory-dns repos have already been synced to the local system:
2015-10-18 20:51:12 +00:00
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
git clone https://github.com/hickory-dns/hickory-dns.git
cd hickory-dns
2015-10-18 20:45:31 +00:00
## Prerequisites
2019-10-22 06:14:54 +00:00
### Minimum Rust Version
2023-09-23 08:44:36 +00:00
- The current minimum rustc version for this project is `1.67`
2019-10-22 06:14:54 +00:00
- OpenSSL development libraries (optional in client and resolver, min version 1.0.2)
2016-08-27 04:51:06 +00:00
### Mac OS X: using homebrew
2016-07-25 13:06:39 +00:00
2016-08-27 04:51:06 +00:00
```
2022-02-26 15:31:11 +00:00
brew install openssl
export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib
2016-08-27 04:51:06 +00:00
```
### Debian-based (includes Ubuntu & Raspbian): using apt-get
```
2022-08-03 11:04:07 +00:00
# note for openssl that a minimum version of 1.0.2 is required for TLS,
2017-03-26 02:01:29 +00:00
# if this is an issue, TLS can be disabled (on the client), see below.
2016-08-27 04:51:06 +00:00
$ apt-get install openssl
2019-07-01 13:38:26 +00:00
$ apt-get install libssl-dev pkg-config
2016-08-27 04:51:06 +00:00
```
2015-10-18 20:45:31 +00:00
## Testing
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
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`.
2019-12-14 15:33:43 +00:00
- Default tests
2015-10-18 20:45:31 +00:00
2022-08-03 11:04:07 +00:00
These are good for running on local systems. They will create sockets for
local tests, but will not attempt to access remote systems. Tests can also
be run from the crate directory, i.e. `client` or `server` and `cargo test`
2015-10-18 20:51:12 +00:00
2019-12-14 15:33:43 +00:00
```shell
just default
2016-08-27 04:51:06 +00:00
```
2015-10-18 20:45:31 +00:00
2019-12-14 15:33:43 +00:00
- Default feature tests
2015-10-18 20:45:31 +00:00
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
Hickory DNS has many features, to quickly test with them or without, there are three targets supported, `default`, `no-default-features`, `all-features`:
2015-10-18 20:51:12 +00:00
2019-12-14 15:33:43 +00:00
```shell
just all-features
2016-08-27 04:51:06 +00:00
```
2019-12-14 15:33:43 +00:00
- Individual feature tests
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
Hickory DNS has many features, each individual feature can be tested in dependently, see individual crates for all their features, here is a not necessarily up to date list: `dns-over-rustls`, `dns-over-https-rustls`, `dns-over-native-tls`, `dns-over-openssl`, `dns-dnssec-openssl`, `dns-dnssec-openssl`, `dns-dnssec-ring`, `mdns`. Each feature can be tested with itself as the task target for `just`:
2019-12-14 15:33:43 +00:00
```shell
just dns-over-https-rustls
2016-08-27 04:51:06 +00:00
```
2015-10-18 20:45:31 +00:00
2022-02-26 15:31:11 +00:00
- Benchmarks
2015-10-18 20:45:31 +00:00
2022-08-03 11:04:07 +00:00
Waiting on benchmarks to stabilize in mainline Rust.
2015-10-18 20:45:31 +00:00
## Building
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
- Production build, from the `hickory-dns` base dir, to get all features, just pass the `--all-features` flag.
2015-10-18 20:51:12 +00:00
2019-12-14 15:33:43 +00:00
```shell
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
cargo build --release -p hickory-dns
2016-08-27 04:51:06 +00:00
```
2015-10-18 20:45:31 +00:00
## Running
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
Warning: Hickory DNS is still under development, running in production is not
2015-10-18 20:45:31 +00:00
recommended. The server is currently only single-threaded, it is non-blocking
so this should allow it to work with most internal loads.
2022-02-26 15:31:11 +00:00
- Verify the version
2015-10-18 20:51:12 +00:00
2019-12-14 15:33:43 +00:00
```shell
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
./target/release/hickory-dns --version
2016-08-27 04:51:06 +00:00
```
2015-10-18 20:45:31 +00:00
2022-02-26 15:31:11 +00:00
- Get help
2015-10-18 20:51:12 +00:00
2019-12-14 15:33:43 +00:00
```shell
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
./target/release/hickory-dns --help
```
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
- Launch `hickory-dns` server with test config
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
You may want not passing the `-p` parameter will run on default DNS ports. For the tls features, there are also port options for those, see `hickory-dns --help`
2019-12-14 15:33:43 +00:00
```shell
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
./target/release/hickory-dns -c ./tests/test-data/test_configs/example.toml -z ./tests/test-data/test_configs/ -p 24141
```
2022-02-26 15:31:11 +00:00
- Query the just launched server with `dig`
2019-12-14 15:33:43 +00:00
```shell
2022-02-26 15:31:11 +00:00
dig @127.0.0.1 -p 24141 www.example.com
2016-08-27 04:51:06 +00:00
```
2015-08-14 23:28:01 +00:00
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
## Using the hickory-resolver CLI
2020-09-20 20:46:05 +00:00
Available in `0.20`
```shell
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
cargo install --bin resolve hickory-util
2020-09-20 20:46:05 +00:00
```
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
Or from source, in the hickory-dns directory
2020-09-20 20:46:05 +00:00
```shell
2022-02-26 15:31:11 +00:00
cargo install --bin resolve --path util
2020-09-20 20:46:05 +00:00
```
2022-02-26 15:31:11 +00:00
example:
2020-09-20 20:46:05 +00:00
```shell
$ 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
2024-04-19 16:35:41 +00:00
www.example.com. 21063 IN A 93.184.215.14
2020-09-20 20:46:05 +00:00
```
2018-04-15 17:48:19 +00:00
## Using as a dependency and custom features
The Client has a few features which can be disabled for different reasons when embedding in other software.
2018-04-15 17:48:19 +00:00
- `dnssec-openssl`
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
It is a default feature, so default-features will need to be set to false (this will disable all other default features in hickory-dns). Until there are other crypto libraries supported, this will also disable DNSSEC validation. The functions will still exist, but will always return errors on validation. The below example line will disable all default features and enable OpenSSL, remove `"openssl"` to remove the dependency on OpenSSL.
2018-04-15 17:48:19 +00:00
- `dnssec-ring`
2022-12-15 14:40:55 +00:00
Ring support can be used for RSA and ED25519 DNSSEC validation.
2018-04-15 17:48:19 +00:00
- `dns-over-native-tls`
2022-08-03 11:04:07 +00:00
Uses `native-tls` for DNS-over-TLS implementation, only supported in client and resolver, not server.
2022-02-26 15:31:11 +00:00
2018-04-15 17:48:19 +00:00
- `dns-over-openssl`
2022-08-03 11:04:07 +00:00
Uses `openssl` for DNS-over-TLS implementation supported in server and client, resolver does not have default CA chains.
2018-04-15 17:48:19 +00:00
- `dns-over-rustls`
2022-08-03 11:04:07 +00:00
Uses `rustls` for DNS-over-TLS implementation, only supported in client and resolver, not server. This is the best option where a pure Rust toolchain is desired. Supported in client, resolver, and server.
2019-12-14 15:33:43 +00:00
- `dns-over-https-rustls`
2022-08-03 11:04:07 +00:00
Uses `rustls` for DNS-over-HTTPS (and DNS-over-TLS will be enabled) implementation, only supported in client, resolver, and server. This is the best option where a pure Rust toolchain is desired.
2018-04-15 17:48:19 +00:00
2022-08-03 11:04:07 +00:00
- `mdns` _EXPERIMENTAL_
Enables the experimental mDNS features as well as DNS-SD. This currently has known issues.
2018-04-15 17:48:19 +00:00
Using custom features in dependencies:
```
[dependencies]
...
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
hickory-dns = { version = "*", default-features = false, features = ["dnssec-openssl"] }
```
2018-04-15 17:48:19 +00:00
Using custom features during build:
```console
$> cargo build --release --features dns-over-rustls
...
```
2019-06-17 06:49:59 +00:00
## FAQ
2015-08-14 23:28:01 +00:00
2022-02-26 15:31:11 +00:00
- Why are you building another DNS server?
2015-08-14 23:28:01 +00:00
2022-08-03 11:04:07 +00:00
Because of all the security advisories out there for BIND.
Using Rust semantics it should be possible to develop a high performance and
safe DNS Server that is more resilient to attacks.
2022-04-08 02:11:31 +00:00
- What is the MSRV (minimum stable Rust version) policy?
Prepare 0.24 release with branding change to Hickory DNS (#2054) * update all READMEs with notices about the name change * update changelog for 0.24 * bump crate versions to 0.24 * update version notice information * update readmes to back reference trust-dns * rename all crates to hickory counterparts * replace all Trust-DNS references in code and comments with Hickory DNS * rename all Trust-DNS references to Hickory DNS in non-code * rename all trust-dns-resolver references to hickory-resolver * rename all trust-dns-client references to hickory-client * rename all trust-dns-proto references to hickory-proto * rename all trust-dns-server references to hickory-server * rename all trust-dns-compatibility references to hickory-compatability * rename all trust-dns-integration references to hickory-integration * rename all trust-dns-util references to hickory-util * Update MIT licenses to reference Hickory DNS * update all trust-dns references to hickory-dns * update all bluejekyll github references to hickorydns org * Update name in Changelog * make sure hickory-dns logs during tests * add changelogs for recent main additions * fix references to trust-dns and hickory in architecture * update a few trust-dns references in READMEs * fixup some dangling trust_dns references * replace fka with formerly in change log * replace all hickoydns org references to hickory-dns * replace all http links with https * update logos * update hickorydns to hickory-dns for all other org references * fix Notices of Trust-DNS to Hickory in each Readme
2023-10-14 01:39:28 +00:00
Hickory DNS will work to support backward compatibility with three Rust versions.
2022-08-03 11:04:07 +00:00
For example, if `1.50` is the current release, then the MSRV will be `1.47`. The
version is only increased as necessary, so it's possible that the MSRV is older
than this policy states. Additionally, the MSRV is only supported for the `no-default-features`
build due to it being an intractable issue of trying to enforce this policy on dependencies.
2022-04-08 02:11:31 +00:00
2019-06-17 06:49:59 +00:00
## Community
2019-06-17 14:09:10 +00:00
For live discussions beyond this repository, please see this [Discord](https://discord.gg/89nxE4n).
2019-06-17 06:49:59 +00:00
## License
Licensed under either of
2022-02-26 15:31:11 +00:00
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <https://www.apache.org/licenses/LICENSE-2.0>)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or <https://opensource.org/licenses/MIT>)
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.