mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
fix remaining Windows auth proxy regressions
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user