From 097602b11f3e7bafa8963b4f05ee6191ea0ed54f Mon Sep 17 00:00:00 2001 From: canvrno-oai Date: Mon, 22 Jun 2026 16:15:46 -0700 Subject: [PATCH] Enable sandbox PAC routing with respect_system_proxy --- codex-rs/core/src/config/mod.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/codex-rs/core/src/config/mod.rs b/codex-rs/core/src/config/mod.rs index a6c1166373..90f7d5c36f 100644 --- a/codex-rs/core/src/config/mod.rs +++ b/codex-rs/core/src/config/mod.rs @@ -3322,8 +3322,12 @@ impl Config { Vec::new(), ) }; - if enable_network_proxy && permission_profile.network_sandbox_policy().is_enabled() { - if let Some(network_proxy) = network_proxy_toml_config(cfg.features.as_ref()) { + if (enable_network_proxy || respect_system_proxy) + && permission_profile.network_sandbox_policy().is_enabled() + { + if enable_network_proxy + && let Some(network_proxy) = network_proxy_toml_config(cfg.features.as_ref()) + { apply_network_proxy_feature_config( &mut configured_network_proxy_config, network_proxy, @@ -4083,10 +4087,13 @@ impl Config { cfg.permissions.as_ref(), active_permission_profile.id.as_str(), )?; - if self.features.enabled(Feature::NetworkProxy) + let enable_network_proxy = self.features.enabled(Feature::NetworkProxy); + if (enable_network_proxy || self.respect_system_proxy) && permission_profile.network_sandbox_policy().is_enabled() { - if let Some(network_proxy) = network_proxy_toml_config(cfg.features.as_ref()) { + if enable_network_proxy + && let Some(network_proxy) = network_proxy_toml_config(cfg.features.as_ref()) + { apply_network_proxy_feature_config( &mut configured_network_proxy_config, network_proxy,