Fix standalone network proxy policy initialization (#46578)

Pass `Platform::native()` to `build_config_state` in the standalone network
proxy to satisfy its required executor OS argument and validate socket paths
for the host platform.

GitOrigin-RevId: d3ce8c513a3a6c5ffea6522d8b830deb40f1dfc8
This commit is contained in:
Eric Traut
2026-09-19 01:48:49 +00:00
committed by copyberry
parent e24ac448b3
commit 29a57861e3

View File

@@ -12,6 +12,7 @@ use codex_network_proxy::NetworkProxy;
use codex_network_proxy::NetworkProxyConfig;
use codex_network_proxy::NetworkProxyConstraints;
use codex_network_proxy::NetworkProxyState;
use codex_network_proxy::Platform;
use codex_network_proxy::build_config_state;
use serde::Deserialize;
use std::path::PathBuf;
@@ -92,8 +93,12 @@ async fn main() -> Result<()> {
"standalone network proxy requires network.enabled = true"
);
let config_state = build_config_state(config.network, NetworkProxyConstraints::default())
.context("failed to initialize network proxy policy")?;
let config_state = build_config_state(
config.network,
NetworkProxyConstraints::default(),
Platform::native(),
)
.context("failed to initialize network proxy policy")?;
let reloader = Arc::new(StaticConfigReloader {
state: config_state.clone(),
});