mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 19:25:56 +03:00
[GH-ISSUE #531] Building a recursor with trust-dns-server #224
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#224
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 @kpcyrd on GitHub (Jul 14, 2018).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/531
hey! I'm trying to build a custom dns recursor (similar to unbound), that listens for dns requests and depending on its configuration:
ABtrust-dns-server seems to be specifically for authoritative dns servers, as DnsHandler is expected to be non-blocking. Naively calling
Resolver::lookup_ipinside handle_request panics the thread withMultiple executors at once.In pseudocode, what I'm trying to do:
When using trust-dns-server as a resolver, it might also make sense to make some of the dependencies optional that aren't needed for non-authoritive dns servers, so it doesn't pull in rusqlite, for example. :)
@bluejekyll commented on GitHub (Jul 14, 2018):
That makes three of us ;)
Everything you just mentioned sounds about right. Please also see: #483 where there was a bit of discussion on this.
@kpcyrd commented on GitHub (Jul 15, 2018):
As an update (that doesn't really fit into #483), I've worked around
Multiple executors at oncewith a 2nd resolver thread and mrsc, so I'm now able to trigger the resolver from trust-dns-server and get the response back intohandle_request(this is blocking though, so I can only reply to one request at a time).I'm currently stuck with a lifetime error that I can not resolve, as it seems my records need to be able to outlivehandle_request(line 132), which is not possible in a recursor.Update: I was able to resolve my lifetime error by defining
answersas an empty mutable Vec before creating the MessageResponseBuilder, then extending it with my records.