Skip to content

fix: disable hickory-dns in auth HTTP client#2828

Draft
yeswecan wants to merge 6 commits into
tailcallhq:mainfrom
yeswecan:fix/auth-hickory-dns
Draft

fix: disable hickory-dns in auth HTTP client#2828
yeswecan wants to merge 6 commits into
tailcallhq:mainfrom
yeswecan:fix/auth-hickory-dns

Conversation

@yeswecan
Copy link
Copy Markdown

@yeswecan yeswecan commented Apr 3, 2026

Summary

The auth HTTP client in build_http_client() (crates/forge_infra/src/auth/util.rs) doesn't call .hickory_dns(false). Since the workspace enables the hickory-dns cargo feature, this client attempts direct DNS resolution even when HTTP_PROXY/HTTPS_PROXY are set, breaking OAuth in proxy environments.

The main HTTP client in crates/forge_infra/src/http.rs already sets .hickory_dns(false) — this one-line fix aligns the auth client to match.

Fixes Authentication completion failed: Failed to exchange authorization code: error sending request for url (https://console.anthropic.com/v1/oauth/token) when behind a proxy.

The auth HTTP client uses a bare reqwest builder that defaults to
hickory-dns (enabled via cargo feature), which attempts direct DNS
resolution even when HTTP_PROXY/HTTPS_PROXY are set. This breaks
OAuth token exchange in proxy environments where DNS only resolves
through the proxy.

The main HTTP client already sets .hickory_dns(false) — this aligns
the auth client to match.
@github-actions github-actions Bot added the type: fix Iterations on existing features or infrastructure. label Apr 3, 2026
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 3, 2026

CLA assistant check
All committers have signed the CLA.

@yeswecan
Copy link
Copy Markdown
Author

yeswecan commented Apr 3, 2026

@CLAassistant added the backup email that I used for the commit to my GitHub account. CLA website still shows me no way to accept the terms or w.e.

@github-actions
Copy link
Copy Markdown

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions Bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Apr 13, 2026
@github-actions github-actions Bot removed the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Apr 14, 2026
@github-actions
Copy link
Copy Markdown

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions Bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Apr 19, 2026
@github-actions github-actions Bot removed the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Apr 24, 2026
@github-actions
Copy link
Copy Markdown

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions Bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Apr 30, 2026
.redirect(reqwest::redirect::Policy::none())
// Use system DNS resolver instead of hickory-dns to work correctly
// behind proxies (where direct DNS resolution may not be available)
.hickory_dns(false);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use config to set it. Instead of hardcodeing

@amitksingh1490 amitksingh1490 removed the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label May 14, 2026
@amitksingh1490
Copy link
Copy Markdown
Contributor

Please move it ready to review once above comment is resolved

@amitksingh1490 amitksingh1490 marked this pull request as draft May 14, 2026 04:34
@github-actions
Copy link
Copy Markdown

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions Bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants