mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
core: restore network approval protocol helper
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
Codex
parent
e2494aeaa1
commit
7c8927ed29
@@ -345,6 +345,18 @@ pub(crate) fn guardian_assessment_action_value(action: &GuardianApprovalRequest)
|
||||
}
|
||||
}
|
||||
|
||||
fn network_approval_protocol_value(protocol: NetworkApprovalProtocol) -> Value {
|
||||
Value::String(
|
||||
match protocol {
|
||||
NetworkApprovalProtocol::Http => "http",
|
||||
NetworkApprovalProtocol::Https => "https",
|
||||
NetworkApprovalProtocol::Socks5Tcp => "socks5_tcp",
|
||||
NetworkApprovalProtocol::Socks5Udp => "socks5_udp",
|
||||
}
|
||||
.to_string(),
|
||||
)
|
||||
}
|
||||
|
||||
pub(crate) fn guardian_request_id(request: &GuardianApprovalRequest) -> &str {
|
||||
match request {
|
||||
GuardianApprovalRequest::Shell { id, .. }
|
||||
|
||||
Reference in New Issue
Block a user