mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
Allow network policy to enable transparent TCP capture (#61851)
## What changed - Add `transparent_tcp` to network configuration and managed requirements, defaulting to off. When enabled, route outbound TCP from managed Linux sandbox commands through the managed SOCKS5 proxy without requiring an executor startup flag. - Propagate the setting through local and remote execution, require an enabled SOCKS5 proxy, and check the executor's `networkProxyTransparentTcp` capability before remote launches. - Refresh the live proxy when switching between permission profiles with different network settings. ## Testing Add coverage for configuration-driven sandbox capture, rejection of unsupported launch contexts, execution parameter propagation, and live permission profile changes. GitOrigin-RevId: c4db87056de116f433a128806bef673802f35397
This commit is contained in:
@@ -137,6 +137,9 @@ pub struct NetworkProxyConfig {
|
||||
#[serde(default = "default_proxy_url")]
|
||||
pub proxy_url: String,
|
||||
pub enable_socks5: bool,
|
||||
/// Route outbound TCP from managed Linux sandbox commands through the managed SOCKS5 proxy.
|
||||
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||
pub transparent_tcp: bool,
|
||||
#[serde(default = "default_socks_url")]
|
||||
pub socks_url: String,
|
||||
pub enable_socks5_udp: bool,
|
||||
@@ -188,6 +191,7 @@ impl Default for NetworkProxyConfig {
|
||||
enabled: false,
|
||||
proxy_url: default_proxy_url(),
|
||||
enable_socks5: true,
|
||||
transparent_tcp: false,
|
||||
socks_url: default_socks_url(),
|
||||
enable_socks5_udp: true,
|
||||
allow_upstream_proxy: true,
|
||||
@@ -750,6 +754,7 @@ mod tests {
|
||||
assert_eq!(
|
||||
NetworkProxyConfig::default(),
|
||||
NetworkProxyConfig {
|
||||
transparent_tcp: false,
|
||||
enabled: false,
|
||||
proxy_url: "http://127.0.0.1:3128".to_string(),
|
||||
enable_socks5: true,
|
||||
|
||||
Reference in New Issue
Block a user