{"record":{"id":"7ca677050ab1cec7","repo":"openai/codex","slug":"invalid-host","errorCode":null,"errorMessage":"invalid host","messagePattern":"invalid host","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/network-proxy/src/socks5.rs","lineNumber":206,"sourceCode":"}\n\nasync fn handle_socks5_tcp(\n    req: TcpRequest,\n    tcp_connector: TargetCheckedTcpConnector,\n    policy_decider: Option<Arc<dyn NetworkPolicyDecider>>,\n    environment_id: Option<String>,\n) -> Result<EstablishedClientConnection<Socks5TcpConnection, TcpRequest>, BoxError> {\n    let app_state = req\n        .extensions()\n        .get::<Arc<NetworkProxyState>>()\n        .cloned()\n        .ok_or_else(|| io::Error::other(\"missing state\"))?;\n\n    let host = normalize_host(&req.authority.host.to_string());\n    let port = req.authority.port;\n    let target = req.authority.clone();\n    if host.is_empty() {\n        return Err(io::Error::new(io::ErrorKind::InvalidInput, \"invalid host\").into());\n    }\n\n    let client = req\n        .extensions()\n        .get::<SocketInfo>()\n        .map(|info| info.peer_addr().to_string());\n\n    match app_state.enabled().await {\n        Ok(true) => {}\n        Ok(false) => {\n            emit_socks_block_decision_audit_event(\n                &app_state,\n                NetworkDecisionSource::ProxyState,\n                REASON_PROXY_DISABLED,\n                NetworkProtocol::Socks5Tcp,\n                host.as_str(),\n                port,\n                client.as_deref(),","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/network-proxy/src/socks5.rs#L188-L224","documentation":"Error \"invalid host\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/network-proxy/src/socks5.rs:206 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}