mirror of
https://github.com/openai/codex.git
synced 2026-09-20 12:47:38 +00:00
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:
@@ -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(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user