mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
## Why Native TCP clients need to reach managed network destinations without implementing proxy support themselves. ## What changed - Add `--transparent-tcp` to the Linux sandbox command, using a bundled TCP stack, private TUN interface, and DNS stub to route native IPv4 and IPv6 connections through the attributed managed SOCKS proxy. - Preserve original hostnames for proxy policy checks and cancel pending approval connections when their native sockets close. - Expose `--linux-sandbox-transparent-tcp` and `--tcp-upstream-proxy` on `codex exec-server` for transparent routing and a mandatory HTTP CONNECT next hop without direct fallback. - Require private network and PID namespaces, private procfs, system `bwrap`, and access to `/dev/net/tun`; reject incompatible launcher options and untrusted proxy ports. ## Testing Add integration coverage for native hostname and IPv6 connections, SOCKS attribution, pending connection cancellation, policy denials, and filesystem and host-loopback isolation. Extend launcher and executor tests for option validation and managed-policy propagation. GitOrigin-RevId: 96bd7726e5369efceb65320face56aa85ae3deb8
59 lines
1.7 KiB
TOML
59 lines
1.7 KiB
TOML
[package]
|
|
name = "codex-linux-sandbox"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[[bin]]
|
|
name = "codex-linux-sandbox"
|
|
path = "src/main.rs"
|
|
|
|
[lib]
|
|
name = "codex_linux_sandbox"
|
|
path = "src/lib.rs"
|
|
doctest = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
async-lock = "3"
|
|
clap = { workspace = true, features = ["derive"] }
|
|
codex-install-context = { workspace = true }
|
|
codex-network-proxy = { workspace = true }
|
|
codex-process-hardening = { workspace = true }
|
|
codex-protocol = { workspace = true }
|
|
codex-sandboxing = { workspace = true }
|
|
codex-uds = { workspace = true }
|
|
codex-utils-absolute-path = { workspace = true }
|
|
etherparse = { version = "=0.21.0", default-features = false }
|
|
hickory-proto = "=0.26.3"
|
|
ignore = { workspace = true }
|
|
indexmap = { workspace = true }
|
|
landlock = { workspace = true }
|
|
rand = { workspace = true }
|
|
libc = { workspace = true }
|
|
rustix = { workspace = true, features = ["process", "thread"] }
|
|
seccompiler = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
smoltcp = { version = "=0.14.0", default-features = false, features = ["std", "phy-tuntap_interface", "medium-ip", "proto-ipv4", "proto-ipv6", "socket-tcp"] }
|
|
socks5-protocol = { version = "=0.3.5", features = ["sync"] }
|
|
url = { workspace = true }
|
|
|
|
[target.'cfg(target_os = "linux")'.dev-dependencies]
|
|
codex-core = { workspace = true }
|
|
codex-utils-cargo-bin = { workspace = true }
|
|
pretty_assertions = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
test-case = "3.3.1"
|
|
tokio = { workspace = true, features = [
|
|
"io-std",
|
|
"macros",
|
|
"process",
|
|
"rt-multi-thread",
|
|
"signal",
|
|
"sync",
|
|
] }
|