diff --git a/codex-rs/cli/src/login.rs b/codex-rs/cli/src/login.rs index c95a98bce2..c695b6f3e0 100644 --- a/codex-rs/cli/src/login.rs +++ b/codex-rs/cli/src/login.rs @@ -10,12 +10,12 @@ use codex_app_server_protocol::AuthMode; use codex_config::types::AuthCredentialsStoreMode; use codex_core::config::Config; +use codex_login::AuthManager; use codex_login::CLIENT_ID; use codex_login::CodexAuth; use codex_login::ServerOptions; use codex_login::login_with_access_token_with_proxy_config; use codex_login::login_with_api_key; -use codex_login::logout_with_revoke; use codex_login::run_device_code_login; use codex_login::run_login_server; use codex_protocol::config_types::ForcedLoginMethod; @@ -424,8 +424,10 @@ pub async fn run_login_status(cli_config_overrides: CliConfigOverrides) -> ! { pub async fn run_logout(cli_config_overrides: CliConfigOverrides) -> ! { let config = load_config_or_exit(cli_config_overrides).await; + let auth_manager = + AuthManager::shared_from_config(&config, /*enable_codex_api_key_env*/ false).await; - match logout_with_revoke(&config.codex_home, config.cli_auth_credentials_store_mode).await { + match auth_manager.logout_with_revoke().await { Ok(true) => { eprintln!("Successfully logged out"); std::process::exit(0); diff --git a/codex-rs/codex-client/src/outbound_proxy.rs b/codex-rs/codex-client/src/outbound_proxy.rs index 71582764be..172c578993 100644 --- a/codex-rs/codex-client/src/outbound_proxy.rs +++ b/codex-rs/codex-client/src/outbound_proxy.rs @@ -150,7 +150,7 @@ fn configure_proxy_for_route( || !SystemProxyEnvOverride::from_env().system_discovery_enabled() { RouteDiagnostic::direct(target, RouteSource::Disabled, custom_ca_configured).emit_opt_in(); - return Ok(builder); + return Ok(builder.no_proxy()); } if !system_proxy_supported() { @@ -233,6 +233,7 @@ fn configure_concrete_proxy( return Err(BuildProxiedHttpClientError::InvalidProxyConfig { target }); } }; + let proxy = proxy.no_proxy(reqwest::NoProxy::from_env()); RouteDiagnostic::proxy(target, source, proxy_url, custom_ca_configured).emit_opt_in(); Ok(builder.proxy(proxy)) } diff --git a/codex-rs/login/src/auth/auth_tests.rs b/codex-rs/login/src/auth/auth_tests.rs index 908333817c..f8ff482477 100644 --- a/codex-rs/login/src/auth/auth_tests.rs +++ b/codex-rs/login/src/auth/auth_tests.rs @@ -367,6 +367,7 @@ async fn refresh_failure_is_scoped_to_the_matching_auth_snapshot() { updated_auth_dot_json, AuthCredentialsStoreMode::File, /*chatgpt_base_url*/ None, + /*outbound_proxy_config*/ None, ) .await .expect("updated auth should parse");