mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[PR #1876] [MERGED] API-breaking change: Deprecate ConnectionProvider with new RuntimeProvider #2669
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#2669
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/1876
Author: @XOR-op
Created: 1/9/2023
Status: ✅ Merged
Merged: 3/4/2023
Merged by: @bluejekyll
Base:
main← Head:main📝 Commits (10+)
27ad963WIP: many underlying type except mdns458010drevert mdnsecb9f15WIP: narrow UdpSocket down to DnsUdpSocket01ba4afWIP: udp creator05d172eWIP: clean generic for NameServer20dfc17WIP: logic of NameServer32a4d06fix nameserver logic and udp socket creation823d5bdreplace ConnProvider with RuntimeProvider5b3b68etest: fix compile errors8e780d2trait CreateConnection📊 Changes
45 files changed (+1589 additions, -903 deletions)
View changed files
📝
Cargo.lock(+3 -2)📝
crates/async-std-resolver/src/lib.rs(+5 -6)📝
crates/async-std-resolver/src/net.rs(+34 -26)📝
crates/async-std-resolver/src/runtime.rs(+25 -17)📝
crates/async-std-resolver/src/tests.rs(+68 -63)📝
crates/proto/Cargo.toml(+2 -1)📝
crates/proto/src/https/https_client_stream.rs(+40 -25)📝
crates/proto/src/native_tls/tls_client_stream.rs(+36 -3)📝
crates/proto/src/native_tls/tls_stream.rs(+62 -30)📝
crates/proto/src/openssl/tls_client_stream.rs(+41 -8)📝
crates/proto/src/openssl/tls_stream.rs(+65 -44)📝
crates/proto/src/quic/mod.rs(+1 -0)📝
crates/proto/src/quic/quic_client_stream.rs(+142 -3)📝
crates/proto/src/rustls/tls_client_stream.rs(+35 -2)📝
crates/proto/src/rustls/tls_stream.rs(+65 -5)📝
crates/proto/src/tcp/tcp_client_stream.rs(+26 -4)📝
crates/proto/src/tcp/tcp_stream.rs(+54 -28)📝
crates/proto/src/tests/tcp.rs(+4 -8)📝
crates/proto/src/tests/udp.rs(+2 -2)📝
crates/proto/src/udp/mod.rs(+1 -1)...and 25 more files
📄 Description
Why we need new interface?
Current
ConnectionProviderinterface didn't provide enough ability for end-users to create customized connections, although it looked like. For example, users find it hard to customize underlying TCP or UDP sockets, see #1863, #1870, #1335. Users may also seek for abstract TCP stream instead of real one. Related discussion can be found on #1863.What is our plan?
We design new
RuntimeProviderinterface, whose responsibility is to provide TCP-like and UDP-like connections. Currently, the new interface looks like:where we introduce new
DnsUdpSocketas the counterpart ofDnsTcpSocket,removing requirements for bind and connect.Design problems
Should we takeGenericConnectionas our only implementation, or leaving some interface for users to implement their own ones?Progress
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.