mirror of
https://github.com/openai/codex.git
synced 2026-11-22 15:15:18 +00:00
Remove the network proxy config wrapper (#31767)
## Why `NetworkProxyConfig` only wrapped `NetworkProxySettings` in a single `network` field. That extra level made runtime callers repeat `.network` everywhere without representing a real boundary. ## What changed - move the managed-network fields directly onto `NetworkProxyConfig` - collapse the matching partial-config wrapper - update runtime callers and tests to use the direct fields - keep the user-facing permissions/profile TOML layout unchanged The internal serialized shape now matches the runtime type itself. This does not change managed-network behavior or the `config.toml` shape.
This commit is contained in:
25 files changed
+428
-632
No files matched your search
@@ -220,7 +220,7 @@ fn network_toml_overlays_unix_socket_permissions_by_path() {
|
||||
.apply_to_network_proxy_config(&mut config);
|
||||
|
||||
assert_eq!(
|
||||
config.network.unix_sockets,
|
||||
config.unix_sockets,
|
||||
Some(codex_network_proxy::NetworkUnixSocketPermissions {
|
||||
entries: BTreeMap::from([
|
||||
(
|
||||
@@ -399,7 +399,7 @@ fn profile_network_proxy_config_keeps_proxy_disabled_for_bare_network_access() {
|
||||
..Default::default()
|
||||
}));
|
||||
|
||||
assert!(!config.network.enabled);
|
||||
assert!(!config.enabled);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -417,11 +417,11 @@ fn profile_network_proxy_config_keeps_proxy_disabled_for_proxy_policy() {
|
||||
..Default::default()
|
||||
}));
|
||||
|
||||
assert!(!config.network.enabled);
|
||||
assert_eq!(config.network.proxy_url, "http://127.0.0.1:43128");
|
||||
assert!(!config.network.enable_socks5);
|
||||
assert!(!config.enabled);
|
||||
assert_eq!(config.proxy_url, "http://127.0.0.1:43128");
|
||||
assert!(!config.enable_socks5);
|
||||
assert_eq!(
|
||||
config.network.domains,
|
||||
config.domains,
|
||||
Some(codex_network_proxy::NetworkDomainPermissions {
|
||||
entries: vec![codex_network_proxy::NetworkDomainPermissionEntry {
|
||||
pattern: "openai.com".to_string(),
|
||||
|
||||
Reference in new issue
Block a user