mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #3121] Tower-compatible services for hickory-server #1136
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#1136
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 @alexrudy on GitHub (Jul 14, 2025).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/3121
The hickory-server::ServeFuture implements what is effectively a tower::Service over the different transport protocols, creating a MakeService for each transport, and building a service which accepts a request and (in some cases) returns a response. Exposing such a service would allow for combining hickory-dns servers with the rest of the tower ecosystem and taking advantage of e.g. the wide availability of middleware.
@djc commented on GitHub (Jul 15, 2025):
Can you be more specific about what you're looking for? What problem or use case would this be trying to solve for?
(Note that I've already decomposed the
ServerFuture-- now calledServer-- quite a bit onmaincompared to 0.25.x. The direction I have in mind is to build more per-protocol public API which would potentially make it easier to wraptower::Servicestuff around it.)@alexrudy commented on GitHub (Jul 15, 2025):
One example: tower has good primitives for managing concurrent requests and load shedding, both of which are pretty baked into the internals of the current server.
For my use case, I also have a dynamically updated blocklist I use with most of my other projects, and being able to wrap DNS with the same block list would be handy, where as today that is pretty baked in to the hickory dns server.
A third case: I could see running DoH on a server that has multiple tower-based services running on the same listener.
In all of these cases I can hack my way to making things play nice with Hickory, but being able to throw a standard middleware stack on it would be nice.
@djc commented on GitHub (Jul 15, 2025):
Okay, if you want to move the code in this direction I can probably review it. Make sure to make small atomic commits, though.