mirror of
https://github.com/openai/codex.git
synced 2026-10-24 18:18:41 +00:00
Allow explicitly permitted loopback proxy targets (#34603)
## Why With `allow_local_binding = false`, proxy-aware clients bypassed the managed proxy for loopback and private IP targets. This prevented explicit local IP and `localhost` allowlist entries from taking effect. ## What changed - Route local targets through the managed proxy when local binding is disabled, while preserving direct access when it is enabled. - Allow a non-public connection only when its requested IP literal or `localhost` target is explicitly permitted. Continue blocking private addresses reached through unrelated hostnames. - Bypass inherited upstream proxies for non-public targets so Codex applies the local-target policy directly. ## Testing Added connector, upstream proxy, environment override, and Linux sandbox coverage for explicitly allowlisted loopback access. GitOrigin-RevId: 35e0d73633d5051816e096bc5aa8d586aec5eea4
This commit is contained in:
@@ -425,7 +425,7 @@ where
|
||||
}
|
||||
};
|
||||
let proxy = if allow_upstream_proxy {
|
||||
proxy_for_connect()
|
||||
proxy_for_connect(&authority)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user