mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[GH-ISSUE #2137] Introduce TlsConnect and QuicConnect trait to be more flexible #896
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#896
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?
Originally created by @zh-jq-b on GitHub (Feb 6, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2137
Is your feature request related to a problem? Please describe.
The tls connect code should be same for DoT and DoH, for DoT we have rustls / openssl / native-tls support, but for DoH we only have rustls support, this should be changed to allow more flexible selection of tls libraries and the version.
And the tls connect code is simple, has little to do with the dns code, so they should be split out to avoid unnecessary major version bumps when the tls crate released new major versions.
Describe the solution you'd like
We should add TlsConnect trait, which will convert a
TcpStreaminto aTlsStream<TcpStream>, and use separate crate such as hickory-rustls, hickory-openssl, hickory-native-tls to provide impls, and it wouldn't be too much work to add new impls for users when they want to use a new tls crate or when they need to update rustls to a new version.We should add QuicConnect trait, to create h3
SendRequest<_>and also poll the close of the connection. The use of h3_quinn crate can be split into a hickory-quinn crate, and users can use their own h3 quic backend crates as long as the use the same h3 major version.@djc commented on GitHub (Feb 6, 2024):
What is the actual problem you're trying to solve?
@zh-jq-b commented on GitHub (Feb 7, 2024):
First, to use other tls / quic backends such as boringssl or quiche.
Second, to be able to update the tls / quic backends independently.
@djc commented on GitHub (Feb 7, 2024):
Out of curiosity, can you give more context on why you/Bytedance want to use different TLS/QUIC backends?
@zh-jq-b commented on GitHub (Feb 8, 2024):
I have forked a
variant-sslcrate fromopenssl, which added support Tongsuo and AWS-LC that won't be accepted byopensslcrate. So I don't want to have anotheropenssldependency.We have been using rustls in the G3 project for all of the hickory features,
but for this part, it's really a long time to wait when we want to update the version to 0.22 (rustls -> quinn -> h3_quinn -> hickory), I can disable the DoQ and DoH3 features for some time, but I don't want to disable DoT and DoH features.
And we may also have to support TLCP (a TLS variant protocol that is officially promoted in China) usage in DoT and DoH, so we have to use Tongsuo or some other tls crates in such case.