fix: add hickory-dns resolver for musl/Android Termux DNS resolution#164
fix: add hickory-dns resolver for musl/Android Termux DNS resolution#164
Conversation
…163) musl's getaddrinfo hardcodes /etc/resolv.conf lookup which doesn't exist on Android. The hickory-dns feature replaces reqwest's default DNS resolver with hickory-resolver, which handles Android's DNS configuration correctly. Bahtya
Retroactive Code Review — PR #164Issue #163 Summarymusl's CRITICAL: Cargo.lock is inconsistent — hickory-resolver packages are missingThe
This means: the committed lock file does not actually activate hickory-dns. If
Action needed: Run MEDIUM: Unrelated Cargo.lock changes bundled inThe diff shows 247 packages removed, 45 added (+381/-3125 lines), far exceeding what a single feature flag addition should produce. The changes include:
This happened because PR #164's Cargo.lock was regenerated from a state where PR #160's dependency changes hadn't been locked yet, picking up both changes in one shot. LOW: native-tls still present despite
|
Summary
hickory-dnsfeature flag to workspace reqwest dependency, replacing the default DNS resolver with hickory-resolverProblem
musl's
getaddrinfo()hardcodes/etc/resolv.conflookup, which doesn't exist on Android Termux. This causes all HTTPS requests to timeout with 5-second delays when running the statically-linked musl binary on Android.Fix
The reqwest
hickory-dnsfeature replaces the system resolver with hickory-resolver, which correctly handles Android's DNS configuration. No code changes needed — the feature flag applies globally to allreqwest::Clientinstances.Impact
/etc/resolv.confsame as systemCloses #163
Test plan
kestrelresolvesapi.telegram.orgwithout timeoutBahtya