Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow DNS overrides per request #2347

Open
Xiretza opened this issue Jul 7, 2024 · 1 comment
Open

Allow DNS overrides per request #2347

Xiretza opened this issue Jul 7, 2024 · 1 comment

Comments

@Xiretza
Copy link

Xiretza commented Jul 7, 2024

Currently, DNS overrides can only be configured globally for a client using ClientBuilder::resolve() (#561/#1277), not per-request.

My use case for this is matrix federation requests, which can be delegated to a different host using SRV records. Since this delegation should only affect the network address being connected to, not e.g. the Host header or TLS domain names, hooking the resolver is the most straightforward option, but for correctness and simplicity it would be much better to do this on a per-request basis rather than globally for all requests. Since redirects aren't allowed in this case anyway, even a simple .connect_to(ip_address) method on Request would suffice.

@oorrnae
Copy link

oorrnae commented Dec 10, 2024

#2444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants