[GH-ISSUE #2516] Make ForwardAuthority generic over its ConnectionProvider #1012

Closed
opened 2026-03-16 01:16:29 +03:00 by kerem · 1 comment
Owner

Originally created by @Stormshield-robinc on GitHub (Oct 17, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2516

The ForwardAuthority has the TokioAsyncResolver type hardcoded and there is no generic type.

Is your feature request related to a problem? Please describe.

On our project, we ended up in a situation where we need a forwarder, but for some sockets we need to apply specials options to the UDP socket.
All the code around AsyncResolver is nicely generic and allows us to simply wrap TokioRuntimeProvider to fit our needs. But sadly the ForwardAuthority is not generic on the ConnectionProvider it uses, which forced us to copy/past its implementation.

Describe the solution you'd like
It would be very nice to have a ForwardAuthority that would be generic on its connection provider, so we could cleanly override it.
In order to avoid breaking retro-compatibility it could be another type (something like "ForwardAuthorityGeneric") and ForwardAuthority would simply specify this type.

Would it be OK for you ? (I can provide a PR)

Describe alternatives you've considered
n/a

Additional context
n/a

Originally created by @Stormshield-robinc on GitHub (Oct 17, 2024). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2516 The `ForwardAuthority` has the `TokioAsyncResolver` type hardcoded and there is no generic type. **Is your feature request related to a problem? Please describe.** On our project, we ended up in a situation where we need a forwarder, but for some sockets we need to apply specials options to the UDP socket. All the code around `AsyncResolver` is nicely generic and allows us to simply wrap `TokioRuntimeProvider` to fit our needs. But sadly the `ForwardAuthority` is not generic on the `ConnectionProvider` it uses, which forced us to copy/past its implementation. **Describe the solution you'd like** It would be very nice to have a `ForwardAuthority` that would be generic on its connection provider, so we could cleanly override it. In order to avoid breaking retro-compatibility it could be another type (something like "ForwardAuthorityGeneric") and `ForwardAuthority` would simply specify this type. Would it be OK for you ? (I can provide a PR) **Describe alternatives you've considered** n/a **Additional context** n/a
kerem 2026-03-16 01:16:29 +03:00
  • closed this issue
  • added the
    cleanup
    label
Author
Owner

@djc commented on GitHub (Oct 17, 2024):

PR sounds good, no need to do backwards compatibility as we're going to release a semver-incompatible release anyway.

<!-- gh-comment-id:2419946143 --> @djc commented on GitHub (Oct 17, 2024): PR sounds good, no need to do backwards compatibility as we're going to release a semver-incompatible release anyway.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#1012
No description provided.