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
This commit is contained in:
Benjamin Fry 2023-10-13 21:39:28 -04:00 committed by GitHub
parent dac1009503
commit 408d0baca0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
369 changed files with 2241 additions and 1905 deletions

View File

@ -67,7 +67,7 @@ jobs:
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
verbose: true verbose: true
#files: target/llvm-cov-target/trust-dns-coverage.json #files: target/llvm-cov-target/hickory-dns-coverage.json
## Work through all of the variations of the different features, only on linux to save concurrent resources ## Work through all of the variations of the different features, only on linux to save concurrent resources
exhaustive-features-matrix: exhaustive-features-matrix:

View File

@ -1,6 +1,6 @@
# Architecture of Trust-DNS # Architecture of Hickory DNS
The Trust-DNS libraries are built from the ground up to be asynchronous. This project grew from first using non-blocking IO interfaces (before Futures 0.1 or async/await had landed in Rust). There are some artifacts of this history sporadically left around the project. Please feel free to submit PRs that clean up areas that still have hand-written Futures based state-machines. Additionally, much of the project was written by @bluejekyll while he learned the Rust languagethis means that there may be patterns or missing common implementations in places where he didn't know better. Feel free to clean that up if you feel open to submitting a PR. The Hickory DNS libraries are built from the ground up to be asynchronous. This project grew from first using non-blocking IO interfaces (before Futures 0.1 or async/await had landed in Rust). There are some artifacts of this history sporadically left around the project. Please feel free to submit PRs that clean up areas that still have hand-written Futures based state-machines. Additionally, much of the project was written by @bluejekyll while he learned the Rust languagethis means that there may be patterns or missing common implementations in places where he didn't know better. Feel free to clean that up if you feel open to submitting a PR.
## Layout ## Layout
@ -8,27 +8,28 @@ Most of the project is in the form of crates. The crates are all individually pu
The project has these high-level crates (to be used as dependencies in other projects): The project has these high-level crates (to be used as dependencies in other projects):
- **[trust-dns-resolver](crates/resolver)** - implements a stub-resolver with support for CNAME chasing and other things, abstract over runtimes (Tokio supported by default) - **[hickory-resolver](crates/resolver)** - implements a stub-resolver with support for CNAME chasing and other things, abstract over runtimes (Tokio supported by default)
- **[async-std-resolver](crates/async-std-resolver)** - an abstraction of trust-dns-resolver using the async-std runtime - **[async-std-resolver](crates/async-std-resolver)** - an abstraction of hickory-resolver using the async-std runtime
- **[trust-dns-client](crates/client)** - a bare-bones client crate, most useful for dynamic DNS updates - **[hickory-client](crates/client)** - a bare-bones client crate, most useful for dynamic DNS updates
- **[trust-dns-server](crates/server)** - implements support for hosted Authorities of various types - **[hickory-server](crates/server)** - implements support for hosted Authorities of various types
- **tokio-resolver** - (under consideration, currently Tokio support is directly in trust-dns-resolver) - **tokio-resolver** - (under consideration, currently Tokio support is directly in hickory-resolver)
Low-level crates supporting the above high-level crates: Low-level crates supporting the above high-level crates:
- **[trust-dns-proto](crates/proto)** - the lowest level crate, implements the basics of DNS - **[hickory-proto](crates/proto)** - the lowest level crate, implements the basics of DNS
Binaries: Binaries:
- **[trust-dns](bin/)** - server binary, `trust-dns`, for hosting authorities, zones, and/or setting up a forwarder - **[hickory-dns](bin/)** - server binary, `hickory-dns`, for hosting authorities, zones, and/or setting up a forwarder
- **[trust-dns-util](util/)** - helpful utilities, e.g. `resolve` for a CLI resolver, as well as some DNSSEC utilities - **[hickory-util](util/)** - helpful utilities, e.g. `resolve` for a CLI resolver, as well as some DNSSEC utilities
Old and Outdated crates: Old and Outdated crates:
- **[trust-dns-rustls](https://github.com/bluejekyll/trust-dns/tree/v0.21.0/crates/rustls)** - removed in favor of feature in trust-dns-prot0, crate efs in [v0.21.0](https://github.com/bluejekyll/trust-dns/tree/v0.21.0) - **[trust-dns-*](https://github.com/bluejekyll/trust-dns/tree/v0.23.1/)** - removed in favor of features in hickory-proto, crate in [v0.24.0](https://github.com/hickory-dns/hickory-dns/tree/v0.24.0)
- **[trust-dns-openssl](https://github.com/bluejekyll/trust-dns/tree/v0.21.0/crates/openssl)** - removed in favor of feature in trust-dns-prot0, crate efs in [v0.21.0](https://github.com/bluejekyll/trust-dns/tree/v0.21.0) - **[trust-dns-rustls](https://github.com/bluejekyll/trust-dns/tree/v0.21.0/crates/rustls)** - removed in favor of features in hickory-proto, crate in [v0.21.0](https://github.com/hickory-dns/hickory-dns/tree/v0.21.0)
- **[trust-dns-native-tls](https://github.com/bluejekyll/trust-dns/tree/v0.21.0/crates/native-tls)** - removed in favor of feature in trust-dns-prot0, crate efs in [v0.21.0](https://github.com/bluejekyll/trust-dns/tree/v0.21.0) - **[trust-dns-openssl](https://github.com/bluejekyll/trust-dns/tree/v0.21.0/crates/openssl)** - removed in favor of features in hickory-proto, crate in [v0.21.0](https://github.com/hickory-dns/trust-dns/tree/v0.21.0)
- **[trust-dns-https](https://github.com/bluejekyll/trust-dns/tree/v0.21.0/crates/https)** - removed in favor of feature in trust-dns-prot0, crate efs in [v0.21.0](https://github.com/bluejekyll/trust-dns/tree/v0.21.0) - **[trust-dns-native-tls](https://github.com/bluejekyll/trust-dns/tree/v0.21.0/crates/native-tls)** - removed in favor of features in hickory-proto, crate in [v0.21.0](https://github.com/hickory-dns/trust-dns/tree/v0.21.0)
- **[trust-dns-https](https://github.com/bluejekyll/trust-dns/tree/v0.21.0/crates/https)** - removed in favor of features in hickory-proto, crate in [v0.21.0](https://github.com/hickory-dns/trust-dns/tree/v0.21.0)
## TBD ## TBD

View File

@ -1,11 +1,46 @@
# Change Log: Trust-DNS # Change Log: Hickory DNS (formerly, Trust-DNS)
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/). This project adheres to [Semantic Versioning](https://semver.org/).
All notes should be prepended with the location of the change, e.g. `(proto)` or `(resolver)`. All notes should be prepended with the location of the change, e.g. `(proto)` or `(resolver)`.
## 0.23.1 ## 0.24.0
**NOTICE** This project has been rebranded to Hickory DNS and has been moved to the https://github.com/hickory-dns/hickory-dns organization and repo, from 0.24.0 onward.
### Changed
- (proto) Make DnsHandle::send &self instead of &mut self #2018 by ibigbug
- (all) Update dependencies (avoid vulnerability), optional TOML, remove unused dependencies #2028 by djc
- (server) Privatize the Lexer API #2040 by djc
- (server) Use consistent error type for read_system_conf() #2047 by djc
- (server) Optimized shutdown_gracefully() #2041 by caobug
### Added
- (server) add register with rustls server config #2004 by yaotthaha
- (all) Add webpki-roots and native-certs crate features #2005 by daxpedda
- (bin) add run-example target to justfile to simply start trust-dns for manual testing #2020 by bluejekyll
- (all) DoH3 support #1987 by daxpedda
### Fixed
- (bin) Add root certificates to the binary crate #2059 by daxpedda
- (proto) proto/rr: do not deserialize ClientSubnets with invalid prefixes #2057 by 00xc
- (resolver) Fix the resolver version warning in the workspace #2013 by bluejekyll
- (proto) Forward serde-config feature to the proto crate #2019 by cetanu
- (server) Prevent task reaping from blocking #2023 by lpraneis
- (proto) Dont panic on nsec without dnssec #2025 by bluejekyll
- (server) Spawn H2 Data frame processing into a separate task #2033 by yaroslavros
- (proto) DoQ default configuration #2036 by daxpedda
- (resolver) caching bug when CNAME leads to negative response #2053 by Clendenin
### Removed
- (resolver) Remove Copy from ResolverOpts #2029 by daxpedda
## 0.23.1, NOTE: Before this point the project was formerly known as Trust-DNS
### Changed ### Changed

View File

@ -1,4 +1,4 @@
# Contributing to Trust-DNS # Contributing to Hickory DNS
Before contributing, please consider the terms of the licenses (Apache License 2.0 or MIT). We chose these licenses for two reasons: Before contributing, please consider the terms of the licenses (Apache License 2.0 or MIT). We chose these licenses for two reasons:
@ -9,7 +9,7 @@ After ensuring the license options are compatible with the aims of the contribut
## Understanding the design ## Understanding the design
Please read the [Architecture](ARCHITECTURE.md) to understand the general design and layout of the Trust-DNS projects. Please read the [Architecture](ARCHITECTURE.md) to understand the general design and layout of the Hickory DNS projects.
## Submitting PRs ## Submitting PRs
@ -23,7 +23,7 @@ All PRs *must* be passing all tests. Ideally any PR submitted should have more t
## Releases ## Releases
Trust-DNS tries to follow semver versioning semantics. Major versions will not break APIs in a current major revision. If changes are being made to the current `main` branch, double check the current status of the Major release. Until `1.x.x`, all `0.x.x` minor releases are treated as major releases with breaking changes allowed. Releases are performed on an ad-hoc/on-demand basis. Hickory DNS tries to follow semver versioning semantics. Major versions will not break APIs in a current major revision. If changes are being made to the current `main` branch, double check the current status of the Major release. Until `1.x.x`, all `0.x.x` minor releases are treated as major releases with breaking changes allowed. Releases are performed on an ad-hoc/on-demand basis.
*Maintainers*: If changes are needed to previous releases, then there should exist a `release/x.x`. If this does not exist, then go to the previous most recent tag (release) and create a new branch at that tag `release/x.x`, for example the branch `release/0.19`: *Maintainers*: If changes are needed to previous releases, then there should exist a `release/x.x`. If this does not exist, then go to the previous most recent tag (release) and create a new branch at that tag `release/x.x`, for example the branch `release/0.19`:
@ -43,10 +43,10 @@ Releases are somewhat automated. The github action, `publish`, watches for any t
1. Create a new branch like `git checkout -b prepare-0.20.1` 1. Create a new branch like `git checkout -b prepare-0.20.1`
1. Update all Cargo.toml files to the new version, `version = 0.20.1` 1. Update all Cargo.toml files to the new version, `version = 0.20.1`
1. Update dependencies, `cargo update` 1. Update dependencies, `cargo update`
1. Update all inter-dependent crates, i.e. trust-dns-resolver to use `trust-dns-proto = 0.20.1` 1. Update all inter-dependent crates, i.e. hickory-resolver to use `hickory-proto = 0.20.1`
1. Update [CHANGELOG.md](CHANGELOG.md) to include all PR's (of consequence) since the previous release 1. Update [CHANGELOG.md](CHANGELOG.md) to include all PR's (of consequence) since the previous release
1. Push to Github, create a PR and merge in `main` or the target release branch. 1. Push to Github, create a PR and merge in `main` or the target release branch.
1. Go to [Releases](https://github.com/bluejekyll/trust-dns/releases) and `Draft a new release` 1. Go to [Releases](https://github.com/hickory-dns/hickory-dns/releases) and `Draft a new release`
1. Give it a `Tag Version` of `vX.x.x`, e.g. `v0.20.1`, *make sure this is tagging the correct branch, e.g. `main` or `release/0.19`* 1. Give it a `Tag Version` of `vX.x.x`, e.g. `v0.20.1`, *make sure this is tagging the correct branch, e.g. `main` or `release/0.19`*
1. Give it a `Release Title` of something key to the release 1. Give it a `Release Title` of something key to the release
1. Copy and pase the part of the CHANGELOG.md for this release into `Describe this release` 1. Copy and pase the part of the CHANGELOG.md for this release into `Describe this release`
@ -78,4 +78,4 @@ Yes! There is no formal process, and generally it's a goal to open up to anyone
## Thank you! ## Thank you!
Seriously, thank you for contributing to this project. Trust-DNS would not be where it is today without the support of contributors like you. Seriously, thank you for contributing to this project. Hickory DNS would not be where it is today without the support of contributors like you.

448
Cargo.lock generated
View File

@ -230,15 +230,15 @@ dependencies = [
[[package]] [[package]]
name = "async-std-resolver" name = "async-std-resolver"
version = "0.23.1" version = "0.24.0"
dependencies = [ dependencies = [
"async-std", "async-std",
"async-trait", "async-trait",
"futures-io", "futures-io",
"futures-util", "futures-util",
"hickory-resolver",
"pin-utils", "pin-utils",
"socket2 0.5.4", "socket2 0.5.4",
"trust-dns-resolver",
] ]
[[package]] [[package]]
@ -789,6 +789,228 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
[[package]]
name = "hickory-client"
version = "0.24.0"
dependencies = [
"cfg-if",
"data-encoding",
"futures",
"futures-channel",
"futures-util",
"hickory-proto",
"once_cell",
"openssl",
"radix_trie",
"rand",
"rustls",
"serde",
"thiserror",
"tokio",
"tracing",
"tracing-subscriber",
]
[[package]]
name = "hickory-compatibility"
version = "0.24.0"
dependencies = [
"data-encoding",
"futures",
"hickory-client",
"openssl",
"rand",
"time",
]
[[package]]
name = "hickory-dns"
version = "0.24.0"
dependencies = [
"clap",
"futures-util",
"hickory-client",
"hickory-proto",
"hickory-resolver",
"hickory-server",
"native-tls",
"regex",
"rustls",
"time",
"tokio",
"tracing",
"tracing-subscriber",
"webpki-roots",
]
[[package]]
name = "hickory-integration"
version = "0.24.0"
dependencies = [
"async-trait",
"futures",
"hickory-client",
"hickory-proto",
"hickory-resolver",
"hickory-server",
"once_cell",
"openssl",
"rand",
"rusqlite",
"rustls",
"time",
"tokio",
"tracing",
"tracing-subscriber",
"webpki-roots",
]
[[package]]
name = "hickory-proto"
version = "0.24.0"
dependencies = [
"async-trait",
"backtrace",
"bytes",
"cfg-if",
"data-encoding",
"enum-as-inner",
"futures-channel",
"futures-executor",
"futures-io",
"futures-util",
"h2",
"h3",
"h3-quinn",
"http",
"idna",
"ipnet",
"js-sys",
"native-tls",
"once_cell",
"openssl",
"quinn",
"rand",
"ring",
"rustls",
"rustls-native-certs",
"rustls-pemfile",
"serde",
"socket2 0.5.4",
"thiserror",
"tinyvec",
"tokio",
"tokio-native-tls",
"tokio-openssl",
"tokio-rustls",
"tracing",
"tracing-subscriber",
"url",
"wasm-bindgen",
"webpki-roots",
]
[[package]]
name = "hickory-recursor"
version = "0.24.0"
dependencies = [
"async-recursion",
"async-trait",
"bytes",
"cfg-if",
"enum-as-inner",
"futures-util",
"hickory-proto",
"hickory-resolver",
"lru-cache",
"parking_lot",
"serde",
"thiserror",
"tokio",
"tracing",
"tracing-subscriber",
]
[[package]]
name = "hickory-resolver"
version = "0.24.0"
dependencies = [
"cfg-if",
"futures-executor",
"futures-util",
"hickory-proto",
"ipconfig",
"lru-cache",
"once_cell",
"parking_lot",
"rand",
"resolv-conf",
"rustls",
"rustls-native-certs",
"serde",
"smallvec",
"thiserror",
"tokio",
"tokio-native-tls",
"tokio-openssl",
"tokio-rustls",
"tracing",
"tracing-subscriber",
"webpki-roots",
]
[[package]]
name = "hickory-server"
version = "0.24.0"
dependencies = [
"async-trait",
"basic-toml",
"bytes",
"cfg-if",
"enum-as-inner",
"futures-executor",
"futures-util",
"h2",
"h3",
"h3-quinn",
"hickory-proto",
"hickory-recursor",
"hickory-resolver",
"http",
"openssl",
"rusqlite",
"rustls",
"serde",
"thiserror",
"time",
"tokio",
"tokio-openssl",
"tokio-rustls",
"tokio-util",
"tracing",
"tracing-subscriber",
]
[[package]]
name = "hickory-util"
version = "0.24.0"
dependencies = [
"clap",
"console",
"data-encoding",
"hickory-client",
"hickory-proto",
"hickory-recursor",
"hickory-resolver",
"openssl",
"rustls",
"rustls-native-certs",
"tokio",
"tracing",
"tracing-subscriber",
"webpki-roots",
]
[[package]] [[package]]
name = "hostname" name = "hostname"
version = "0.3.1" version = "0.3.1"
@ -1886,228 +2108,6 @@ dependencies = [
"tracing-log", "tracing-log",
] ]
[[package]]
name = "trust-dns"
version = "0.23.1"
dependencies = [
"clap",
"futures-util",
"native-tls",
"regex",
"rustls",
"time",
"tokio",
"tracing",
"tracing-subscriber",
"trust-dns-client",
"trust-dns-proto",
"trust-dns-resolver",
"trust-dns-server",
"webpki-roots",
]
[[package]]
name = "trust-dns-client"
version = "0.23.1"
dependencies = [
"cfg-if",
"data-encoding",
"futures",
"futures-channel",
"futures-util",
"once_cell",
"openssl",
"radix_trie",
"rand",
"rustls",
"serde",
"thiserror",
"tokio",
"tracing",
"tracing-subscriber",
"trust-dns-proto",
]
[[package]]
name = "trust-dns-compatibility"
version = "0.23.1"
dependencies = [
"data-encoding",
"futures",
"openssl",
"rand",
"time",
"trust-dns-client",
]
[[package]]
name = "trust-dns-integration"
version = "0.23.1"
dependencies = [
"async-trait",
"futures",
"once_cell",
"openssl",
"rand",
"rusqlite",
"rustls",
"time",
"tokio",
"tracing",
"tracing-subscriber",
"trust-dns-client",
"trust-dns-proto",
"trust-dns-resolver",
"trust-dns-server",
"webpki-roots",
]
[[package]]
name = "trust-dns-proto"
version = "0.23.1"
dependencies = [
"async-trait",
"backtrace",
"bytes",
"cfg-if",
"data-encoding",
"enum-as-inner",
"futures-channel",
"futures-executor",
"futures-io",
"futures-util",
"h2",
"h3",
"h3-quinn",
"http",
"idna",
"ipnet",
"js-sys",
"native-tls",
"once_cell",
"openssl",
"quinn",
"rand",
"ring",
"rustls",
"rustls-native-certs",
"rustls-pemfile",
"serde",
"socket2 0.5.4",
"thiserror",
"tinyvec",
"tokio",
"tokio-native-tls",
"tokio-openssl",
"tokio-rustls",
"tracing",
"tracing-subscriber",
"url",
"wasm-bindgen",
"webpki-roots",
]
[[package]]
name = "trust-dns-recursor"
version = "0.23.1"
dependencies = [
"async-recursion",
"async-trait",
"bytes",
"cfg-if",
"enum-as-inner",
"futures-util",
"lru-cache",
"parking_lot",
"serde",
"thiserror",
"tokio",
"tracing",
"tracing-subscriber",
"trust-dns-proto",
"trust-dns-resolver",
]
[[package]]
name = "trust-dns-resolver"
version = "0.23.1"
dependencies = [
"cfg-if",
"futures-executor",
"futures-util",
"ipconfig",
"lru-cache",
"once_cell",
"parking_lot",
"rand",
"resolv-conf",
"rustls",
"rustls-native-certs",
"serde",
"smallvec",
"thiserror",
"tokio",
"tokio-native-tls",
"tokio-openssl",
"tokio-rustls",
"tracing",
"tracing-subscriber",
"trust-dns-proto",
"webpki-roots",
]
[[package]]
name = "trust-dns-server"
version = "0.23.1"
dependencies = [
"async-trait",
"basic-toml",
"bytes",
"cfg-if",
"enum-as-inner",
"futures-executor",
"futures-util",
"h2",
"h3",
"h3-quinn",
"http",
"openssl",
"rusqlite",
"rustls",
"serde",
"thiserror",
"time",
"tokio",
"tokio-openssl",
"tokio-rustls",
"tokio-util",
"tracing",
"tracing-subscriber",
"trust-dns-proto",
"trust-dns-recursor",
"trust-dns-resolver",
]
[[package]]
name = "trust-dns-util"
version = "0.23.1"
dependencies = [
"clap",
"console",
"data-encoding",
"openssl",
"rustls",
"rustls-native-certs",
"tokio",
"tracing",
"tracing-subscriber",
"trust-dns-client",
"trust-dns-proto",
"trust-dns-recursor",
"trust-dns-resolver",
"webpki-roots",
]
[[package]] [[package]]
name = "unicode-bidi" name = "unicode-bidi"
version = "0.3.13" version = "0.3.13"

View File

@ -15,24 +15,24 @@ members = [
exclude = ["fuzz"] exclude = ["fuzz"]
[workspace.package] [workspace.package]
version = "0.23.1" version = "0.24.0"
authors = ["The contributors to Trust-DNS"] authors = ["The contributors to Hickory DNS"]
edition = "2021" edition = "2021"
rust-version = "1.67.0" rust-version = "1.67.0"
homepage = "https://trust-dns.org/" homepage = "https://hickory-dns.org/"
repository = "https://github.com/bluejekyll/trust-dns" repository = "https://github.com/hickory-dns/hickory-dns"
keywords = ["DNS", "BIND", "dig", "named", "dnssec"] keywords = ["DNS", "BIND", "dig", "named", "dnssec"]
categories = ["network-programming"] categories = ["network-programming"]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
[workspace.dependencies] [workspace.dependencies]
# trustdns # hickory
trust-dns-client = { version = "0.23.1", path = "crates/client", default-features = false } hickory-client = { version = "0.24.0", path = "crates/client", default-features = false }
trust-dns-recursor = { version = "0.23.1", path = "crates/recursor", default-features = false } hickory-recursor = { version = "0.24.0", path = "crates/recursor", default-features = false }
trust-dns-resolver = { version = "0.23.1", path = "crates/resolver", default-features = false } hickory-resolver = { version = "0.24.0", path = "crates/resolver", default-features = false }
trust-dns-server = { version = "0.23.1", path = "crates/server", default-features = false } hickory-server = { version = "0.24.0", path = "crates/server", default-features = false }
trust-dns-proto = { version = "0.23.1", path = "crates/proto", default-features = false } hickory-proto = { version = "0.24.0", path = "crates/proto", default-features = false }
# logging # logging

View File

@ -1,6 +1,6 @@
Apache License Apache License
Version 2.0, January 2004 Version 2.0, January 2004
http://www.apache.org/licenses/ https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
@ -192,7 +192,7 @@
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -1,4 +1,4 @@
Copyright (c) 2015 The trust-dns Developers Copyright (c) 2015 The Hickory DNS Developers
Copyright (c) 2017 Google LLC. Copyright (c) 2017 Google LLC.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -1,13 +1,13 @@
[![minimum rustc: 1.67](https://img.shields.io/badge/minimum%20rustc-1.67-green?logo=rust)](https://www.whatrustisit.com) [![minimum rustc: 1.67](https://img.shields.io/badge/minimum%20rustc-1.67-green?logo=rust)](https://www.whatrustisit.com)
[![Build Status](https://github.com/bluejekyll/trust-dns/workflows/test/badge.svg?branch=main)](https://github.com/bluejekyll/trust-dns/actions?query=workflow%3Atest) [![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/bluejekyll/trust-dns/branch/main/graph/badge.svg)](https://codecov.io/gh/bluejekyll/trust-dns) [![codecov](https://codecov.io/gh/hickory-dns/hickory-dns/branch/main/graph/badge.svg)](https://codecov.io/gh/hickory-dns/hickory-dns)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE-MIT) [![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) [![License: Apache 2.0](https://img.shields.io/badge/license-Apache_2.0-blue.svg)](LICENSE-APACHE)
[![Discord](https://img.shields.io/discord/590067103822774272.svg)](https://discord.gg/89nxE4n) [![Discord](https://img.shields.io/discord/590067103822774272.svg)](https://discord.gg/89nxE4n)
![Trust-DNS](logo.svg) ![Hickory DNS](logo.png)
# Trust-DNS # Hickory DNS
A Rust based DNS client, server, and Resolver, built to be safe and secure from the A Rust based DNS client, server, and Resolver, built to be safe and secure from the
ground up. ground up.
@ -16,11 +16,13 @@ This repo consists of multiple crates:
| Library | Description | | Library | Description |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Trust-DNS** | [![](https://img.shields.io/crates/v/trust-dns.svg)](https://crates.io/crates/trust-dns) Binaries for running a DNS authoritative server. | | **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/trust-dns-proto.svg)](https://crates.io/crates/trust-dns-proto) [![trust-dns-proto](https://docs.rs/trust-dns-proto/badge.svg)](https://docs.rs/trust-dns-proto) Raw DNS library, exposes an unstable API and only for use by the other Trust-DNS libraries, not intended for end-user use. | | **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/trust-dns-client.svg)](https://crates.io/crates/trust-dns-client) [![trust-dns-client](https://docs.rs/trust-dns-client/badge.svg)](https://docs.rs/trust-dns-client) Used for sending `query`, `update`, and `notify` messages directly to a DNS server. | | **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/trust-dns-server.svg)](https://crates.io/crates/trust-dns-server) [![trust-dns-server](https://docs.rs/trust-dns-server/badge.svg)](https://docs.rs/trust-dns-server) Use to host DNS records, this also has a `trust-dns` binary for running in a daemon form. | | **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/trust-dns-resolver.svg)](https://crates.io/crates/trust-dns-resolver) [![trust-dns-resolver](https://docs.rs/trust-dns-resolver/badge.svg)](https://docs.rs/trust-dns-resolver) Utilizes the client library to perform DNS resolution. Can be used in place of the standard OS resolution facilities. | | **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.
# Goals # Goals
@ -36,13 +38,13 @@ This repo consists of multiple crates:
## Resolver ## Resolver
The Trust-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. 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.
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. 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 ## Client
The Trust-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. 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.
### Unique client side implementations ### Unique client side implementations
@ -51,14 +53,14 @@ as high level interfaces, which is a bit more rare.
| Feature | Description | | Feature | Description |
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [SyncDnssecClient](https://docs.rs/trust-dns-client/latest/trust_dns_client/client/struct.SyncDnssecClient.html) | DNSSEC validation | | [SyncDnssecClient](https://docs.rs/hickory-client/latest/hickory_client/client/struct.SyncDnssecClient.html) | DNSSEC validation |
| [create](https://docs.rs/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.create) | atomic create of a record, with authenticated request | | [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.append) | verify existence of a record and append to it | | [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.compare_and_swap) | atomic (depends on server) compare and swap | | [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.delete_by_rdata) | delete a specific record | | [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.delete_rrset) | delete an entire record set | | [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.delete_all) | delete all records sets with a given name | | [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.notify) | notify server that it should reload a zone | | [notify](https://docs.rs/hickory-client/latest/hickory_client/client/trait.Client.html#method.notify) | notify server that it should reload a zone |
## Server ## Server
@ -87,7 +89,7 @@ a restart of the server process.
### DNS-over-TLS and DNS-over-HTTPS on the Server ### DNS-over-TLS and DNS-over-HTTPS on the Server
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/bluejekyll/trust-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. 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.
## DNS-over-TLS and DNS-over-HTTPS ## DNS-over-TLS and DNS-over-HTTPS
@ -166,10 +168,10 @@ Zones will be automatically resigned on any record updates via dynamic DNS. To e
# Usage # Usage
This assumes that you have [Rust](https://www.rust-lang.org) stable installed. These This assumes that you have [Rust](https://www.rust-lang.org) stable installed. These
presume that the trust-dns repos have already been synced to the local system: presume that the hickory-dns repos have already been synced to the local system:
git clone https://github.com/bluejekyll/trust-dns.git git clone https://github.com/hickory-dns/hickory-dns.git
cd trust-dns cd hickory-dns
## Prerequisites ## Prerequisites
@ -197,7 +199,7 @@ presume that the trust-dns repos have already been synced to the local system:
## Testing ## Testing
Trust-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`. 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`.
- Default tests - Default tests
@ -211,7 +213,7 @@ just default
- Default feature tests - Default feature tests
Trust-DNS has many features, to quickly test with them or without, there are three targets supported, `default`, `no-default-features`, `all-features`: Hickory DNS has many features, to quickly test with them or without, there are three targets supported, `default`, `no-default-features`, `all-features`:
```shell ```shell
just all-features just all-features
@ -219,7 +221,7 @@ just all-features
- Individual feature tests - Individual feature tests
Trust-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`: 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`:
```shell ```shell
just dns-over-https-rustls just dns-over-https-rustls
@ -231,36 +233,36 @@ just dns-over-https-rustls
## Building ## Building
- Production build, from the `trust-dns` base dir, to get all features, just pass the `--all-features` flag. - Production build, from the `hickory-dns` base dir, to get all features, just pass the `--all-features` flag.
```shell ```shell
cargo build --release -p trust-dns cargo build --release -p hickory-dns
``` ```
## Running ## Running
Warning: Trust-DNS is still under development, running in production is not Warning: Hickory DNS is still under development, running in production is not
recommended. The server is currently only single-threaded, it is non-blocking recommended. The server is currently only single-threaded, it is non-blocking
so this should allow it to work with most internal loads. so this should allow it to work with most internal loads.
- Verify the version - Verify the version
```shell ```shell
./target/release/trust-dns --version ./target/release/hickory-dns --version
``` ```
- Get help - Get help
```shell ```shell
./target/release/trust-dns --help ./target/release/hickory-dns --help
``` ```
- Launch `trust-dns` server with test config - Launch `hickory-dns` server with test config
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 `trust-dns --help` 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`
```shell ```shell
./target/release/trust-dns -c ./tests/test-data/test_configs/example.toml -z ./tests/test-data/test_configs/ -p 24141 ./target/release/hickory-dns -c ./tests/test-data/test_configs/example.toml -z ./tests/test-data/test_configs/ -p 24141
``` ```
- Query the just launched server with `dig` - Query the just launched server with `dig`
@ -269,15 +271,15 @@ You may want not passing the `-p` parameter will run on default DNS ports. For t
dig @127.0.0.1 -p 24141 www.example.com dig @127.0.0.1 -p 24141 www.example.com
``` ```
## Using the trust-dns-resolver CLI ## Using the hickory-resolver CLI
Available in `0.20` Available in `0.20`
```shell ```shell
cargo install --bin resolve trust-dns-util cargo install --bin resolve hickory-util
``` ```
Or from source, in the trust-dns directory Or from source, in the hickory-dns directory
```shell ```shell
cargo install --bin resolve --path util cargo install --bin resolve --path util
@ -297,7 +299,7 @@ Success for query name: www.example.com. type: A class: IN
The Client has a few features which can be disabled for different reasons when embedding in other software. The Client has a few features which can be disabled for different reasons when embedding in other software.
- `dnssec-openssl` - `dnssec-openssl`
It is a default feature, so default-features will need to be set to false (this will disable all other default features in trust-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. 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.
- `dnssec-ring` - `dnssec-ring`
Ring support can be used for RSA and ED25519 DNSSEC validation. Ring support can be used for RSA and ED25519 DNSSEC validation.
@ -322,7 +324,7 @@ Using custom features in dependencies:
``` ```
[dependencies] [dependencies]
... ...
trust-dns = { version = "*", default-features = false, features = ["dnssec-openssl"] } hickory-dns = { version = "*", default-features = false, features = ["dnssec-openssl"] }
``` ```
Using custom features during build: Using custom features during build:
@ -343,7 +345,7 @@ $> cargo build --release --features dns-over-rustls
- What is the MSRV (minimum stable Rust version) policy? - What is the MSRV (minimum stable Rust version) policy?
Trust-DNS will work to support backward compatibility with three Rust versions. Hickory DNS will work to support backward compatibility with three Rust versions.
For example, if `1.50` is the current release, then the MSRV will be `1.47`. The 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 version is only increased as necessary, so it's possible that the MSRV is older

View File

@ -1,19 +1,19 @@
[package] [package]
name = "trust-dns" name = "hickory-dns"
# A short blurb about the package. This is not rendered in any format when # A short blurb about the package. This is not rendered in any format when
# uploaded to crates.io (aka this is not markdown) # uploaded to crates.io (aka this is not markdown)
description = """ description = """
Trust-DNS is a safe and secure DNS server with DNSSEC support. Hickory DNS is a safe and secure DNS server with DNSSEC support.
Eventually this could be a replacement for BIND9. The DNSSEC support allows Eventually this could be a replacement for BIND9. The DNSSEC support allows
for live signing of all records, in it does not currently support for live signing of all records, in it does not currently support
records signed offline. The server supports dynamic DNS with SIG0 authenticated records signed offline. The server supports dynamic DNS with SIG0 authenticated
requests. Trust-DNS is based on the Tokio and Futures libraries, which means requests. Hickory DNS is based on the Tokio and Futures libraries, which means
it should be easily integrated into other software that also use those it should be easily integrated into other software that also use those
libraries. libraries.
""" """
documentation = "https://docs.rs/trust-dns-server" documentation = "https://docs.rs/hickory-dns"
readme = "README.md" readme = "README.md"
version.workspace = true version.workspace = true
@ -27,30 +27,63 @@ categories.workspace = true
license.workspace = true license.workspace = true
[badges] [badges]
#github-actions = { repository = "bluejekyll/trust-dns", branch = "main", workflow = "test" } #github-actions = { repository = "bluejekyll/hickory", branch = "main", workflow = "test" }
codecov = { repository = "bluejekyll/trust-dns", branch = "main", service = "github" } codecov = { repository = "hickory-dns/hickory-dns", branch = "main", service = "github" }
maintenance = { status = "actively-developed" } maintenance = { status = "actively-developed" }
[features] [features]
default = ["sqlite", "resolver", "native-certs"] default = ["sqlite", "resolver", "native-certs", "ascii-art"]
dnssec-openssl = ["dnssec", "trust-dns-client/dnssec-openssl", "trust-dns-proto/dnssec-openssl", "trust-dns-server/dnssec-openssl"]
dnssec-ring = ["dnssec", "trust-dns-client/dnssec-ring", "trust-dns-proto/dnssec-ring", "trust-dns-server/dnssec-ring"] # if enabled, the hickory-dns binary will print ascii-art on start, disable to reduce the binary size
ascii-art = []
dnssec-openssl = [
"dnssec",
"hickory-client/dnssec-openssl",
"hickory-proto/dnssec-openssl",
"hickory-server/dnssec-openssl",
]
dnssec-ring = [
"dnssec",
"hickory-client/dnssec-ring",
"hickory-proto/dnssec-ring",
"hickory-server/dnssec-ring",
]
dnssec = [] dnssec = []
recursor = ["trust-dns-server/recursor"] recursor = ["hickory-server/recursor"]
# Recursive Resolution is Experimental! # Recursive Resolution is Experimental!
resolver = ["trust-dns-server/resolver"] resolver = ["hickory-server/resolver"]
sqlite = ["trust-dns-server/sqlite"] sqlite = ["hickory-server/sqlite"]
# TODO: Need to figure out how to be consistent with ring/openssl usage... # TODO: Need to figure out how to be consistent with ring/openssl usage...
# dns-over-https-openssl = ["dns-over-openssl", "trust-dns-client/dns-over-https-openssl", "dns-over-https"] # dns-over-https-openssl = ["dns-over-openssl", "hickory-client/dns-over-https-openssl", "dns-over-https"]
dns-over-https-rustls = ["dns-over-https", "dns-over-rustls", "trust-dns-proto/dns-over-https-rustls", "trust-dns-client/dns-over-https-rustls", "trust-dns-server/dns-over-https-rustls"] dns-over-https-rustls = [
dns-over-https = ["trust-dns-server/dns-over-https"] "dns-over-https",
dns-over-quic = ["dns-over-rustls", "trust-dns-server/dns-over-quic"] "dns-over-rustls",
dns-over-h3 = ["dns-over-rustls", "trust-dns-server/dns-over-h3"] "hickory-proto/dns-over-https-rustls",
"hickory-client/dns-over-https-rustls",
"hickory-server/dns-over-https-rustls",
]
dns-over-https = ["hickory-server/dns-over-https"]
dns-over-quic = ["dns-over-rustls", "hickory-server/dns-over-quic"]
dns-over-h3 = ["dns-over-rustls", "hickory-server/dns-over-h3"]
# TODO: migrate all tls and tls-openssl features to dns-over-tls, et al # TODO: migrate all tls and tls-openssl features to dns-over-tls, et al
dns-over-openssl = ["dns-over-tls", "dnssec-openssl", "trust-dns-proto/dns-over-openssl", "trust-dns-client/dns-over-openssl", "trust-dns-server/dns-over-openssl"] dns-over-openssl = [
dns-over-rustls = ["dns-over-tls", "dnssec-ring", "rustls", "trust-dns-proto/dns-over-rustls", "trust-dns-client/dns-over-rustls", "trust-dns-server/dns-over-rustls"] "dns-over-tls",
"dnssec-openssl",
"hickory-proto/dns-over-openssl",
"hickory-client/dns-over-openssl",
"hickory-server/dns-over-openssl",
]
dns-over-rustls = [
"dns-over-tls",
"dnssec-ring",
"rustls",
"hickory-proto/dns-over-rustls",
"hickory-client/dns-over-rustls",
"hickory-server/dns-over-rustls",
]
dns-over-tls = [] dns-over-tls = []
# This is a deprecated feature... # This is a deprecated feature...
@ -58,34 +91,49 @@ tls-openssl = ["dns-over-openssl"]
tls = ["dns-over-openssl"] tls = ["dns-over-openssl"]
# WARNING: there is a bug in the mutual tls auth code at the moment see issue #100 # WARNING: there is a bug in the mutual tls auth code at the moment see issue #100
# mtls = ["trust-dns-client/mtls"] # mtls = ["hickory-client/mtls"]
webpki-roots = ["trust-dns-client/webpki-roots"] webpki-roots = ["hickory-client/webpki-roots"]
native-certs = ["trust-dns-client/native-certs"] native-certs = ["hickory-client/native-certs"]
[[bin]] [[bin]]
name = "trust-dns" name = "hickory-dns"
path = "src/trust-dns.rs" path = "src/hickory-dns.rs"
[dependencies] [dependencies]
# clap features: # clap features:
# - suggestion for advanced help with error in cli # - suggestion for advanced help with error in cli
# - derive for clap derive api # - derive for clap derive api
# - help to generate --help # - help to generate --help
clap = { workspace = true, default-features = false, features = ["std", "cargo", "help", "derive", "suggestions"] } clap = { workspace = true, default-features = false, features = [
futures-util = { workspace = true, default-features = false, features = ["std"] } "std",
"cargo",
"help",
"derive",
"suggestions",
] }
futures-util = { workspace = true, default-features = false, features = [
"std",
] }
rustls = { workspace = true, optional = true } rustls = { workspace = true, optional = true }
time.workspace = true time.workspace = true
tracing.workspace = true tracing.workspace = true
tracing-subscriber = { workspace = true, features = ["std", "fmt", "env-filter"] } tracing-subscriber = { workspace = true, features = [
"std",
"fmt",
"env-filter",
] }
tokio = { workspace = true, features = ["time", "rt"] } tokio = { workspace = true, features = ["time", "rt"] }
trust-dns-client.workspace = true hickory-client.workspace = true
trust-dns-proto.workspace = true hickory-proto.workspace = true
trust-dns-server = { workspace = true, features = ["toml"] } hickory-server = { workspace = true, features = ["toml"] }
[dev-dependencies] [dev-dependencies]
native-tls.workspace = true native-tls.workspace = true
regex.workspace = true regex.workspace = true
trust-dns-proto = { workspace = true, features = ["testing", "dns-over-native-tls"] } hickory-proto = { workspace = true, features = [
trust-dns-resolver.workspace = true "testing",
"dns-over-native-tls",
] }
hickory-resolver.workspace = true
webpki-roots.workspace = true webpki-roots.workspace = true

View File

@ -1,6 +1,6 @@
Apache License Apache License
Version 2.0, January 2004 Version 2.0, January 2004
http://www.apache.org/licenses/ https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
@ -192,7 +192,7 @@
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -1,4 +1,4 @@
Copyright (c) 2015 The trust-dns Developers Copyright (c) 2015 The Hickory DNS Developers
Copyright (c) 2017 Google LLC. Copyright (c) 2017 Google LLC.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -1,22 +1,26 @@
# Overview # Overview
Trust-DNS provides a binary for hosting or forwarding DNS zones. Hickory DNS provides a binary for hosting or forwarding DNS zones.
This a named implementation for DNS zone hosting. It is capable of performing signing all records in the zone for server DNSSEC RRSIG records associated with all records in a zone. There is also a `trust-dns` binary that can be generated from the library with `cargo install trust-dns`. Dynamic updates are supported via `SIG0` (an mTLS authentication method is under development). This a named implementation for DNS zone hosting. It is capable of performing signing all records in the zone for server DNSSEC RRSIG records associated with all records in a zone. There is also a `hickory-dns` binary that can be generated from the library with `cargo install hickory-dns`. Dynamic updates are supported via `SIG0` (an mTLS authentication method is under development).
**NOTICE** This project was rebranded fromt Trust-DNS to Hickory DNS and has been moved to the https://github.com/hickory-dns/hickory-dns organization and repo, this crate/binary has been moved to [hickory-dns](https://crates.io/crates/hickory-dns), from `0.24` and onward, for prior versions see [trust-dns](https://crates.io/crates/trust-dns).
## Features ## Features
- Dynamic Update with sqlite journaling backend (SIG0) - Dynamic Update with sqlite journaling backend (SIG0)
- DNSSEC online signing (NSEC not NSEC3) - DNSSEC online signing (NSEC not NSEC3)
- DNS over TLS (DoT) - DNS over TLS (DoT)
- DNS over HTTPS (DoH) - DNS over HTTPS/2 (DoH)
- DNS over HTTPS/3 (DoH3)
- DNS over Quic (DoQ)
- Forwarding stub resolver - Forwarding stub resolver
- ANAME resolution, for zone mapping aliass to A and AAAA records - ANAME resolution, for zone mapping aliass to A and AAAA records
- Additionals section generation for aliasing record types - Additionals section generation for aliasing record types
## DNS-over-TLS and DNS-over-HTTPS ## DNS-over-TLS and DNS-over-HTTPS
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/bluejekyll/trust-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. 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.
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 only requires valid DoT or DoH resolvers being registered in order to be used. 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 only requires valid DoT or DoH resolvers being registered in order to be used.
@ -48,4 +52,4 @@ The current minimum rustc version for this project is `1.67`
## Versioning ## Versioning
Trust-DNS does it's best job to follow semver. Trust-DNS will be promoted to 1.0 upon stabilization of the publicly exposed APIs. This does not mean that Trust-DNS will necessarily break on upgrades between 0.x updates. Whenever possible, old APIs will be deprecated with notes on what replaced those deprecations. Trust-DNS will make a best effort to never break software which depends on it due to API changes, though this can not be guaranteed. Deprecated interfaces will be maintained for at minimum one major release after that in which they were deprecated (where possible), with the exception of the upgrade to 1.0 where all deprecated interfaces will be planned to be removed. Hickory DNS does it's best job to follow semver. Hickory DNS will be promoted to 1.0 upon stabilization of the publicly exposed APIs. This does not mean that Hickory DNS will necessarily break on upgrades between 0.x updates. Whenever possible, old APIs will be deprecated with notes on what replaced those deprecations. Hickory DNS will make a best effort to never break software which depends on it due to API changes, though this can not be guaranteed. Deprecated interfaces will be maintained for at minimum one major release after that in which they were deprecated (where possible), with the exception of the upgrade to 1.0 where all deprecated interfaces will be planned to be removed.

View File

@ -1,6 +1,6 @@
/* /*
Trust-DNS bench setup: Hickory DNS bench setup:
this is meant to mimic the trust-dns-server config this is meant to mimic the hickory-server config
which is in tests/test-data/test_configs/example.toml which is in tests/test-data/test_configs/example.toml
*/ */

View File

@ -20,15 +20,15 @@ use tokio::net::TcpStream;
use tokio::net::UdpSocket; use tokio::net::UdpSocket;
use tokio::runtime::Runtime; use tokio::runtime::Runtime;
use trust_dns_client::client::*; use hickory_client::client::*;
use trust_dns_client::op::*; use hickory_client::op::*;
use trust_dns_client::rr::*; use hickory_client::rr::*;
use trust_dns_client::tcp::*; use hickory_client::tcp::*;
use trust_dns_client::udp::*; use hickory_client::udp::*;
use trust_dns_proto::error::*; use hickory_proto::error::*;
use trust_dns_proto::iocompat::AsyncIoTokioAsStd; use hickory_proto::iocompat::AsyncIoTokioAsStd;
use trust_dns_proto::op::NoopMessageFinalizer; use hickory_proto::op::NoopMessageFinalizer;
use trust_dns_proto::xfer::*; use hickory_proto::xfer::*;
fn find_test_port() -> u16 { fn find_test_port() -> u16 {
let server = std::net::UdpSocket::bind(("0.0.0.0", 0)).unwrap(); let server = std::net::UdpSocket::bind(("0.0.0.0", 0)).unwrap();
@ -81,12 +81,12 @@ fn wrap_process(named: Child, server_port: u16) -> NamedProcess {
/// Returns a NamedProcess (cleans the process up on drop), and a socket addr for connecting /// Returns a NamedProcess (cleans the process up on drop), and a socket addr for connecting
/// to the server. /// to the server.
fn trust_dns_process() -> (NamedProcess, u16) { fn hickory_process() -> (NamedProcess, u16) {
// find a random port to listen on // find a random port to listen on
let test_port = find_test_port(); let test_port = find_test_port();
let ws_root = env::var("WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned()); let ws_root = env::var("WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned());
let named_path = format!("{}/target/release/trust-dns", ws_root); let named_path = format!("{}/target/release/hickory-dns", ws_root);
let config_path = format!("{}/tests/test-data/test_configs/example.toml", ws_root); let config_path = format!("{}/tests/test-data/test_configs/example.toml", ws_root);
let zone_dir = format!("{}/tests/test-data/test_configs", ws_root); let zone_dir = format!("{}/tests/test-data/test_configs", ws_root);
@ -101,7 +101,7 @@ fn trust_dns_process() -> (NamedProcess, u16) {
.arg(&format!("--zonedir={}", zone_dir)) .arg(&format!("--zonedir={}", zone_dir))
.arg(&format!("--port={}", test_port)) .arg(&format!("--port={}", test_port))
.spawn() .spawn()
.expect("failed to start trust-dns"); .expect("failed to start hickory-dns");
// //
let process = wrap_process(named, test_port); let process = wrap_process(named, test_port);
@ -143,8 +143,8 @@ where
} }
#[bench] #[bench]
fn trust_dns_udp_bench(b: &mut Bencher) { fn hickory_udp_bench(b: &mut Bencher) {
let (named, server_port) = trust_dns_process(); let (named, server_port) = hickory_process();
let addr: SocketAddr = ("127.0.0.1", server_port) let addr: SocketAddr = ("127.0.0.1", server_port)
.to_socket_addrs() .to_socket_addrs()
@ -160,7 +160,7 @@ fn trust_dns_udp_bench(b: &mut Bencher) {
#[bench] #[bench]
#[ignore] #[ignore]
fn trust_dns_udp_bench_prof(b: &mut Bencher) { fn hickory_udp_bench_prof(b: &mut Bencher) {
let server_port = 6363; let server_port = 6363;
let addr: SocketAddr = ("127.0.0.1", server_port) let addr: SocketAddr = ("127.0.0.1", server_port)
@ -173,8 +173,8 @@ fn trust_dns_udp_bench_prof(b: &mut Bencher) {
} }
#[bench] #[bench]
fn trust_dns_tcp_bench(b: &mut Bencher) { fn hickory_tcp_bench(b: &mut Bencher) {
let (named, server_port) = trust_dns_process(); let (named, server_port) = hickory_process();
let addr: SocketAddr = ("127.0.0.1", server_port) let addr: SocketAddr = ("127.0.0.1", server_port)
.to_socket_addrs() .to_socket_addrs()
@ -217,7 +217,7 @@ fn bind_process() -> (NamedProcess, u16) {
.arg("../../server/benches/bind_conf/example.conf") .arg("../../server/benches/bind_conf/example.conf")
//.arg("-d").arg("0") //.arg("-d").arg("0")
.arg("-D") .arg("-D")
.arg("Trust-DNS cmp bench") .arg("Hickory DNS cmp bench")
.arg("-g") .arg("-g")
.arg("-p") .arg("-p")
.arg(&format!("{}", test_port)) .arg(&format!("{}", test_port))

42
bin/src/hickory-dns.ascii Normal file
View File

@ -0,0 +1,42 @@
------
---------
+----------
++++++-------
++++++++++++++
+++++++++++++++
+++++++++++++++
++++++++++++++++
++++++++++++++++ ####
++++++++++++++++ ########
####++++++++++++ ###########
################ ############
################ ##############
################ ##############
################ ###############
################ ###########++++
################ ######++++++++++
################ ++++++++++++++++
############### ++++++++++++++++
############### +++++++++++++++
############## +++++++++-----
############# +++++--------
++++++##### +----------
+++++++++ ---------
+++++ -----
## ###
### ### #### ###
### ### ###
### ### ###
### ### #### ########## ### #### ########## ####### #### ####
############### #### #### #### ### #### #### #### ### ### ###
### ### #### ### ####### #### #### ### ### ###
### ### #### ### ######## ### #### ### #### ###
### ### #### ### ### ### ### ### ### ### #######
### ### #### ########## ### #### ########## ### #####
### ### #### ###### ### #### ###### ### ###
###
+++++ + + ++++ #######
++ + +++ + ++ #####
++ + + +++ ++
+++++ + + +++++

View File

@ -1,21 +1,21 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! The `trust-dns` binary for running a DNS server //! The `hickory-dns` binary for running a DNS server
//! //!
//! ```text //! ```text
//! Usage: trust-dns [options] //! Usage: hickory-dns [options]
//! trust-dns (-h | --help | --version) //! hickory-dns (-h | --help | --version)
//! //!
//! Options: //! Options:
//! -q, --quiet Disable INFO messages, WARN and ERROR will remain //! -q, --quiet Disable INFO messages, WARN and ERROR will remain
//! -d, --debug Turn on DEBUG messages (default is only INFO) //! -d, --debug Turn on DEBUG messages (default is only INFO)
//! -h, --help Show this message //! -h, --help Show this message
//! -v, --version Show the version of trust-dns //! -v, --version Show the version of hickory-dns
//! -c FILE, --config=FILE Path to configuration file, default is /etc/named.toml //! -c FILE, --config=FILE Path to configuration file, default is /etc/named.toml
//! -z DIR, --zonedir=DIR Path to the root directory for all zone files, see also config toml //! -z DIR, --zonedir=DIR Path to the root directory for all zone files, see also config toml
//! -p PORT, --port=PORT Override the listening port //! -p PORT, --port=PORT Override the listening port
@ -57,16 +57,16 @@ use tracing_subscriber::{
util::SubscriberInitExt, util::SubscriberInitExt,
}; };
use trust_dns_client::rr::Name; use hickory_client::rr::Name;
#[cfg(feature = "dns-over-tls")] #[cfg(feature = "dns-over-tls")]
use trust_dns_server::config::dnssec::{self, TlsCertConfig}; use hickory_server::config::dnssec::{self, TlsCertConfig};
#[cfg(feature = "resolver")] #[cfg(feature = "resolver")]
use trust_dns_server::store::forwarder::ForwardAuthority; use hickory_server::store::forwarder::ForwardAuthority;
#[cfg(feature = "recursor")] #[cfg(feature = "recursor")]
use trust_dns_server::store::recursor::RecursiveAuthority; use hickory_server::store::recursor::RecursiveAuthority;
#[cfg(feature = "sqlite")] #[cfg(feature = "sqlite")]
use trust_dns_server::store::sqlite::{SqliteAuthority, SqliteConfig}; use hickory_server::store::sqlite::{SqliteAuthority, SqliteConfig};
use trust_dns_server::{ use hickory_server::{
authority::{AuthorityObject, Catalog, ZoneType}, authority::{AuthorityObject, Catalog, ZoneType},
config::{Config, ZoneConfig}, config::{Config, ZoneConfig},
server::ServerFuture, server::ServerFuture,
@ -77,7 +77,7 @@ use trust_dns_server::{
}; };
#[cfg(feature = "dnssec")] #[cfg(feature = "dnssec")]
use {trust_dns_client::rr::rdata::key::KeyUsage, trust_dns_server::authority::DnssecAuthority}; use {hickory_client::rr::rdata::key::KeyUsage, hickory_server::authority::DnssecAuthority};
#[cfg(feature = "dnssec")] #[cfg(feature = "dnssec")]
async fn load_keys<A, L>( async fn load_keys<A, L>(
@ -271,7 +271,7 @@ async fn load_zone(
/// Cli struct for all options managed with clap derive api. /// Cli struct for all options managed with clap derive api.
#[derive(Debug, Parser)] #[derive(Debug, Parser)]
#[clap(name = "Trust-DNS named server", version, about)] #[clap(name = "Hickory DNS named server", version, about)]
struct Cli { struct Cli {
/// Disable INFO messages, WARN and ERROR will remain /// Disable INFO messages, WARN and ERROR will remain
#[clap(short = 'q', long = "quiet", conflicts_with = "debug")] #[clap(short = 'q', long = "quiet", conflicts_with = "debug")]
@ -333,7 +333,7 @@ fn main() {
default(); default();
} }
info!("Trust-DNS {} starting", trust_dns_client::version()); info!("Hickory DNS {} starting", hickory_client::version());
// start up the server for listening // start up the server for listening
let config = args.config.clone(); let config = args.config.clone();
@ -352,7 +352,7 @@ fn main() {
let mut runtime = runtime::Builder::new_multi_thread() let mut runtime = runtime::Builder::new_multi_thread()
.enable_all() .enable_all()
.worker_threads(4) .worker_threads(4)
.thread_name("trust-dns-server-runtime") .thread_name("hickory-server-runtime")
.build() .build()
.expect("failed to initialize Tokio Runtime"); .expect("failed to initialize Tokio Runtime");
let mut catalog: Catalog = Catalog::new(); let mut catalog: Catalog = Catalog::new();
@ -485,12 +485,12 @@ fn main() {
match runtime.block_on(server.block_until_done()) { match runtime.block_on(server.block_until_done()) {
Ok(()) => { Ok(()) => {
// we're exiting for some reason... // we're exiting for some reason...
info!("Trust-DNS {} stopping", trust_dns_client::version()); info!("Hickory DNS {} stopping", hickory_client::version());
} }
Err(e) => { Err(e) => {
let error_msg = format!( let error_msg = format!(
"Trust-DNS {} has encountered an error: {}", "Hickory DNS {} has encountered an error: {}",
trust_dns_client::version(), hickory_client::version(),
e e
); );
@ -686,12 +686,16 @@ fn config_quic(
} }
fn banner() { fn banner() {
#[cfg(feature = "ascii-art")]
const HICKORY_DNS_LOGO: &str = include_str!("hickory-dns.ascii");
#[cfg(not(feature = "ascii-art"))]
const HICKORY_DNS_LOGO: &str = "Hickory DNS";
info!(""); info!("");
info!(" o o o "); for line in HICKORY_DNS_LOGO.lines() {
info!(" | | | "); info!(" {line}");
info!(" --O-- o-o o o o-o --O-- o-o o-O o-o o-o "); }
info!(" | | | | \\ | | | | | \\ ");
info!(" o o o--o o-o o o-o o o o-o ");
info!(""); info!("");
} }
@ -754,25 +758,25 @@ fn get_env() -> String {
env::var("RUST_LOG").unwrap_or_default() env::var("RUST_LOG").unwrap_or_default()
} }
fn all_trust_dns(level: impl ToString) -> String { fn all_hickory_dns(level: impl ToString) -> String {
format!( format!(
"named={level},trust_dns={level},{env}", "hickory_dns={level},{env}",
level = level.to_string().to_lowercase(), level = level.to_string().to_lowercase(),
env = get_env() env = get_env()
) )
} }
/// appends trust-dns-server debug to RUST_LOG /// appends hickory-server debug to RUST_LOG
pub fn debug() { pub fn debug() {
logger(tracing::Level::DEBUG); logger(tracing::Level::DEBUG);
} }
/// appends trust-dns-server info to RUST_LOG /// appends hickory-server info to RUST_LOG
pub fn default() { pub fn default() {
logger(tracing::Level::INFO); logger(tracing::Level::INFO);
} }
/// appends trust-dns-server error to RUST_LOG /// appends hickory-server error to RUST_LOG
pub fn quiet() { pub fn quiet() {
logger(tracing::Level::ERROR); logger(tracing::Level::ERROR);
} }
@ -782,7 +786,7 @@ fn logger(level: tracing::Level) {
// Setup tracing for logging based on input // Setup tracing for logging based on input
let filter = tracing_subscriber::EnvFilter::builder() let filter = tracing_subscriber::EnvFilter::builder()
.with_default_directive(tracing::Level::WARN.into()) .with_default_directive(tracing::Level::WARN.into())
.parse(all_trust_dns(level)) .parse(all_hickory_dns(level))
.expect("failed to configure tracing/logging"); .expect("failed to configure tracing/logging");
let formatter = tracing_subscriber::fmt::layer().event_format(TdnsFormatter); let formatter = tracing_subscriber::fmt::layer().event_format(TdnsFormatter);

View File

@ -1,8 +1,8 @@
// Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
#![cfg(not(windows))] #![cfg(not(windows))]
@ -16,12 +16,12 @@ use std::io::*;
use std::net::*; use std::net::*;
use std::sync::Arc; use std::sync::Arc;
use hickory_client::client::*;
use hickory_proto::h2::HttpsClientStreamBuilder;
use hickory_proto::iocompat::AsyncIoTokioAsStd;
use rustls::{Certificate, ClientConfig, OwnedTrustAnchor, RootCertStore}; use rustls::{Certificate, ClientConfig, OwnedTrustAnchor, RootCertStore};
use tokio::net::TcpStream as TokioTcpStream; use tokio::net::TcpStream as TokioTcpStream;
use tokio::runtime::Runtime; use tokio::runtime::Runtime;
use trust_dns_client::client::*;
use trust_dns_proto::h2::HttpsClientStreamBuilder;
use trust_dns_proto::iocompat::AsyncIoTokioAsStd;
use server_harness::{named_test_harness, query_a}; use server_harness::{named_test_harness, query_a};
@ -84,7 +84,7 @@ fn test_example_https_toml_startup() {
// ipv4 should succeed // ipv4 should succeed
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);

View File

@ -1,8 +1,8 @@
// Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
#![cfg(not(windows))] #![cfg(not(windows))]
@ -22,11 +22,11 @@ use native_tls::Certificate;
use tokio::net::TcpStream as TokioTcpStream; use tokio::net::TcpStream as TokioTcpStream;
use tokio::runtime::Runtime; use tokio::runtime::Runtime;
use trust_dns_client::client::*; use hickory_client::client::*;
use trust_dns_proto::native_tls::TlsClientStreamBuilder; use hickory_proto::native_tls::TlsClientStreamBuilder;
use hickory_proto::iocompat::AsyncIoTokioAsStd;
use server_harness::{named_test_harness, query_a}; use server_harness::{named_test_harness, query_a};
use trust_dns_proto::iocompat::AsyncIoTokioAsStd;
#[test] #[test]
fn test_example_tls_toml_startup() { fn test_example_tls_toml_startup() {
@ -65,7 +65,7 @@ fn test_startup(toml: &'static str) {
let (stream, sender) = tls_conn_builder.build(addr, "ns.example.com".to_string()); let (stream, sender) = tls_conn_builder.build(addr, "ns.example.com".to_string());
let client = AsyncClient::new(stream, sender, None); let client = AsyncClient::new(stream, sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);
@ -81,7 +81,7 @@ fn test_startup(toml: &'static str) {
let (stream, sender) = tls_conn_builder.build(addr, "ns.example.com".to_string()); let (stream, sender) = tls_conn_builder.build(addr, "ns.example.com".to_string());
let client = AsyncClient::new(stream, sender, None); let client = AsyncClient::new(stream, sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
// ipv6 should succeed // ipv6 should succeed
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);

View File

@ -1,8 +1,8 @@
// Copyright 2015-2022 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2022 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
#![cfg(not(windows))] #![cfg(not(windows))]
@ -12,10 +12,10 @@ mod server_harness;
use std::{env, fs::File, io::*, net::*}; use std::{env, fs::File, io::*, net::*};
use hickory_client::client::*;
use hickory_proto::quic::QuicClientStream;
use rustls::{Certificate, ClientConfig, OwnedTrustAnchor, RootCertStore}; use rustls::{Certificate, ClientConfig, OwnedTrustAnchor, RootCertStore};
use tokio::runtime::Runtime; use tokio::runtime::Runtime;
use trust_dns_client::client::*;
use trust_dns_proto::quic::QuicClientStream;
use server_harness::{named_test_harness, query_a}; use server_harness::{named_test_harness, query_a};
@ -70,7 +70,7 @@ fn test_example_quic_toml_startup() {
// ipv4 should succeed // ipv4 should succeed
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);

View File

@ -1,8 +1,8 @@
// Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
#![cfg(not(windows))] #![cfg(not(windows))]
@ -22,9 +22,9 @@ use rustls::RootCertStore;
use tokio::net::TcpStream as TokioTcpStream; use tokio::net::TcpStream as TokioTcpStream;
use tokio::runtime::Runtime; use tokio::runtime::Runtime;
use trust_dns_client::client::*; use hickory_client::client::*;
use trust_dns_proto::iocompat::AsyncIoTokioAsStd; use hickory_proto::iocompat::AsyncIoTokioAsStd;
use trust_dns_proto::rustls::tls_client_connect; use hickory_proto::rustls::tls_client_connect;
use server_harness::{named_test_harness, query_a}; use server_harness::{named_test_harness, query_a};
@ -70,7 +70,7 @@ fn test_example_tls_toml_startup() {
let client = AsyncClient::new(stream, sender, None); let client = AsyncClient::new(stream, sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
// ipv4 should succeed // ipv4 should succeed
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);
@ -88,7 +88,7 @@ fn test_example_tls_toml_startup() {
let client = AsyncClient::new(stream, sender, None); let client = AsyncClient::new(stream, sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
// ipv6 should succeed // ipv6 should succeed
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);

View File

@ -12,12 +12,12 @@ use std::path::Path;
use tokio::net::TcpStream as TokioTcpStream; use tokio::net::TcpStream as TokioTcpStream;
use tokio::runtime::Runtime; use tokio::runtime::Runtime;
use trust_dns_client::client::{Signer, *}; use hickory_client::client::{Signer, *};
use trust_dns_client::proto::tcp::TcpClientStream; use hickory_client::proto::tcp::TcpClientStream;
use trust_dns_client::proto::DnssecDnsHandle; use hickory_client::proto::DnssecDnsHandle;
use trust_dns_proto::rr::dnssec::*; use hickory_proto::rr::dnssec::*;
use trust_dns_proto::xfer::{DnsExchangeBackground, DnsMultiplexer}; use hickory_proto::xfer::{DnsExchangeBackground, DnsMultiplexer};
use trust_dns_proto::{iocompat::AsyncIoTokioAsStd, TokioTime}; use hickory_proto::{iocompat::AsyncIoTokioAsStd, TokioTime};
use server_harness::*; use server_harness::*;
@ -75,9 +75,8 @@ async fn standard_tcp_conn(
fn generic_test(config_toml: &str, key_path: &str, key_format: KeyFormat, algorithm: Algorithm) { fn generic_test(config_toml: &str, key_path: &str, key_format: KeyFormat, algorithm: Algorithm) {
// TODO: look into the `test-log` crate for enabling logging during tests // TODO: look into the `test-log` crate for enabling logging during tests
// use trust_dns_client::logger; // use hickory_client::logger;
// use tracing::LogLevel; // use tracing::LogLevel;
// logger::TrustDnsLogger::enable_logging(LogLevel::Debug);
let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned()); let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned());
let server_path = Path::new(&server_path); let server_path = Path::new(&server_path);
@ -88,18 +87,18 @@ fn generic_test(config_toml: &str, key_path: &str, key_format: KeyFormat, algori
// verify all records are present // verify all records are present
let client = standard_tcp_conn(tcp_port.expect("no tcp port")); let client = standard_tcp_conn(tcp_port.expect("no tcp port"));
let (client, bg) = io_loop.block_on(client); let (client, bg) = io_loop.block_on(client);
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
query_all_dnssec_with_rfc6975(&mut io_loop, client, algorithm); query_all_dnssec_with_rfc6975(&mut io_loop, client, algorithm);
let client = standard_tcp_conn(tcp_port.expect("no tcp port")); let client = standard_tcp_conn(tcp_port.expect("no tcp port"));
let (client, bg) = io_loop.block_on(client); let (client, bg) = io_loop.block_on(client);
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
query_all_dnssec_wo_rfc6975(&mut io_loop, client, algorithm); query_all_dnssec_wo_rfc6975(&mut io_loop, client, algorithm);
// test that request with Dnssec client is successful, i.e. validates chain // test that request with Dnssec client is successful, i.e. validates chain
let trust_anchor = trust_anchor(&server_path.join(key_path), key_format, algorithm); let trust_anchor = trust_anchor(&server_path.join(key_path), key_format, algorithm);
let client = standard_tcp_conn(tcp_port.expect("no tcp port")); let client = standard_tcp_conn(tcp_port.expect("no tcp port"));
let (client, bg) = io_loop.block_on(client); let (client, bg) = io_loop.block_on(client);
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
let mut client = DnssecDnsHandle::with_trust_anchor(client, trust_anchor); let mut client = DnssecDnsHandle::with_trust_anchor(client, trust_anchor);
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);

View File

@ -1,8 +1,8 @@
// Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
mod server_harness; mod server_harness;
@ -15,18 +15,18 @@ use tokio::net::TcpStream as TokioTcpStream;
use tokio::net::UdpSocket as TokioUdpSocket; use tokio::net::UdpSocket as TokioUdpSocket;
use tokio::runtime::Runtime; use tokio::runtime::Runtime;
use trust_dns_client::client::*; use hickory_client::client::*;
use trust_dns_client::op::ResponseCode; use hickory_client::op::ResponseCode;
use trust_dns_client::rr::*; use hickory_client::rr::*;
use trust_dns_client::tcp::TcpClientStream; use hickory_client::tcp::TcpClientStream;
use trust_dns_client::udp::UdpClientStream; use hickory_client::udp::UdpClientStream;
// TODO: Needed for when TLS tests are added back // TODO: Needed for when TLS tests are added back
// #[cfg(feature = "dns-over-openssl")] // #[cfg(feature = "dns-over-openssl")]
// use trust_dns_proto::openssl::TlsClientStreamBuilder; // use hickory_proto::openssl::TlsClientStreamBuilder;
use hickory_proto::iocompat::AsyncIoTokioAsStd;
use server_harness::{named_test_harness, query_a}; use server_harness::{named_test_harness, query_a};
use trust_dns_proto::iocompat::AsyncIoTokioAsStd;
#[test] #[test]
fn test_example_toml_startup() { fn test_example_toml_startup() {
@ -40,7 +40,7 @@ fn test_example_toml_startup() {
let client = AsyncClient::new(Box::new(stream), sender, None); let client = AsyncClient::new(Box::new(stream), sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);
@ -53,7 +53,7 @@ fn test_example_toml_startup() {
let client = AsyncClient::new(Box::new(stream), sender, None); let client = AsyncClient::new(Box::new(stream), sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);
}) })
@ -71,7 +71,7 @@ fn test_ipv4_only_toml_startup() {
let client = AsyncClient::new(Box::new(stream), sender, None); let client = AsyncClient::new(Box::new(stream), sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
// ipv4 should succeed // ipv4 should succeed
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);
@ -85,7 +85,7 @@ fn test_ipv4_only_toml_startup() {
assert!(io_loop.block_on(client).is_err()); assert!(io_loop.block_on(client).is_err());
//let (client, bg) = io_loop.block_on(client).expect("client failed to connect"); //let (client, bg) = io_loop.block_on(client).expect("client failed to connect");
//trust_dns_proto::spawn_bg(&io_loop, bg); //hickory_proto::spawn_bg(&io_loop, bg);
// ipv6 should fail // ipv6 should fail
// FIXME: probably need to send something for proper test... maybe use JoinHandle in tokio 0.2 // FIXME: probably need to send something for proper test... maybe use JoinHandle in tokio 0.2
@ -134,7 +134,7 @@ fn test_ipv4_and_ipv6_toml_startup() {
let client = AsyncClient::new(Box::new(stream), sender, None); let client = AsyncClient::new(Box::new(stream), sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
// ipv4 should succeed // ipv4 should succeed
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);
@ -145,7 +145,7 @@ fn test_ipv4_and_ipv6_toml_startup() {
let (stream, sender) = TcpClientStream::<AsyncIoTokioAsStd<TokioTcpStream>>::new(addr); let (stream, sender) = TcpClientStream::<AsyncIoTokioAsStd<TokioTcpStream>>::new(addr);
let client = AsyncClient::new(Box::new(stream), sender, None); let client = AsyncClient::new(Box::new(stream), sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
// ipv6 should succeed // ipv6 should succeed
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);
@ -163,7 +163,7 @@ fn test_nodata_where_name_exists() {
let (stream, sender) = TcpClientStream::<AsyncIoTokioAsStd<TokioTcpStream>>::new(addr); let (stream, sender) = TcpClientStream::<AsyncIoTokioAsStd<TokioTcpStream>>::new(addr);
let client = AsyncClient::new(Box::new(stream), sender, None); let client = AsyncClient::new(Box::new(stream), sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
let msg = io_loop let msg = io_loop
.block_on(client.query( .block_on(client.query(
@ -188,7 +188,7 @@ fn test_nxdomain_where_no_name_exists() {
let (stream, sender) = TcpClientStream::<AsyncIoTokioAsStd<TokioTcpStream>>::new(addr); let (stream, sender) = TcpClientStream::<AsyncIoTokioAsStd<TokioTcpStream>>::new(addr);
let client = AsyncClient::new(Box::new(stream), sender, None); let client = AsyncClient::new(Box::new(stream), sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
let msg = io_loop let msg = io_loop
.block_on(client.query( .block_on(client.query(
@ -213,7 +213,7 @@ fn test_server_continues_on_bad_data_udp() {
let stream = UdpClientStream::<TokioUdpSocket>::new(addr); let stream = UdpClientStream::<TokioUdpSocket>::new(addr);
let client = AsyncClient::connect(stream); let client = AsyncClient::connect(stream);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);
@ -234,7 +234,7 @@ fn test_server_continues_on_bad_data_udp() {
let client = AsyncClient::connect(stream); let client = AsyncClient::connect(stream);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);
}) })
@ -252,7 +252,7 @@ fn test_server_continues_on_bad_data_tcp() {
let client = AsyncClient::new(Box::new(stream), sender, None); let client = AsyncClient::new(Box::new(stream), sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);
@ -271,7 +271,7 @@ fn test_server_continues_on_bad_data_tcp() {
let (stream, sender) = TcpClientStream::<AsyncIoTokioAsStd<TokioTcpStream>>::new(addr); let (stream, sender) = TcpClientStream::<AsyncIoTokioAsStd<TokioTcpStream>>::new(addr);
let client = AsyncClient::new(Box::new(stream), sender, None); let client = AsyncClient::new(Box::new(stream), sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
query_a(&mut io_loop, &mut client); query_a(&mut io_loop, &mut client);
}) })
@ -280,8 +280,8 @@ fn test_server_continues_on_bad_data_tcp() {
#[test] #[test]
#[cfg(feature = "resolver")] #[cfg(feature = "resolver")]
fn test_forward() { fn test_forward() {
use hickory_proto::rr::rdata::A;
use server_harness::query_message; use server_harness::query_message;
use trust_dns_proto::rr::rdata::A;
//env_logger::init(); //env_logger::init();
@ -295,7 +295,7 @@ fn test_forward() {
let client = AsyncClient::new(Box::new(stream), sender, None); let client = AsyncClient::new(Box::new(stream), sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
let response = query_message( let response = query_message(
&mut io_loop, &mut io_loop,
@ -317,7 +317,7 @@ fn test_forward() {
let client = AsyncClient::new(Box::new(stream), sender, None); let client = AsyncClient::new(Box::new(stream), sender, None);
let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect"); let (mut client, bg) = io_loop.block_on(client).expect("client failed to connect");
trust_dns_proto::spawn_bg(&io_loop, bg); hickory_proto::spawn_bg(&io_loop, bg);
let response = query_message( let response = query_message(
&mut io_loop, &mut io_loop,

View File

@ -11,13 +11,13 @@ use std::{
time::*, time::*,
}; };
use hickory_client::{client::*, proto::xfer::DnsResponse};
#[cfg(feature = "dnssec")]
use hickory_proto::rr::dnssec::*;
use hickory_proto::rr::{rdata::A, *};
use regex::Regex; use regex::Regex;
use tokio::runtime::Runtime; use tokio::runtime::Runtime;
use tracing::{info, warn}; use tracing::{info, warn};
use trust_dns_client::{client::*, proto::xfer::DnsResponse};
#[cfg(feature = "dnssec")]
use trust_dns_proto::rr::dnssec::*;
use trust_dns_proto::rr::{rdata::A, *};
#[cfg(feature = "dnssec")] #[cfg(feature = "dnssec")]
use self::mut_message_client::MutMessageHandle; use self::mut_message_client::MutMessageHandle;
@ -41,18 +41,21 @@ where
let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned()); let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned());
println!("using server src path: {server_path}"); println!("using server src path: {server_path}");
let mut command = Command::new(format!("{server_path}/target/debug/trust-dns")); let mut command = Command::new(format!("{server_path}/target/debug/hickory-dns"));
command command
.stdout(Stdio::piped()) .stdout(Stdio::piped())
.env( .env(
"RUST_LOG", "RUST_LOG",
"trust_dns_client=debug,trust_dns_proto=debug,trust_dns_resolver=debug,trust_dns_server=debug", "hickory_dns=debug,hickory_client=debug,hickory_proto=debug,hickory_resolver=debug,hickory_server=debug",
).arg("-d") )
.arg("-d")
.arg(&format!( .arg(&format!(
"--config={server_path}/tests/test-data/test_configs/{toml}" "--config={server_path}/tests/test-data/test_configs/{toml}"
)).arg(&format!( ))
.arg(&format!(
"--zonedir={server_path}/tests/test-data/test_configs" "--zonedir={server_path}/tests/test-data/test_configs"
)).arg(&format!("--port={}", 0)) ))
.arg(&format!("--port={}", 0))
.arg(&format!("--tls-port={}", 0)) .arg(&format!("--tls-port={}", 0))
.arg(&format!("--https-port={}", 0)) .arg(&format!("--https-port={}", 0))
.arg(&format!("--quic-port={}", 0)); .arg(&format!("--quic-port={}", 0));
@ -264,7 +267,7 @@ pub fn query_all_dnssec(
algorithm: Algorithm, algorithm: Algorithm,
with_rfc6975: bool, with_rfc6975: bool,
) { ) {
use trust_dns_client::rr::rdata::{DNSKEY, RRSIG}; use hickory_client::rr::rdata::{DNSKEY, RRSIG};
let name = Name::from_str("example.com.").unwrap(); let name = Name::from_str("example.com.").unwrap();
let mut client = MutMessageHandle::new(client); let mut client = MutMessageHandle::new(client);

View File

@ -1,8 +1,8 @@
use trust_dns_client::client::*; use hickory_client::client::*;
use trust_dns_client::proto::xfer::{DnsHandle, DnsRequest}; use hickory_client::proto::xfer::{DnsHandle, DnsRequest};
#[cfg(feature = "dnssec")] #[cfg(feature = "dnssec")]
use trust_dns_client::{op::Edns, rr::rdata::opt::EdnsOption}; use hickory_client::{op::Edns, rr::rdata::opt::EdnsOption};
use trust_dns_server::authority::LookupOptions; use hickory_server::authority::LookupOptions;
#[derive(Clone)] #[derive(Clone)]
pub struct MutMessageHandle<C: ClientHandle + Unpin> { pub struct MutMessageHandle<C: ClientHandle + Unpin> {

View File

@ -1,6 +1,6 @@
// Copyright 2015-2023 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2023 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.

View File

@ -4,7 +4,7 @@ name = "async-std-resolver"
# A short blurb about the package. This is not rendered in any format when # A short blurb about the package. This is not rendered in any format when
# uploaded to crates.io (aka this is not markdown) # uploaded to crates.io (aka this is not markdown)
description = """ description = """
Trust-DNS is a safe and secure DNS library, for async-std. This Resolver library uses the trust-dns-proto library to perform all DNS queries. The Resolver is intended to be a high-level library for any DNS record resolution see Resolver and AsyncResolver for supported resolution types. The Client can be used for other queries. Hickory DNS is a safe and secure DNS library, for async-std. This Resolver library uses the hickory-proto library to perform all DNS queries. The Resolver is intended to be a high-level library for any DNS record resolution see Resolver and AsyncResolver for supported resolution types. The Client can be used for other queries.
""" """
# These URLs point to more information about the repository # These URLs point to more information about the repository
@ -25,32 +25,32 @@ categories.workspace = true
license.workspace = true license.workspace = true
[badges] [badges]
#github-actions = { repository = "bluejekyll/trust-dns", branch = "main", workflow = "test" } #github-actions = { repository = "bluejekyll/hickory", branch = "main", workflow = "test" }
codecov = { repository = "bluejekyll/trust-dns", branch = "main", service = "github" } codecov = { repository = "hickory-dns/hickory-dns", branch = "main", service = "github" }
maintenance = { status = "actively-developed" } maintenance = { status = "actively-developed" }
[features] [features]
default = ["system-config"] default = ["system-config"]
# resolver configuration # resolver configuration
system-config = ["trust-dns-resolver/system-config"] system-config = ["hickory-resolver/system-config"]
#### ####
# TODO: These next features are common across the trust-dns crates, but they are not ready for use here # TODO: These next features are common across the hickory crates, but they are not ready for use here
#### ####
#dns-over-native-tls = ["dns-over-tls", "trust-dns-resolver/dns-over-native-tls"] #dns-over-native-tls = ["dns-over-tls", "hickory-resolver/dns-over-native-tls"]
# DNS over TLS with OpenSSL currently needs a good way to set default CAs, use rustls or native-tls # DNS over TLS with OpenSSL currently needs a good way to set default CAs, use rustls or native-tls
#dns-over-openssl = ["dns-over-tls", "trust-dns-resolver/dns-over-openssl"] #dns-over-openssl = ["dns-over-tls", "hickory-resolver/dns-over-openssl"]
#dns-over-rustls = ["dns-over-tls", "trust-dns-resolver/dns-over-rustls"] #dns-over-rustls = ["dns-over-tls", "hickory-resolver/dns-over-rustls"]
#dns-over-tls = [] #dns-over-tls = []
# This requires some TLS library, currently only rustls is supported # This requires some TLS library, currently only rustls is supported
#dns-over-https-rustls = ["trust-dns-resolver/dns-over-https-rustls"] #dns-over-https-rustls = ["hickory-resolver/dns-over-https-rustls"]
#dns-over-https = [] #dns-over-https = []
#dnssec-openssl = ["dnssec", "trust-dns-resolver/dnssec-openssl"] #dnssec-openssl = ["dnssec", "hickory-resolver/dnssec-openssl"]
#dnssec-ring = ["dnssec", "trust-dns-resolver/dnssec-ring"] #dnssec-ring = ["dnssec", "hickory-resolver/dnssec-ring"]
#dnssec = [] #dnssec = []
[lib] [lib]
@ -61,11 +61,15 @@ path = "src/lib.rs"
async-std = { workspace = true, features = ["unstable"] } async-std = { workspace = true, features = ["unstable"] }
async-trait.workspace = true async-trait.workspace = true
futures-io = { workspace = true, default-features = false, features = ["std"] } futures-io = { workspace = true, default-features = false, features = ["std"] }
futures-util = { workspace = true, default-features = false, features = ["std"] } futures-util = { workspace = true, default-features = false, features = [
"std",
] }
pin-utils.workspace = true pin-utils.workspace = true
trust-dns-resolver = { workspace = true, default-features = false } hickory-resolver = { workspace = true, default-features = false }
socket2.workspace = true socket2.workspace = true
[dev-dependencies] [dev-dependencies]
async-std = { workspace = true, features = ["attributes"] } async-std = { workspace = true, features = ["attributes"] }
trust-dns-resolver = { workspace = true, default-features = false, features = ["testing"] } hickory-resolver = { workspace = true, default-features = false, features = [
"testing",
] }

View File

@ -1,6 +1,6 @@
Apache License Apache License
Version 2.0, January 2004 Version 2.0, January 2004
http://www.apache.org/licenses/ https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
@ -192,7 +192,7 @@
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -1,4 +1,4 @@
Copyright (c) 2015 The trust-dns Developers Copyright (c) 2015 The Hickory DNS Developers
Copyright (c) 2017 Google LLC. Copyright (c) 2017 Google LLC.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -1,8 +1,10 @@
# Overview # Overview
Trust-DNS Async-Std Resolver is a library which implements the DNS resolver using the Trust-DNS Resolver library. Hickory DNS Async-Std Resolver is a library which implements the DNS resolver using the Hickory DNS Resolver library.
This library contains implementations for IPv4 (A) and IPv6 (AAAA) resolution, more features are in the works. It is built on top of the [async-std](https://async.rs) async-io project, this allows it to be integrated into other systems using the async-std and futures libraries. The Trust-DNS [project](https://github.com/bluejekyll/trust-dns) contains other libraries for DNS: a [client library](https://crates.io/crates/trust-dns-client) for raw protocol usage, a [server library](https://crates.io/crates/trust-dns-server) for hosting zones, and variations on the TLS implementation over [rustls](https://crates.io/crates/trust-dns-rustls) and [native-tls](https://crates.io/crates/trust-dns-native-tls). This library contains implementations for IPv4 (A) and IPv6 (AAAA) resolution, more features are in the works. It is built on top of the [async-std](https://async.rs) async-io project, this allows it to be integrated into other systems using the async-std and futures libraries. The Hickory DNS [project](https://github.com/hickory-dns/hickory-dns) contains other libraries for DNS: a [client library](https://crates.io/crates/hickory-client) for raw protocol usage, a [server library](https://crates.io/crates/hickory-server) for hosting zones, and variations on the TLS implementation over [rustls](https://crates.io/crates/hickory-dns-rustls) and [native-tls](https://crates.io/crates/hickory-dns-native-tls).
**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, from `0.24` and onward.
## Features ## Features
@ -55,4 +57,4 @@ The current minimum rustc version for this project is `1.67`
## Versioning ## Versioning
Trust-DNS does its best job to follow semver. Trust-DNS will be promoted to 1.0 upon stabilization of the publicly exposed APIs. This does not mean that Trust-DNS will necessarily break on upgrades between 0.x updates. Whenever possible, old APIs will be deprecated with notes on what replaced those deprecations. Trust-DNS will make a best effort to never break software which depends on it due to API changes, though this can not be guaranteed. Deprecated interfaces will be maintained for at minimum one major release after that in which they were deprecated (where possible), with the exception of the upgrade to 1.0 where all deprecated interfaces will be planned to be removed. Hickory DNS does its best job to follow semver. Hickory DNS will be promoted to 1.0 upon stabilization of the publicly exposed APIs. This does not mean that Hickory DNS will necessarily break on upgrades between 0.x updates. Whenever possible, old APIs will be deprecated with notes on what replaced those deprecations. Hickory DNS will make a best effort to never break software which depends on it due to API changes, though this can not be guaranteed. Deprecated interfaces will be maintained for at minimum one major release after that in which they were deprecated (where possible), with the exception of the upgrade to 1.0 where all deprecated interfaces will be planned to be removed.

View File

@ -1,8 +1,8 @@
// Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
// LIBRARY WARNINGS // LIBRARY WARNINGS
@ -25,11 +25,11 @@
//! //!
//! This is a 100% in process DNS resolver. It *does not* use the Host OS' resolver. If what is desired is to use the Host OS' resolver, generally in the system's libc, then the `std::net::ToSocketAddrs` variant over `&str` should be used. //! This is a 100% in process DNS resolver. It *does not* use the Host OS' resolver. If what is desired is to use the Host OS' resolver, generally in the system's libc, then the `std::net::ToSocketAddrs` variant over `&str` should be used.
//! //!
//! Unlike the `trust-dns-client`, this tries to provide a simpler interface to perform DNS queries. For update options, i.e. Dynamic DNS, the `trust-dns-client` crate must be used instead. The Resolver library is capable of searching multiple domains (this can be disabled by using an FQDN during lookup), dual-stack IPv4/IPv6 lookups, performing chained CNAME lookups, and features connection metric tracking for attempting to pick the best upstream DNS resolver. //! Unlike the `hickory-client`, this tries to provide a simpler interface to perform DNS queries. For update options, i.e. Dynamic DNS, the `hickory-client` crate must be used instead. The Resolver library is capable of searching multiple domains (this can be disabled by using an FQDN during lookup), dual-stack IPv4/IPv6 lookups, performing chained CNAME lookups, and features connection metric tracking for attempting to pick the best upstream DNS resolver.
//! //!
//! Use [`AsyncResolver`](crate::AsyncResolver) for performing DNS queries. `AsyncResolver` is a `async-std` based async resolver, and can be used inside any `asyn-std` based system. //! Use [`AsyncResolver`](crate::AsyncResolver) for performing DNS queries. `AsyncResolver` is a `async-std` based async resolver, and can be used inside any `asyn-std` based system.
//! //!
//! This as best as possible attempts to abide by the DNS RFCs, please file issues at <https://github.com/bluejekyll/trust-dns>. //! This as best as possible attempts to abide by the DNS RFCs, please file issues at <https://github.com/hickory-dns/hickory-dns>.
//! //!
//! # Usage //! # Usage
//! //!
@ -94,7 +94,7 @@
//! } //! }
//! ``` //! ```
use trust_dns_resolver::AsyncResolver; use hickory_resolver::AsyncResolver;
use crate::runtime::AsyncStdConnectionProvider; use crate::runtime::AsyncStdConnectionProvider;
@ -104,11 +104,11 @@ mod runtime;
mod tests; mod tests;
mod time; mod time;
pub use trust_dns_resolver::config; pub use hickory_resolver::config;
pub use trust_dns_resolver::error::ResolveError; pub use hickory_resolver::error::ResolveError;
pub use trust_dns_resolver::lookup; pub use hickory_resolver::lookup;
pub use trust_dns_resolver::lookup_ip; pub use hickory_resolver::lookup_ip;
pub use trust_dns_resolver::proto; pub use hickory_resolver::proto;
/// An AsyncResolver used with async_std /// An AsyncResolver used with async_std
pub type AsyncStdResolver = AsyncResolver<AsyncStdConnectionProvider>; pub type AsyncStdResolver = AsyncResolver<AsyncStdConnectionProvider>;

View File

@ -1,8 +1,8 @@
// Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::io; use std::io;
@ -14,10 +14,10 @@ use async_std::task::spawn_blocking;
use async_trait::async_trait; use async_trait::async_trait;
use futures_io::{AsyncRead, AsyncWrite}; use futures_io::{AsyncRead, AsyncWrite};
use futures_util::future::FutureExt; use futures_util::future::FutureExt;
use hickory_resolver::proto::tcp::{Connect, DnsTcpStream};
use hickory_resolver::proto::udp::{DnsUdpSocket, QuicLocalAddr, UdpSocket};
use pin_utils::pin_mut; use pin_utils::pin_mut;
use socket2::{Domain, Protocol, Socket, Type}; use socket2::{Domain, Protocol, Socket, Type};
use trust_dns_resolver::proto::tcp::{Connect, DnsTcpStream};
use trust_dns_resolver::proto::udp::{DnsUdpSocket, QuicLocalAddr, UdpSocket};
use crate::time::AsyncStdTime; use crate::time::AsyncStdTime;

View File

@ -1,21 +1,19 @@
// Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use hickory_resolver::config::{NameServerConfig, ResolverOpts};
use std::future::Future; use std::future::Future;
use std::net::SocketAddr; use std::net::SocketAddr;
use std::pin::Pin; use std::pin::Pin;
use trust_dns_resolver::config::{NameServerConfig, ResolverOpts};
use trust_dns_resolver::proto::error::ProtoError; use hickory_resolver::proto::error::ProtoError;
use trust_dns_resolver::proto::Executor; use hickory_resolver::proto::Executor;
use trust_dns_resolver::name_server::{ use hickory_resolver::name_server::{ConnectionProvider, GenericConnector, RuntimeProvider, Spawn};
ConnectionProvider, GenericConnector, RuntimeProvider, Spawn,
};
use crate::net::{AsyncStdTcpStream, AsyncStdUdpSocket}; use crate::net::{AsyncStdTcpStream, AsyncStdUdpSocket};
use crate::proto::tcp::Connect; use crate::proto::tcp::Connect;

View File

@ -1,7 +1,7 @@
#![allow(clippy::extra_unused_type_parameters)] #![allow(clippy::extra_unused_type_parameters)]
use trust_dns_resolver::name_server::GenericConnection; use hickory_resolver::name_server::GenericConnection;
use trust_dns_resolver::testing; use hickory_resolver::testing;
use crate::config::{ResolverConfig, ResolverOpts}; use crate::config::{ResolverConfig, ResolverOpts};
use crate::lookup::LookupFuture; use crate::lookup::LookupFuture;

View File

@ -1,15 +1,15 @@
// Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::future::Future; use std::future::Future;
use std::time::Duration; use std::time::Duration;
use async_trait::async_trait; use async_trait::async_trait;
use trust_dns_resolver::proto::Time; use hickory_resolver::proto::Time;
/// AsyncStd backed timer implementation /// AsyncStd backed timer implementation
#[derive(Clone, Copy)] #[derive(Clone, Copy)]

View File

@ -1,19 +1,19 @@
[package] [package]
name = "trust-dns-client" name = "hickory-client"
# A short blurb about the package. This is not rendered in any format when # A short blurb about the package. This is not rendered in any format when
# uploaded to crates.io (aka this is not markdown) # uploaded to crates.io (aka this is not markdown)
description = """ description = """
Trust-DNS is a safe and secure DNS library. This is the Client library with DNSSEC support. Hickory DNS is a safe and secure DNS library. This is the Client library with DNSSEC support.
DNSSEC with NSEC validation for negative records, is complete. The client supports DNSSEC with NSEC validation for negative records, is complete. The client supports
dynamic DNS with SIG0 authenticated requests, implementing easy to use high level dynamic DNS with SIG0 authenticated requests, implementing easy to use high level
funtions. Trust-DNS is based on the Tokio and Futures libraries, which means funtions. Hickory DNS is based on the Tokio and Futures libraries, which means
it should be easily integrated into other software that also use those it should be easily integrated into other software that also use those
libraries. libraries.
""" """
# These URLs point to more information about the repository # These URLs point to more information about the repository
documentation = "https://docs.rs/trust-dns" documentation = "https://docs.rs/hickory-client"
# This points to a file in the repository (relative to this Cargo.toml). The # This points to a file in the repository (relative to this Cargo.toml). The
# contents of this file are stored and indexed in the registry. # contents of this file are stored and indexed in the registry.
@ -30,45 +30,58 @@ categories.workspace = true
license.workspace = true license.workspace = true
[badges] [badges]
#github-actions = { repository = "bluejekyll/trust-dns", branch = "main", workflow = "test" } #github-actions = { repository = "bluejekyll/hickory", branch = "main", workflow = "test" }
codecov = { repository = "bluejekyll/trust-dns", branch = "main", service = "github" } codecov = { repository = "hickory-dns/hickory-dns", branch = "main", service = "github" }
maintenance = { status = "actively-developed" } maintenance = { status = "actively-developed" }
[features] [features]
backtrace = ["trust-dns-proto/backtrace"] backtrace = ["hickory-proto/backtrace"]
dns-over-https-openssl = ["dns-over-https", "dns-over-openssl"] dns-over-https-openssl = ["dns-over-https", "dns-over-openssl"]
dns-over-https-rustls = ["dns-over-https", "dns-over-rustls", "rustls", "trust-dns-proto/dns-over-https-rustls"] dns-over-https-rustls = [
dns-over-https = ["trust-dns-proto/dns-over-https"] "dns-over-https",
"dns-over-rustls",
"rustls",
"hickory-proto/dns-over-https-rustls",
]
dns-over-https = ["hickory-proto/dns-over-https"]
dns-over-quic = ["dns-over-rustls", "trust-dns-proto/dns-over-quic"] dns-over-quic = ["dns-over-rustls", "hickory-proto/dns-over-quic"]
dns-over-native-tls = ["dns-over-tls", "trust-dns-proto/dns-over-native-tls"] dns-over-native-tls = ["dns-over-tls", "hickory-proto/dns-over-native-tls"]
dns-over-openssl = ["dns-over-tls", "dnssec-openssl"] dns-over-openssl = ["dns-over-tls", "dnssec-openssl"]
dns-over-rustls = ["dns-over-tls", "dnssec-ring", "trust-dns-proto/dns-over-rustls"] dns-over-rustls = [
"dns-over-tls",
"dnssec-ring",
"hickory-proto/dns-over-rustls",
]
dns-over-tls = [] dns-over-tls = []
webpki-roots = ["trust-dns-proto/webpki-roots"] webpki-roots = ["hickory-proto/webpki-roots"]
native-certs = ["trust-dns-proto/native-certs"] native-certs = ["hickory-proto/native-certs"]
dnssec-openssl = ["dnssec", "trust-dns-proto/dnssec-openssl"] dnssec-openssl = ["dnssec", "hickory-proto/dnssec-openssl"]
dnssec-ring = ["dnssec", "trust-dns-proto/dnssec-ring"] dnssec-ring = ["dnssec", "hickory-proto/dnssec-ring"]
dnssec = ["trust-dns-proto/dnssec"] dnssec = ["hickory-proto/dnssec"]
serde-config = ["serde", "trust-dns-proto/serde-config"] serde-config = ["serde", "hickory-proto/serde-config"]
# enables experimental the mDNS (multicast) feature # enables experimental the mDNS (multicast) feature
mdns = ["trust-dns-proto/mdns"] mdns = ["hickory-proto/mdns"]
[lib] [lib]
name = "trust_dns_client" name = "hickory_client"
path = "src/lib.rs" path = "src/lib.rs"
[dependencies] [dependencies]
cfg-if.workspace = true cfg-if.workspace = true
data-encoding.workspace = true data-encoding.workspace = true
futures-channel = { workspace = true, default-features = false, features = ["std"] } futures-channel = { workspace = true, default-features = false, features = [
futures-util = { workspace = true, default-features = false, features = ["std"] } "std",
] }
futures-util = { workspace = true, default-features = false, features = [
"std",
] }
once_cell.workspace = true once_cell.workspace = true
radix_trie.workspace = true radix_trie.workspace = true
rand.workspace = true rand.workspace = true
@ -77,13 +90,23 @@ serde = { workspace = true, features = ["derive"], optional = true }
thiserror.workspace = true thiserror.workspace = true
tracing.workspace = true tracing.workspace = true
tokio = { workspace = true, features = ["rt", "net"] } tokio = { workspace = true, features = ["rt", "net"] }
trust-dns-proto = { workspace = true, features = ["text-parsing", "tokio-runtime"] } hickory-proto = { workspace = true, features = [
"text-parsing",
"tokio-runtime",
] }
[dev-dependencies] [dev-dependencies]
futures = { workspace = true, default-features = false, features = ["std", "executor"] } futures = { workspace = true, default-features = false, features = [
"std",
"executor",
] }
openssl = { workspace = true, features = ["v102", "v110"], optional = false } openssl = { workspace = true, features = ["v102", "v110"], optional = false }
tokio = { workspace = true, features = ["rt", "macros"] } tokio = { workspace = true, features = ["rt", "macros"] }
tracing-subscriber = { workspace = true, features = ["std", "fmt", "env-filter"] } tracing-subscriber = { workspace = true, features = [
"std",
"fmt",
"env-filter",
] }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true

View File

@ -1,6 +1,6 @@
Apache License Apache License
Version 2.0, January 2004 Version 2.0, January 2004
http://www.apache.org/licenses/ https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
@ -192,7 +192,7 @@
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -1,4 +1,4 @@
Copyright (c) 2015 The trust-dns Developers Copyright (c) 2015 The hickory-dns Developers
Copyright (c) 2017 Google LLC. Copyright (c) 2017 Google LLC.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -1,31 +1,33 @@
# Overview # Overview
Trust-DNS is a library which implements the DNS protocol and client side functions. Hickory DNS is a library which implements the DNS protocol and client side functions.
This library contains basic implementations for DNS record serialization, and communication. It is capable of performing `query`, `update`, and `notify` operations. `update` has been proven to be compatible with `BIND9` and `SIG0` signed records for updates. It is built on top of the [tokio](https://tokio.rs) async-io project, this allows it to be integrated into other systems using the tokio and futures libraries. The Trust-DNS [project](https://github.com/bluejekyll/trust-dns) contains other libraries for DNS: a [resolver library](https://crates.io/crates/trust-dns-resolver) for lookups, a [server library](https://crates.io/crates/trust-dns) for hosting zones, and variations on the TLS implementation over [rustls](https://crates.io/crates/trust-dns-rustls) and [native-tls](https://crates.io/crates/trust-dns-native-tls). This library contains basic implementations for DNS record serialization, and communication. It is capable of performing `query`, `update`, and `notify` operations. `update` has been proven to be compatible with `BIND9` and `SIG0` signed records for updates. It is built on top of the [tokio](https://tokio.rs) async-io project, this allows it to be integrated into other systems using the tokio and futures libraries. The Hickory DNS [project](https://github.com/hickory-dns/hickory-dns) contains other libraries for DNS: a [resolver library](https://crates.io/crates/hickory-resolver) for lookups, a [server library](https://crates.io/crates/hickory-dns) for hosting zones, and variations on the TLS implementation over [rustls](https://crates.io/crates/hickory-dns-rustls) and [native-tls](https://crates.io/crates/hickory-dns-native-tls).
## Features **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, this crate/binary has been moved to [hickory-client](https://crates.io/crates/hickory-client), from `0.24` and onward, for prior versions see [trust-dns-client](https://crates.io/crates/trust-dns-client).
## Featuress
The `client` is capable of DNSSEC validation as well as offering higher order functions for performing DNS operations: The `client` is capable of DNSSEC validation as well as offering higher order functions for performing DNS operations:
- [SyncDnssecClient](https://docs.rs/trust-dns-client/latest/trust_dns_client/client/struct.SyncDnssecClient.html) - DNSSEC validation - [SyncDnssecClient](https://docs.rs/hickory-client/latest/hickory_client/client/struct.SyncDnssecClient.html) - DNSSEC validation
- [create](https://docs.rs/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.create) - atomic create of a record, with authenticated request - [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.append) - verify existence of a record and append to it - [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.compare_and_swap) - atomic (depends on server) compare and swap - [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.delete_by_rdata) - delete a specific record - [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.delete_rrset) - delete an entire record set - [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.delete_all) - delete all records sets with a given name - [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/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.notify) - notify server that it should reload a zone - [notify](https://docs.rs/hickory-client/latest/hickory_client/client/trait.Client.html#method.notify) - notify server that it should reload a zone
## Example ## Example
```rust ```rust
use std::net::Ipv4Addr; use std::net::Ipv4Addr;
use std::str::FromStr; use std::str::FromStr;
use trust_dns_client::client::{Client, SyncClient}; use hickory_client::client::{Client, SyncClient};
use trust_dns_client::udp::UdpClientConnection; use hickory_client::udp::UdpClientConnection;
use trust_dns_client::op::DnsResponse; use hickory_client::op::DnsResponse;
use trust_dns_client::rr::{DNSClass, Name, RData, Record, RecordType}; use hickory_client::rr::{DNSClass, Name, RData, Record, RecordType};
let address = "8.8.8.8:53".parse().unwrap(); let address = "8.8.8.8:53".parse().unwrap();
let conn = UdpClientConnection::new(address).unwrap(); let conn = UdpClientConnection::new(address).unwrap();
@ -40,7 +42,7 @@ let response: DnsResponse = client.query(&name, DNSClass::IN, RecordType::A).unw
// Messages are the packets sent between client and server in DNS, DnsResonse's can be // Messages are the packets sent between client and server in DNS, DnsResonse's can be
// dereferenced to a Message. There are many fields to a Message, It's beyond the scope // dereferenced to a Message. There are many fields to a Message, It's beyond the scope
// of these examples to explain them. See trust_dns::op::message::Message for more details. // of these examples to explain them. See hickory_dns::op::message::Message for more details.
// generally we will be interested in the Message::answers // generally we will be interested in the Message::answers
let answers: &[Record] = response.answers(); let answers: &[Record] = response.answers();
@ -78,4 +80,4 @@ The current minimum rustc version for this project is `1.67`
## Versioning ## Versioning
Trust-DNS does it's best job to follow semver. Trust-DNS will be promoted to 1.0 upon stabilization of the publicly exposed APIs. This does not mean that Trust-DNS will necessarily break on upgrades between 0.x updates. Whenever possible, old APIs will be deprecated with notes on what replaced those deprecations. Trust-DNS will make a best effort to never break software which depends on it due to API changes, though this can not be guaranteed. Deprecated interfaces will be maintained for at minimum one major release after that in which they were deprecated (where possible), with the exception of the upgrade to 1.0 where all deprecated interfaces will be planned to be removed. Hickory DNS does it's best job to follow semver. Hickory DNS will be promoted to 1.0 upon stabilization of the publicly exposed APIs. This does not mean that Hickory DNS will necessarily break on upgrades between 0.x updates. Whenever possible, old APIs will be deprecated with notes on what replaced those deprecations. Hickory DNS will make a best effort to never break software which depends on it due to API changes, though this can not be guaranteed. Deprecated interfaces will be maintained for at minimum one major release after that in which they were deprecated (where possible), with the exception of the upgrade to 1.0 where all deprecated interfaces will be planned to be removed.

View File

@ -1,8 +1,8 @@
// Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
#![cfg(nightly)] #![cfg(nightly)]
@ -14,7 +14,7 @@ use std::str::FromStr;
use test::Bencher; use test::Bencher;
use trust_dns_client::rr::*; use hickory_client::rr::*;
#[bench] #[bench]
fn name_cmp_short(b: &mut Bencher) { fn name_cmp_short(b: &mut Bencher) {

View File

@ -1,8 +1,8 @@
// Copyright 2015-2023 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2023 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::{ use std::{

View File

@ -1,8 +1,8 @@
// Copyright 2015-2019 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2019 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
#![cfg(feature = "dnssec")] #![cfg(feature = "dnssec")]

View File

@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
// You may obtain a copy of the License at // You may obtain a copy of the License at
// //
// http://www.apache.org/licenses/LICENSE-2.0 // https://www.apache.org/licenses/LICENSE-2.0
// //
// Unless required by applicable law or agreed to in writing, software // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, // distributed under the License is distributed on an "AS IS" BASIS,
@ -432,8 +432,8 @@ pub trait Client {
} }
} }
/// The Client is abstracted over either trust_dns_client::tcp::TcpClientConnection or /// The Client is abstracted over either hickory_client::tcp::TcpClientConnection or
/// trust_dns_client::udp::UdpClientConnection. /// hickory_client::udp::UdpClientConnection.
/// ///
/// Usage of TCP or UDP is up to the user. Some DNS servers /// Usage of TCP or UDP is up to the user. Some DNS servers
/// disallow TCP in some cases, so if TCP double check if UDP works. /// disallow TCP in some cases, so if TCP double check if UDP works.
@ -454,7 +454,7 @@ impl<CC: ClientConnection> SyncClient<CC> {
/// Creates a new DNS client with the specified connection type and a SIG0 signer. /// Creates a new DNS client with the specified connection type and a SIG0 signer.
/// ///
/// This is necessary for signed update requests to update trust-dns-server entries. /// This is necessary for signed update requests to update hickory-server entries.
/// ///
/// # Arguments /// # Arguments
/// ///
@ -597,7 +597,7 @@ impl<CC: ClientConnection> SecureSyncClientBuilder<CC> {
/// Associate a signer to produce a SIG0 for all update requests /// Associate a signer to produce a SIG0 for all update requests
/// ///
/// This is necessary for signed update requests to update trust-dns-server entries /// This is necessary for signed update requests to update hickory-server entries
/// ///
/// # Arguments /// # Arguments
/// ///

View File

@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
// You may obtain a copy of the License at // You may obtain a copy of the License at
// //
// http://www.apache.org/licenses/LICENSE-2.0 // https://www.apache.org/licenses/LICENSE-2.0
// //
// Unless required by applicable law or agreed to in writing, software // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, // distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -1,8 +1,8 @@
// Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::collections::HashMap; use std::collections::HashMap;
use std::pin::Pin; use std::pin::Pin;
@ -11,7 +11,7 @@ use std::sync::Arc;
use futures_util::future::FutureExt; use futures_util::future::FutureExt;
use futures_util::lock::Mutex; use futures_util::lock::Mutex;
use futures_util::stream::Stream; use futures_util::stream::Stream;
use trust_dns_proto::{ use hickory_proto::{
error::ProtoError, error::ProtoError,
xfer::{DnsHandle, DnsRequest, DnsResponse}, xfer::{DnsHandle, DnsRequest, DnsResponse},
}; };
@ -100,7 +100,7 @@ mod test {
use futures::lock::Mutex; use futures::lock::Mutex;
use futures::*; use futures::*;
use trust_dns_proto::{ use hickory_proto::{
error::ProtoError, error::ProtoError,
xfer::{DnsHandle, DnsRequest, DnsResponse}, xfer::{DnsHandle, DnsRequest, DnsResponse},
}; };
@ -108,7 +108,7 @@ mod test {
use crate::client::*; use crate::client::*;
use crate::op::*; use crate::op::*;
use crate::rr::*; use crate::rr::*;
use trust_dns_proto::xfer::FirstAnswer; use hickory_proto::xfer::FirstAnswer;
#[derive(Clone)] #[derive(Clone)]
struct TestClient { struct TestClient {

View File

@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -1,8 +1,8 @@
// Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::pin::Pin; use std::pin::Pin;

View File

@ -1,8 +1,8 @@
// Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! Error types for the crate //! Error types for the crate
@ -14,7 +14,7 @@ use thiserror::Error;
#[cfg(feature = "backtrace")] #[cfg(feature = "backtrace")]
use crate::proto::{trace, ExtBacktrace}; use crate::proto::{trace, ExtBacktrace};
use trust_dns_proto::error::{DnsSecError, DnsSecErrorKind, ProtoError, ProtoErrorKind}; use hickory_proto::error::{DnsSecError, DnsSecErrorKind, ProtoError, ProtoErrorKind};
/// An alias for results returned by functions of this crate /// An alias for results returned by functions of this crate
pub type Result<T> = ::std::result::Result<T, Error>; pub type Result<T> = ::std::result::Result<T, Error>;
@ -40,7 +40,7 @@ pub enum ErrorKind {
#[error("io error")] #[error("io error")]
Io(#[from] std::io::Error), Io(#[from] std::io::Error),
/// An error got returned by the trust-dns-proto crate /// An error got returned by the hickory-proto crate
#[error("proto error")] #[error("proto error")]
Proto(#[from] ProtoError), Proto(#[from] ProtoError),

View File

@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
//! All defined errors for Trust-DNS //! All defined errors for Hickory DNS
#![deny(missing_docs)] #![deny(missing_docs)]

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! UDP based DNS client connection for Client impls //! UDP based DNS client connection for Client impls
@ -11,15 +11,15 @@ use std::marker::PhantomData;
use std::net::SocketAddr; use std::net::SocketAddr;
use std::sync::Arc; use std::sync::Arc;
use hickory_proto::h2::{HttpsClientConnect, HttpsClientStream, HttpsClientStreamBuilder};
use hickory_proto::tcp::Connect;
use rustls::ClientConfig; use rustls::ClientConfig;
use trust_dns_proto::h2::{HttpsClientConnect, HttpsClientStream, HttpsClientStreamBuilder};
use trust_dns_proto::tcp::Connect;
use crate::client::{ClientConnection, Signer}; use crate::client::{ClientConnection, Signer};
/// UDP based DNS Client connection /// UDP based DNS Client connection
/// ///
/// Use with `trust_dns_client::client::Client` impls /// Use with `hickory_client::client::Client` impls
#[derive(Clone)] #[derive(Clone)]
pub struct HttpsClientConnection<T> { pub struct HttpsClientConnection<T> {
name_server: SocketAddr, name_server: SocketAddr,

View File

@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@ -37,13 +37,13 @@
#![recursion_limit = "1024"] #![recursion_limit = "1024"]
#![cfg_attr(docsrs, feature(doc_cfg))] #![cfg_attr(docsrs, feature(doc_cfg))]
//! Trust-DNS is intended to be a fully compliant domain name server and client library. //! Hickory DNS is intended to be a fully compliant domain name server and client library.
//! //!
//! The Client library is responsible for the basic protocols responsible for communicating with DNS servers (authorities) and resolvers. It can be used for managing DNS records through the use of update operations. It is possible to send raw DNS Messages with the Client, but for ease of use the `query` and various other update operations are recommended for general use. //! The Client library is responsible for the basic protocols responsible for communicating with DNS servers (authorities) and resolvers. It can be used for managing DNS records through the use of update operations. It is possible to send raw DNS Messages with the Client, but for ease of use the `query` and various other update operations are recommended for general use.
//! //!
//! For a system-like resolver, see [trust-dns-resolver](https://docs.rs/trust-dns-resolver). This is most likely what you want if all you want to do is lookup IP addresses. //! For a system-like resolver, see [hickory-resolver](https://docs.rs/hickory-resolver). This is most likely what you want if all you want to do is lookup IP addresses.
//! //!
//! For serving DNS serving, see [trust-dns-server](https://docs.rs/trust-dns-server). //! For serving DNS serving, see [hickory-server](https://docs.rs/hickory-server).
//! //!
//! # Goals //! # Goals
//! //!
@ -62,28 +62,28 @@
//! //!
//! ```toml //! ```toml
//! [dependencies] //! [dependencies]
//! trust-dns-client = "*" //! hickory-client = "*"
//! ``` //! ```
//! //!
//! By default DNSSEC validation is built in with OpenSSL, this can be disabled with: //! By default DNSSEC validation is built in with OpenSSL, this can be disabled with:
//! //!
//! ```toml //! ```toml
//! [dependencies] //! [dependencies]
//! trust-dns-client = { version = "*", default-features = false } //! hickory-client = { version = "*", default-features = false }
//! ``` //! ```
//! //!
//! ## Objects //! ## Objects
//! //!
//! There are two variations of implementations of the Client. The `SyncClient`, a synchronous client, and the `AsyncClient`, a Tokio async client. `SyncClient` is an implementation of the `Client` trait, there is another implementation, `SyncDnssecClient`, which validates DNSSEC records. For these basic examples we'll only look at the `SyncClient` //! There are two variations of implementations of the Client. The `SyncClient`, a synchronous client, and the `AsyncClient`, a Tokio async client. `SyncClient` is an implementation of the `Client` trait, there is another implementation, `SyncDnssecClient`, which validates DNSSEC records. For these basic examples we'll only look at the `SyncClient`
//! //!
//! First we must decide on the type of connection, there are three supported by Trust-DNS today, UDP, TCP and TLS. TLS requires OpenSSL by default, see also [trust-dns-native-tls](https://docs.rs/trust-dns-native-tls) and [trust-dns-rustls](https://docs.rs/trust-dns-rustls) for other TLS options. //! First we must decide on the type of connection, there are three supported by Hickory DNS today, UDP, TCP and TLS. TLS requires OpenSSL by default, see also [hickory-dns-native-tls](https://docs.rs/hickory-dns-native-tls) and [hickory-dns-rustls](https://docs.rs/hickory-dns-rustls) for other TLS options.
//! //!
//! ## Setup a connection //! ## Setup a connection
//! //!
//! ```rust //! ```rust
//! use trust_dns_proto::DnsStreamHandle; //! use hickory_proto::DnsStreamHandle;
//! use trust_dns_client::client::{Client, ClientConnection, SyncClient}; //! use hickory_client::client::{Client, ClientConnection, SyncClient};
//! use trust_dns_client::udp::UdpClientConnection; //! use hickory_client::udp::UdpClientConnection;
//! //!
//! let address = "8.8.8.8:53".parse().unwrap(); //! let address = "8.8.8.8:53".parse().unwrap();
//! let conn = UdpClientConnection::new(address).unwrap(); //! let conn = UdpClientConnection::new(address).unwrap();
@ -96,16 +96,16 @@
//! //!
//! ## Querying //! ## Querying
//! //!
//! Using the Client to query for DNS records is easy enough, though it performs no resolution. The `trust-dns-resolver` has a simpler interface if that's what is desired. Over time that library will gain more features to generically query for different types. //! Using the Client to query for DNS records is easy enough, though it performs no resolution. The `hickory-resolver` has a simpler interface if that's what is desired. Over time that library will gain more features to generically query for different types.
//! //!
//! ```rust //! ```rust
//! use std::net::Ipv4Addr; //! use std::net::Ipv4Addr;
//! use std::str::FromStr; //! use std::str::FromStr;
//! # use trust_dns_client::client::{Client, SyncClient}; //! # use hickory_client::client::{Client, SyncClient};
//! # use trust_dns_client::udp::UdpClientConnection; //! # use hickory_client::udp::UdpClientConnection;
//! use trust_dns_client::op::DnsResponse; //! use hickory_client::op::DnsResponse;
//! use trust_dns_client::rr::{DNSClass, Name, RData, Record, RecordType}; //! use hickory_client::rr::{DNSClass, Name, RData, Record, RecordType};
//! use trust_dns_client::rr::rdata::A; //! use hickory_client::rr::rdata::A;
//! # //! #
//! # let address = "8.8.8.8:53".parse().unwrap(); //! # let address = "8.8.8.8:53".parse().unwrap();
//! # let conn = UdpClientConnection::new(address).unwrap(); //! # let conn = UdpClientConnection::new(address).unwrap();
@ -121,7 +121,7 @@
//! // Messages are the packets sent between client and server in DNS. //! // Messages are the packets sent between client and server in DNS.
//! // there are many fields to a Message, DnsResponse can be dereferenced into //! // there are many fields to a Message, DnsResponse can be dereferenced into
//! // a Message. It's beyond the scope of these examples //! // a Message. It's beyond the scope of these examples
//! // to explain all the details of a Message. See trust_dns_client::op::message::Message for more details. //! // to explain all the details of a Message. See hickory_client::op::message::Message for more details.
//! // generally we will be interested in the Message::answers //! // generally we will be interested in the Message::answers
//! let answers: &[Record] = response.answers(); //! let answers: &[Record] = response.answers();
//! //!
@ -135,11 +135,11 @@
//! } //! }
//! ``` //! ```
//! //!
//! In the above example we successfully queried for a A record. There are many other types, each can be independently queried and the associated `trust_dns_client::rr::record_data::RData` has a variant with the deserialized data for the record stored. //! In the above example we successfully queried for a A record. There are many other types, each can be independently queried and the associated `hickory_client::rr::record_data::RData` has a variant with the deserialized data for the record stored.
//! //!
//! ## Dynamic update //! ## Dynamic update
//! //!
//! Currently `trust-dns-client` supports SIG(0) signed records for authentication and authorization of dynamic DNS updates. It's beyond the scope of these examples to show how to setup SIG(0) authorization on the server. `trust-dns-client` is known to work with BIND9 and `trust-dns-server`. Expect in the future for TLS to become a potentially better option for authorization with certificate chains. These examples show using SIG(0) for auth, requires OpenSSL. It's beyond the scope of these examples to describe the configuration for the server. //! Currently `hickory-client` supports SIG(0) signed records for authentication and authorization of dynamic DNS updates. It's beyond the scope of these examples to show how to setup SIG(0) authorization on the server. `hickory-client` is known to work with BIND9 and `hickory-server`. Expect in the future for TLS to become a potentially better option for authorization with certificate chains. These examples show using SIG(0) for auth, requires OpenSSL. It's beyond the scope of these examples to describe the configuration for the server.
//! //!
//! ```rust,no_run //! ```rust,no_run
@ -154,18 +154,18 @@
//! //!
//! # #[cfg(feature = "openssl")] //! # #[cfg(feature = "openssl")]
//! use openssl::rsa::Rsa; //! use openssl::rsa::Rsa;
//! use trust_dns_client::client::{Client, SyncClient}; //! use hickory_client::client::{Client, SyncClient};
//! use trust_dns_client::udp::UdpClientConnection; //! use hickory_client::udp::UdpClientConnection;
//! use trust_dns_client::rr::{Name, RData, Record, RecordType}; //! use hickory_client::rr::{Name, RData, Record, RecordType};
//! use trust_dns_client::proto::rr::dnssec::{Algorithm, SigSigner, KeyPair}; //! use hickory_client::proto::rr::dnssec::{Algorithm, SigSigner, KeyPair};
//! use trust_dns_client::op::ResponseCode; //! use hickory_client::op::ResponseCode;
//! use trust_dns_client::rr::rdata::{A, key::KEY}; //! use hickory_client::rr::rdata::{A, key::KEY};
//! //!
//! # let address = "0.0.0.0:53".parse().unwrap(); //! # let address = "0.0.0.0:53".parse().unwrap();
//! # let conn = UdpClientConnection::new(address).unwrap(); //! # let conn = UdpClientConnection::new(address).unwrap();
//! //!
//! // The format of the key is dependent on the KeyPair type, in this example we're using RSA //! // The format of the key is dependent on the KeyPair type, in this example we're using RSA
//! // if the key was generated with BIND, the binary in Trust-DNS client lib `dnskey-to-pem` //! // if the key was generated with BIND, the binary in Hickory DNS client lib `dnskey-to-pem`
//! // can be used to convert this to a pem file //! // can be used to convert this to a pem file
//! let mut pem = File::open("my_private_key.pem").unwrap(); //! let mut pem = File::open("my_private_key.pem").unwrap();
//! let mut pem_buf = Vec::<u8>::new(); //! let mut pem_buf = Vec::<u8>::new();
@ -186,7 +186,7 @@
//! Algorithm::RSASHA256, //! Algorithm::RSASHA256,
//! key.to_public_bytes().unwrap()); //! key.to_public_bytes().unwrap());
//! //!
//! // Create the Trust-DNS SIG(0) signing facility. Generally the signer_name is the label //! // Create the Hickory DNS SIG(0) signing facility. Generally the signer_name is the label
//! // associated with KEY record in the server. //! // associated with KEY record in the server.
//! let signer = SigSigner::sig0(sig0key, //! let signer = SigSigner::sig0(sig0key,
//! key, //! key,
@ -215,7 +215,7 @@
//! # } //! # }
//! ``` //! ```
//! //!
//! *Note*: The dynamic DNS functions defined by Trust-DNS are expressed as atomic operations, but this depends on support of the remote server. For example, the `create` operation shown above, should only succeed if there is no `RecordSet` of the specified type at the specified label. The other update operations are `append`, `compare_and_swap`, `delete_by_rdata`, `delete_rrset`, and `delete_all`. See the documentation for each of these methods on the `Client` trait. //! *Note*: The dynamic DNS functions defined by Hickory DNS are expressed as atomic operations, but this depends on support of the remote server. For example, the `create` operation shown above, should only succeed if there is no `RecordSet` of the specified type at the specified label. The other update operations are `append`, `compare_and_swap`, `delete_by_rdata`, `delete_rrset`, and `delete_all`. See the documentation for each of these methods on the `Client` trait.
//! //!
//! //!
//! ## Async client usage //! ## Async client usage
@ -227,11 +227,11 @@
//! use std::net::Ipv4Addr; //! use std::net::Ipv4Addr;
//! use std::str::FromStr; //! use std::str::FromStr;
//! use tokio::net::TcpStream as TokioTcpStream; //! use tokio::net::TcpStream as TokioTcpStream;
//! use trust_dns_client::client::{AsyncClient, ClientHandle}; //! use hickory_client::client::{AsyncClient, ClientHandle};
//! use trust_dns_client::proto::iocompat::AsyncIoTokioAsStd; //! use hickory_client::proto::iocompat::AsyncIoTokioAsStd;
//! use trust_dns_client::rr::{DNSClass, Name, RData, RecordType}; //! use hickory_client::rr::{DNSClass, Name, RData, RecordType};
//! use trust_dns_client::rr::rdata::A; //! use hickory_client::rr::rdata::A;
//! use trust_dns_client::tcp::TcpClientStream; //! use hickory_client::tcp::TcpClientStream;
//! //!
//! #[tokio::main] //! #[tokio::main]
//! async fn main() { //! async fn main() {
@ -284,7 +284,7 @@ pub mod udp;
#[cfg(feature = "dns-over-https")] #[cfg(feature = "dns-over-https")]
mod h2_client_connection; mod h2_client_connection;
pub use trust_dns_proto as proto; pub use hickory_proto as proto;
/// The https module which contains all https related connection types /// The https module which contains all https related connection types
#[cfg(feature = "dns-over-https")] #[cfg(feature = "dns-over-https")]

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! MDNS based DNS client connection for Client impls //! MDNS based DNS client connection for Client impls
@ -19,7 +19,7 @@ use crate::client::{ClientConnection, Signer};
/// MDNS based DNS Client connection /// MDNS based DNS Client connection
/// ///
/// Use with `trust_dns_client::client::Client` impls /// Use with `hickory_client::client::Client` impls
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub struct MdnsClientConnection { pub struct MdnsClientConnection {
multicast_addr: SocketAddr, multicast_addr: SocketAddr,

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! UDP protocol related components for DNS //! UDP protocol related components for DNS

View File

@ -1,8 +1,8 @@
// Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! Operations to send with a `Client` or server, e.g. `Query`, `Message`, or `UpdateMessage` can //! Operations to send with a `Client` or server, e.g. `Query`, `Message`, or `UpdateMessage` can

View File

@ -1,8 +1,8 @@
// Copyright 2015-2023 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2023 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! Resource record related components, e.g. `Name` aka label, `Record`, `RData`, ... //! Resource record related components, e.g. `Name` aka label, `Record`, `RData`, ...

View File

@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@ -18,7 +18,7 @@
use crate::proto::serialize::binary; use crate::proto::serialize::binary;
#[deprecated(note = "use [`trust_dns_client::serialize::binary::StreamHandle`] instead")] #[deprecated(note = "use [`hickory_client::serialize::binary::StreamHandle`] instead")]
pub use self::binary::BinDecodable as BinSerializable; pub use self::binary::BinDecodable as BinSerializable;
pub use self::binary::BinDecodable; pub use self::binary::BinDecodable;
pub use self::binary::BinDecoder; pub use self::binary::BinDecoder;

View File

@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! TCP based DNS client connection for Client impls //! TCP based DNS client connection for Client impls
@ -21,7 +21,7 @@ use crate::proto::xfer::{DnsMultiplexer, DnsMultiplexerConnect};
/// Tcp client connection /// Tcp client connection
/// ///
/// Use with `trust_dns_client::client::Client` impls /// Use with `hickory_client::client::Client` impls
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub struct TcpClientConnection { pub struct TcpClientConnection {
name_server: SocketAddr, name_server: SocketAddr,

View File

@ -1,8 +1,8 @@
// Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
#[cfg(feature = "openssl")] #[cfg(feature = "openssl")]

View File

@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! UDP based DNS client connection for Client impls //! UDP based DNS client connection for Client impls
@ -21,7 +21,7 @@ use tokio::net::UdpSocket;
/// UDP based DNS Client connection /// UDP based DNS Client connection
/// ///
/// Use with `trust_dns_client::client::Client` impls /// Use with `hickory_client::client::Client` impls
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub struct UdpClientConnection { pub struct UdpClientConnection {
name_server: SocketAddr, name_server: SocketAddr,

View File

@ -1,14 +1,14 @@
[package] [package]
name = "trust-dns-proto" name = "hickory-proto"
# A short blurb about the package. This is not rendered in any format when # A short blurb about the package. This is not rendered in any format when
# uploaded to crates.io (aka this is not markdown) # uploaded to crates.io (aka this is not markdown)
description = """ description = """
Trust-DNS is a safe and secure DNS library. This is the foundational DNS protocol library for all Trust-DNS projects. Hickory DNS is a safe and secure DNS library. This is the foundational DNS protocol library for all Hickory DNS projects.
""" """
# These URLs point to more information about the repository # These URLs point to more information about the repository
documentation = "https://docs.rs/trust-dns-proto" documentation = "https://docs.rs/hickory-proto"
# This points to a file in the repository (relative to this Cargo.toml). The # This points to a file in the repository (relative to this Cargo.toml). The
# contents of this file are stored and indexed in the registry. # contents of this file are stored and indexed in the registry.
@ -25,19 +25,36 @@ categories.workspace = true
license.workspace = true license.workspace = true
[badges] [badges]
#github-actions = { repository = "bluejekyll/trust-dns", branch = "main", workflow = "test" } #github-actions = { repository = "bluejekyll/hickory", branch = "main", workflow = "test" }
codecov = { repository = "bluejekyll/trust-dns", branch = "main", service = "github" } codecov = { repository = "hickory-dns/hickory-dns", branch = "main", service = "github" }
maintenance = { status = "actively-developed" } maintenance = { status = "actively-developed" }
[features] [features]
dns-over-tls = [] dns-over-tls = []
dns-over-rustls = ["dns-over-tls", "rustls", "rustls-pemfile", "tokio-rustls", "tokio-runtime"] dns-over-rustls = [
dns-over-native-tls = ["dns-over-tls", "native-tls", "tokio-native-tls", "tokio-runtime"] "dns-over-tls",
"rustls",
"rustls-pemfile",
"tokio-rustls",
"tokio-runtime",
]
dns-over-native-tls = [
"dns-over-tls",
"native-tls",
"tokio-native-tls",
"tokio-runtime",
]
dns-over-openssl = ["dns-over-tls", "openssl", "tokio-openssl", "tokio-runtime"] dns-over-openssl = ["dns-over-tls", "openssl", "tokio-openssl", "tokio-runtime"]
dns-over-https-rustls = ["dns-over-https"] dns-over-https-rustls = ["dns-over-https"]
dns-over-https = ["bytes", "h2", "http", "dns-over-rustls", "tokio-runtime"] dns-over-https = ["bytes", "h2", "http", "dns-over-rustls", "tokio-runtime"]
dns-over-quic = ["quinn", "rustls/quic", "dns-over-rustls", "bytes", "tokio-runtime"] dns-over-quic = [
"quinn",
"rustls/quic",
"dns-over-rustls",
"bytes",
"tokio-runtime",
]
dns-over-h3 = ["h3", "h3-quinn", "quinn", "http", "dns-over-quic"] dns-over-h3 = ["h3", "h3-quinn", "quinn", "http", "dns-over-quic"]
native-certs = ["dep:rustls-native-certs"] native-certs = ["dep:rustls-native-certs"]
@ -65,7 +82,7 @@ wasm-bindgen = ["wasm-bindgen-crate", "js-sys"]
backtrace = ["dep:backtrace"] backtrace = ["dep:backtrace"]
[lib] [lib]
name = "trust_dns_proto" name = "hickory_proto"
path = "src/lib.rs" path = "src/lib.rs"
[dependencies] [dependencies]
@ -75,9 +92,13 @@ bytes = { workspace = true, optional = true }
cfg-if.workspace = true cfg-if.workspace = true
data-encoding.workspace = true data-encoding.workspace = true
enum-as-inner.workspace = true enum-as-inner.workspace = true
futures-channel = { workspace = true, default-features = false, features = ["std"] } futures-channel = { workspace = true, default-features = false, features = [
"std",
] }
futures-io = { workspace = true, default-features = false, features = ["std"] } futures-io = { workspace = true, default-features = false, features = ["std"] }
futures-util = { workspace = true, default-features = false, features = ["std"] } futures-util = { workspace = true, default-features = false, features = [
"std",
] }
h2 = { workspace = true, features = ["stream"], optional = true } h2 = { workspace = true, features = ["stream"], optional = true }
h3 = { workspace = true, optional = true } h3 = { workspace = true, optional = true }
h3-quinn = { workspace = true, optional = true } h3-quinn = { workspace = true, optional = true }
@ -88,7 +109,11 @@ js-sys = { workspace = true, optional = true }
native-tls = { workspace = true, optional = true } native-tls = { workspace = true, optional = true }
once_cell.workspace = true once_cell.workspace = true
openssl = { workspace = true, features = ["v102", "v110"], optional = true } openssl = { workspace = true, features = ["v102", "v110"], optional = true }
quinn = { workspace = true, optional = true, features = ["log", "runtime-tokio", "tls-rustls"] } quinn = { workspace = true, optional = true, features = [
"log",
"runtime-tokio",
"tls-rustls",
] }
rand.workspace = true rand.workspace = true
ring = { workspace = true, optional = true, features = ["std"] } ring = { workspace = true, optional = true, features = ["std"] }
rustls = { workspace = true, optional = true } rustls = { workspace = true, optional = true }
@ -108,10 +133,16 @@ wasm-bindgen-crate = { workspace = true, optional = true }
webpki-roots = { workspace = true, optional = true } webpki-roots = { workspace = true, optional = true }
[dev-dependencies] [dev-dependencies]
futures-executor = { workspace = true, default-features = false, features = ["std"] } futures-executor = { workspace = true, default-features = false, features = [
"std",
] }
openssl = { workspace = true, features = ["v102", "v110"] } openssl = { workspace = true, features = ["v102", "v110"] }
tokio = { workspace = true, features = ["rt", "time", "macros"] } tokio = { workspace = true, features = ["rt", "time", "macros"] }
tracing-subscriber = { workspace = true, features = ["std", "fmt", "env-filter"] } tracing-subscriber = { workspace = true, features = [
"std",
"fmt",
"env-filter",
] }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true

View File

@ -1,6 +1,6 @@
Apache License Apache License
Version 2.0, January 2004 Version 2.0, January 2004
http://www.apache.org/licenses/ https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
@ -192,7 +192,7 @@
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -1,4 +1,4 @@
Copyright (c) 2015 The trust-dns Developers Copyright (c) 2015 The Hickory DNS Developers
Copyright (c) 2017 Google LLC. Copyright (c) 2017 Google LLC.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -1,6 +1,8 @@
# Overview # Overview
Trust-DNS Proto is the foundational DNS protocol library and implementation for Trust-DNS. Unless you want to manipulate the DNS packets directly, it is likely not the library you want. Please see Trust-DNS [Resolver](https://crates.io/crates/trust-dns-resolver), [Client](https://crates.io/crates/trust-dns-client), or [Server](https://crates.io/crates/trust-dns-server) for higher level interfaces. Hickory DNS Proto is the foundational DNS protocol library and implementation for Hickory DNS. Unless you want to manipulate the DNS packets directly, it is likely not the library you want. Please see Hickory DNS [Resolver](https://crates.io/crates/hickory-resolver), [Client](https://crates.io/crates/hickory-client), or [Server](https://crates.io/crates/hickory-server) for higher level interfaces.
**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, this crate/binary has been moved to [hickory-proto](https://crates.io/crates/hickory-proto), from `0.24` and onward, for prior versions see [trust-dns-proto](https://crates.io/crates/trust-dns-proto).
## Minimum Rust Version ## Minimum Rust Version
@ -8,4 +10,4 @@ The current minimum rustc version for this project is `1.67`
## Versioning ## Versioning
Trust-DNS does it's best job to follow semver. Trust-DNS will be promoted to 1.0 upon stabilization of the publicly exposed APIs. This does not mean that Trust-DNS will necessarily break on upgrades between 0.x updates. Whenever possible, old APIs will be deprecated with notes on what replaced those deprecations. Trust-DNS will make a best effort to never break software which depends on it due to API changes, though this can not be guaranteed. Deprecated interfaces will be maintained for at minimum one major release after that in which they were deprecated (where possible), with the exception of the upgrade to 1.0 where all deprecated interfaces will be planned to be removed. Hickory DNS does it's best job to follow semver. Hickory DNS will be promoted to 1.0 upon stabilization of the publicly exposed APIs. This does not mean that Hickory DNS will necessarily break on upgrades between 0.x updates. Whenever possible, old APIs will be deprecated with notes on what replaced those deprecations. Hickory DNS will make a best effort to never break software which depends on it due to API changes, though this can not be guaranteed. Deprecated interfaces will be maintained for at minimum one major release after that in which they were deprecated (where possible), with the exception of the upgrade to 1.0 where all deprecated interfaces will be planned to be removed.

View File

@ -3,9 +3,9 @@
extern crate test; extern crate test;
use trust_dns_proto::op::{Header, Message, MessageType, OpCode, ResponseCode}; use hickory_proto::op::{Header, Message, MessageType, OpCode, ResponseCode};
use trust_dns_proto::rr::Record; use hickory_proto::rr::Record;
use trust_dns_proto::serialize::binary::{BinDecodable, BinDecoder, BinEncodable, BinEncoder}; use hickory_proto::serialize::binary::{BinDecodable, BinDecoder, BinEncodable, BinEncoder};
use test::Bencher; use test::Bencher;

View File

@ -7,7 +7,7 @@ use std::cmp::Ordering;
use test::Bencher; use test::Bencher;
use trust_dns_proto::rr::*; use hickory_proto::rr::*;
#[bench] #[bench]
fn name_cmp_short(b: &mut Bencher) { fn name_cmp_short(b: &mut Bencher) {

View File

@ -1,8 +1,8 @@
// Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! Error types for the crate //! Error types for the crate
@ -542,7 +542,7 @@ pub enum DnsSecErrorKind {
Msg(String), Msg(String),
// foreign // foreign
/// An error got returned by the trust-dns-proto crate /// An error got returned by the hickory-proto crate
#[error("proto error: {0}")] #[error("proto error: {0}")]
Proto(#[from] ProtoError), Proto(#[from] ProtoError),

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::fmt::{self, Display}; use std::fmt::{self, Display};

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! HTTPS related server items //! HTTPS related server items

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! TLS protocol related components for DNS over HTTPS (DoH) //! TLS protocol related components for DNS over HTTPS (DoH)

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::fmt::{self, Display}; use std::fmt::{self, Display};

View File

@ -1,8 +1,8 @@
// Copyright 2015-2022 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2022 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! HTTP/3 related server items //! HTTP/3 related server items

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! TLS protocol related components for DNS over HTTP/3 (DoH3) //! TLS protocol related components for DNS over HTTP/3 (DoH3)

View File

@ -1,8 +1,8 @@
// Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2020 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::num::ParseIntError; use std::num::ParseIntError;

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! HTTP protocol related components for DNS over HTTP/2 (DoH) and HTTP/3 (DoH3) //! HTTP protocol related components for DNS over HTTP/2 (DoH) and HTTP/3 (DoH3)

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! HTTP request creation and validation //! HTTP request creation and validation

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! HTTP request creation and validation //! HTTP request creation and validation

View File

@ -2,8 +2,8 @@
// Copyright 2017 Google LLC. // Copyright 2017 Google LLC.
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
// LIBRARY WARNINGS // LIBRARY WARNINGS
@ -28,7 +28,7 @@
#![recursion_limit = "2048"] #![recursion_limit = "2048"]
#![cfg_attr(docsrs, feature(doc_cfg))] #![cfg_attr(docsrs, feature(doc_cfg))]
//! Trust-DNS Protocol library //! Hickory DNS Protocol library
use async_trait::async_trait; use async_trait::async_trait;
use futures_util::future::Future; use futures_util::future::Future;

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::fmt::{self, Display}; use std::fmt::{self, Display};

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std; use std;

View File

@ -1,8 +1,8 @@
// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! Multicast protocol related components for DNS //! Multicast protocol related components for DNS

View File

@ -1,8 +1,8 @@
// Copyright 2015-2021 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2021 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! TLS protocol related components for DNS over TLS //! TLS protocol related components for DNS over TLS

View File

@ -1,8 +1,8 @@
// Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
#![allow( #![allow(

View File

@ -1,8 +1,8 @@
// Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! TlsClientStream for DNS over TLS //! TlsClientStream for DNS over TLS

View File

@ -1,8 +1,8 @@
// Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! Base TlsStream //! Base TlsStream

View File

@ -1,8 +1,8 @@
// Copyright 2015-2023 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2023 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! Extended DNS options //! Extended DNS options

View File

@ -1,8 +1,8 @@
// Copyright 2015-2021 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2021 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! Message metadata //! Message metadata

View File

@ -1,8 +1,8 @@
// Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::fmt::{self, Display}; use std::fmt::{self, Display};

View File

@ -1,8 +1,8 @@
// Copyright 2015-2023 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2023 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! Basic protocol message for DNS //! Basic protocol message for DNS
@ -767,7 +767,7 @@ impl Message {
/// Consumes `Message` giving public access to fields in `Message` so they can be /// Consumes `Message` giving public access to fields in `Message` so they can be
/// destructured and taken by value /// destructured and taken by value
/// ```rust /// ```rust
/// use trust_dns_proto::op::{Message, MessageParts}; /// use hickory_proto::op::{Message, MessageParts};
/// ///
/// let msg = Message::new(); /// let msg = Message::new();
/// let MessageParts { queries, .. } = msg.into_parts(); /// let MessageParts { queries, .. } = msg.into_parts();

View File

@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -1,8 +1,8 @@
// Copyright 2015-2021 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2021 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! Operation code for queries, updates, and responses //! Operation code for queries, updates, and responses
@ -60,7 +60,7 @@ impl fmt::Display for OpCode {
/// Convert from `OpCode` to `u8` /// Convert from `OpCode` to `u8`
/// ///
/// ``` /// ```
/// use trust_dns_proto::op::op_code::OpCode; /// use hickory_proto::op::op_code::OpCode;
/// ///
/// let var: u8 = From::from(OpCode::Query); /// let var: u8 = From::from(OpCode::Query);
/// assert_eq!(0, var); /// assert_eq!(0, var);
@ -85,7 +85,7 @@ impl From<OpCode> for u8 {
/// Convert from `u8` to `OpCode` /// Convert from `u8` to `OpCode`
/// ///
/// ``` /// ```
/// use trust_dns_proto::op::op_code::OpCode; /// use hickory_proto::op::op_code::OpCode;
/// ///
/// let var: OpCode = OpCode::from_u8(0).unwrap(); /// let var: OpCode = OpCode::from_u8(0).unwrap();
/// assert_eq!(OpCode::Query, var); /// assert_eq!(OpCode::Query, var);

View File

@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,

View File

@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
@ -197,7 +197,7 @@ impl Display for ResponseCode {
/// Convert from `ResponseCode` to `u16` /// Convert from `ResponseCode` to `u16`
/// ///
/// ``` /// ```
/// use trust_dns_proto::op::response_code::ResponseCode; /// use hickory_proto::op::response_code::ResponseCode;
/// ///
/// let var: ResponseCode = From::from(0); /// let var: ResponseCode = From::from(0);
/// assert_eq!(ResponseCode::NoError, var); /// assert_eq!(ResponseCode::NoError, var);
@ -241,7 +241,7 @@ impl From<ResponseCode> for u16 {
/// Convert from `u16` to `ResponseCode` /// Convert from `u16` to `ResponseCode`
/// ///
/// ``` /// ```
/// use trust_dns_proto::op::response_code::ResponseCode; /// use hickory_proto::op::response_code::ResponseCode;
/// ///
/// let var: u16 = From::from(ResponseCode::NoError); /// let var: u16 = From::from(ResponseCode::NoError);
/// assert_eq!(0, var); /// assert_eq!(0, var);

View File

@ -1,8 +1,8 @@
// Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! Update related operations for Messages //! Update related operations for Messages

View File

@ -1,8 +1,8 @@
// Copyright 2015-2021 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2021 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! TLS protocol related components for DNS over TLS //! TLS protocol related components for DNS over TLS

View File

@ -1,8 +1,8 @@
// Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::future::Future; use std::future::Future;

View File

@ -1,8 +1,8 @@
// Copyright 2015-2021 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2021 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
//! DNS over TLS server implementations for OpenSSL //! DNS over TLS server implementations for OpenSSL

View File

@ -1,8 +1,8 @@
// Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com> // Copyright 2015-2016 Benjamin Fry <benjaminfry@me.com>
// //
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be // https://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms. // copied, modified, or distributed except according to those terms.
use std::io; use std::io;

Some files were not shown because too many files have changed in this diff Show More