mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +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
@@ -107,7 +107,7 @@ impl TargetPolicy {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::config::NetworkProxySettings;
|
||||
use crate::config::NetworkProxyConfig;
|
||||
use crate::state::network_proxy_state_for_policy;
|
||||
use rama_net::address::HostWithPort;
|
||||
use std::net::Ipv4Addr;
|
||||
@@ -120,7 +120,7 @@ mod tests {
|
||||
.expect("bind local listener");
|
||||
let target = listener.local_addr().expect("local addr");
|
||||
let connector = TargetCheckedTcpConnector::new(Arc::new(network_proxy_state_for_policy(
|
||||
NetworkProxySettings::default(),
|
||||
NetworkProxyConfig::default(),
|
||||
)));
|
||||
|
||||
let request: rama_tcp::client::Request =
|
||||
@@ -142,9 +142,9 @@ mod tests {
|
||||
.expect("bind local listener");
|
||||
let target = listener.local_addr().expect("local addr");
|
||||
let connector = TargetCheckedTcpConnector::new(Arc::new(network_proxy_state_for_policy(
|
||||
NetworkProxySettings {
|
||||
NetworkProxyConfig {
|
||||
allow_local_binding: true,
|
||||
..NetworkProxySettings::default()
|
||||
..NetworkProxyConfig::default()
|
||||
},
|
||||
)));
|
||||
|
||||
|
||||
Reference in new issue
Block a user