{"record":{"id":"71605929f1e62a95","repo":"openai/codex","slug":"unsupported","errorCode":"Unsupported","errorMessage":"Windows proxy connection attribution currently supports IPv4 only","messagePattern":"Windows proxy connection attribution currently supports IPv4 only","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/network-proxy/src/windows_tcp_attribution.rs","lineNumber":47,"sourceCode":"use windows_sys::Win32::Security::TOKEN_QUERY;\nuse windows_sys::Win32::Security::TokenRestrictedSids;\nuse windows_sys::Win32::System::Threading::OpenProcess;\nuse windows_sys::Win32::System::Threading::OpenProcessToken;\nuse windows_sys::Win32::System::Threading::PROCESS_QUERY_LIMITED_INFORMATION;\n\n/// Returns the restricting SIDs on the process that opened an accepted loopback connection.\n///\n/// `accepted_local_addr` and `accepted_peer_addr` must come from the accepted server socket. The\n/// owning-PID table describes the client side in the opposite direction, so the lookup matches the\n/// exact reversed four-tuple.\npub(crate) fn restricting_sids_for_tcp_connection(\n    accepted_local_addr: SocketAddr,\n    accepted_peer_addr: SocketAddr,\n) -> io::Result<Vec<String>> {\n    let (SocketAddr::V4(accepted_local_addr), SocketAddr::V4(accepted_peer_addr)) =\n        (accepted_local_addr, accepted_peer_addr)\n    else {\n        return Err(io::Error::new(\n            io::ErrorKind::Unsupported,\n            \"Windows proxy connection attribution currently supports IPv4 only\",\n        ));\n    };\n\n    let process_id = owning_process_id(accepted_local_addr, accepted_peer_addr)?;\n    restricting_sids_for_process(process_id)\n}\n\nfn owning_process_id(\n    accepted_local_addr: SocketAddrV4,\n    accepted_peer_addr: SocketAddrV4,\n) -> io::Result<u32> {\n    let mut byte_len = 0_u32;\n    let result = unsafe {\n        GetExtendedTcpTable(\n            std::ptr::null_mut(),\n            &mut byte_len,","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/network-proxy/src/windows_tcp_attribution.rs#L29-L65","documentation":"Error \"Windows proxy connection attribution currently supports IPv4 only\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/network-proxy/src/windows_tcp_attribution.rs:47 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"}