openai/codex · error · io::Error

network proxy route does not enable SOCKS5

Error message

network proxy route does not enable SOCKS5

What it means

Windows ingress guard in IngressDispatcher::serve: a client connection was attributed to a route whose registered services do not enable SOCKS5, so the shared ingress cannot dispatch the stream to a SOCKS handler. The connection is refused because the matched route only supports protocols it has not enabled.

Solutions

  1. Enable SOCKS5 on the network proxy route the client connects through
  2. Connect via the route's enabled protocol (e.g. HTTP proxy) instead
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at codex-rs/network-proxy/src/windows_proxy_ingress.rs:75 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/a75952c0b91953b0. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/network-proxy/src/windows_proxy_ingress.rs:75

impl Service<TcpStream> for IngressDispatcher {
    type Output = ();
    type Error = BoxError;

    async fn serve(&self, stream: TcpStream) -> Result<(), BoxError> {
        let local_addr = stream.local_addr()?;
        let peer_addr = stream.peer_addr()?;
        let restricting_sids = restricting_sids_for_tcp_connection(local_addr, peer_addr)?;
        let route = {
            let routes = self
                .routes
                .lock()
                .unwrap_or_else(std::sync::PoisonError::into_inner);
            registered_route_for_sids(&routes, &restricting_sids)?
        };
        let service = match self.protocol {
            ProxyProtocol::Http => route.http.clone(),
            ProxyProtocol::Socks => route.socks.clone().ok_or_else(|| {
                io::Error::new(
                    io::ErrorKind::PermissionDenied,
                    "network proxy route does not enable SOCKS5",
                )
            })?,
        };
        service.serve(stream).await
    }
}

pub(crate) struct WindowsProxyIngress {
    http_addr: SocketAddr,
    routes: RouteRegistry,
    runtime: Handle,
    http_task: JoinHandle<()>,
    socks: Mutex<SocksListenerState>,
}

struct SocksListenerState {

View on GitHub (pinned to 339751715c)