This add a new crate, `codex-network-proxy`, a local network proxy service used by Codex to enforce fine-grained network policy (domain allow/deny) and to surface blocked network events for interactive approvals. - New crate: `codex-rs/network-proxy/` (`codex-network-proxy` binary + library) - Core capabilities: - HTTP proxy support (including CONNECT tunneling) - SOCKS5 proxy support (in the later PR) - policy evaluation (allowed/denied domain lists; denylist wins; wildcard support) - small admin API for polling/reload/mode changes - optional MITM support for HTTPS CONNECT to enforce “limited mode” method restrictions (later PR) Will follow up integration with codex in subsequent PRs. ## Testing - `cd codex-rs && cargo build -p codex-network-proxy` - `cd codex-rs && cargo run -p codex-network-proxy -- proxy`
6 lines
380 B
Rust
6 lines
380 B
Rust
pub(crate) const REASON_DENIED: &str = "denied";
|
|
pub(crate) const REASON_METHOD_NOT_ALLOWED: &str = "method_not_allowed";
|
|
pub(crate) const REASON_NOT_ALLOWED: &str = "not_allowed";
|
|
pub(crate) const REASON_NOT_ALLOWED_LOCAL: &str = "not_allowed_local";
|
|
pub(crate) const REASON_POLICY_DENIED: &str = "policy_denied";
|
|
pub(crate) const REASON_PROXY_DISABLED: &str = "proxy_disabled";
|