mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-24 18:55:55 +03:00
[PR #3313] proto: make tls feature runtime-agnostic #3739
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#3739
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/3313
Author: @CathalMullan
Created: 10/15/2025
Status: 🔄 Open
Base:
main← Head:proto-tls📝 Commits (1)
1beaacfproto: make tls feature runtime-agnostic📊 Changes
17 files changed (+295 additions, -119 deletions)
View changed files
📝
Cargo.lock(+2 -0)📝
conformance/Cargo.lock(+41 -0)📝
crates/proto/Cargo.toml(+7 -7)📝
crates/proto/src/h2/h2_client_stream.rs(+17 -31)📝
crates/proto/src/runtime.rs(+41 -2)📝
crates/proto/src/rustls/tls_client_stream.rs(+25 -19)📝
crates/proto/src/rustls/tls_stream.rs(+44 -47)📝
crates/proto/src/xfer/dns_exchange.rs(+6 -6)📝
crates/recursor/Cargo.toml(+2 -0)📝
crates/recursor/src/metrics_tests.rs(+13 -3)📝
crates/resolver/Cargo.toml(+2 -2)📝
crates/resolver/examples/custom_provider.rs(+22 -0)📝
crates/resolver/src/connection_provider.rs(+2 -0)📝
crates/resolver/src/name_server.rs(+11 -0)📝
fuzz/Cargo.lock(+42 -1)📝
tests/integration-tests/Cargo.toml(+1 -1)📝
tests/integration-tests/src/mock_client.rs(+17 -0)📄 Description
Part of https://github.com/hickory-dns/hickory-dns/issues/3304, aiming to make
protolesstokiodependent.Added a connect method and an associated type for TLS to the runtime provider, in order to abstract TLS connections away from
tokio-rustls. Also made use of the runtime timer to handle timeouts in therustlsmodule.These changes do require adding
rustlsandrustls-pki-typesto theprotopublic API (only when the__tlsfeature is enabled).The current set of features
protoexposes aren't expressive enough to handle mixing runtime choice and TLS choice. As such, I've had to move thedep:tokio-rustlsunder thetokiofeature. There would need to be a bridge feature liketokio-tlsto handle making it optional, but that would complicate things greatly.Encountered broken pipe issues when running the tests both locally and on CI. Narrowed down the issue to the
AsyncIoStdAsTokio::poll_readimplementation. Swapping thebuf.initialized_mut()call tobuf.initialize_unfilled()resolved the problem. This copies the behavior oftokio-util/compat.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.