Use proxy environment variables across Codex HTTP clients

Open 💬 5 comments Opened Sep 25, 2025 by orbli

What feature would you like to see?

Codex CLI should automatically honor HTTPS_PROXY, HTTP_PROXY, and ALL_PROXY for every outgoing reqwest client. Today users behind corporate proxies must patch individual call sites (login, Ollama, etc.), and inconsistent headers creep in. I’d like a shared helper (e.g., codex_core::default_client::apply_env_proxy) that reads those variables in priority order, applies reqwest::Proxy::all, and gracefully logs when a value can’t be parsed, so every HTTP client benefits without extra boilerplate.

Are you interested in implementing this feature?

Yes. I have a branch (feat/env-proxy-client) https://github.com/openai/codex/pull/3455 that adds apply_env_proxy, wires it into create_client(), and updates codex-login and codex-ollama to go through the centralized builder. I’m happy to iterate once the team confirms the approach fits the roadmap.

Additional information

I searched existing issues for “proxy env var” and “HTTP_PROXY”; the closest matches (#3510, #2939, #2414) cover different proxy problems, so I believe this is new. Longer term we could also support lowercase variants and NO_PROXY, but I’m scoping this request to the upper-case variables to keep review focused.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗