mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +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:
@@ -179,6 +179,9 @@ pub struct RemoteNetworkProxyConfig {
|
||||
)]
|
||||
credential_masking: CredentialMaskingConfig,
|
||||
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,
|
||||
pub enable_socks5_udp: bool,
|
||||
pub allow_upstream_proxy: bool,
|
||||
pub dangerously_allow_all_unix_sockets: bool,
|
||||
@@ -206,6 +209,7 @@ impl RemoteNetworkProxyConfig {
|
||||
enabled: config.enabled,
|
||||
credential_masking: CredentialMaskingConfig::default(),
|
||||
enable_socks5: config.enable_socks5,
|
||||
transparent_tcp: config.transparent_tcp,
|
||||
enable_socks5_udp: config.enable_socks5_udp,
|
||||
allow_upstream_proxy: config.allow_upstream_proxy,
|
||||
dangerously_allow_all_unix_sockets: config
|
||||
@@ -239,6 +243,7 @@ impl RemoteNetworkProxyConfig {
|
||||
let mut config = NetworkProxyConfig {
|
||||
enabled: self.enabled,
|
||||
enable_socks5: self.enable_socks5,
|
||||
transparent_tcp: self.transparent_tcp,
|
||||
enable_socks5_udp: self.enable_socks5_udp,
|
||||
allow_upstream_proxy: self.allow_upstream_proxy,
|
||||
dangerously_allow_all_unix_sockets: Some(self.dangerously_allow_all_unix_sockets),
|
||||
|
||||
Reference in New Issue
Block a user