fix: Don't try to use system resolv.conf when other servers are configured #2460

Open
silversys wants to merge 3 commits from silversys/continuwuity:silversys/fix-dns-resolution-errors into main

2026-11-05

fix: Add DNS resolver to oidc crate as well
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 8s
Checks / Prek / Check changed files (pull_request) Successful in 10s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m23s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 9m14s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 21m2s
Because openidconnect vendors reqwest (??), we have to re-implement
the entire Resolve trait.

No I don't like it, but I can't think of a better solution.
2026-11-05 13:27:10 +01:00
fix: Don't try to use system resolv.conf when other servers are configured
Previously, only HTTP clients targeting matrix servers (and using the
resolution spec) would use the DNS servers configured in the c10y config.
This happened because reqwest requires any DNS resolvers passed in to
implement reqwest::dns::Resolve, which only the matrix resolver did,
and no other HTTP client had a proper DNS resolver (which used the
configured DNS servers) passed into it.

To fix this we make a custom resolution struct based on reqwest's
reqwest::dns::HickoryDnsResolver, which implements Request with no
other modifications to the DNS response. HickoryDnsResolver itself isn't
exported, which is why we re-created it instead of using it directly.

no im not an LLM i just wrote this to remember my own changes later on

Fixes: continuwuation/continuwuity#2441
2026-11-05 00:47:32 +01:00