zeroclaw-labs/zeroclaw · error

Unsupported proxy scheme '{scheme}' for WebSocket connection

Error message

Unsupported proxy scheme '{scheme}' for WebSocket connections

What it means

Error "Unsupported proxy scheme '{scheme}' for WebSocket connections" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-config/src/schema.rs:10981

                        .lines()
                        .next()
                        .unwrap_or("");
                    if !status_line.contains("200") {
                        anyhow::bail!(
                            "HTTP CONNECT proxy returned non-200 response: {status_line}"
                        );
                    }
                    break;
                }
                if total >= buf.len() {
                    anyhow::bail!("HTTP CONNECT proxy response too large");
                }
            }

            BoxedIo(Box::new(tcp))
        }
        scheme => {
            anyhow::bail!("Unsupported proxy scheme '{scheme}' for WebSocket connections");
        }
    };

    // If the target is wss://, wrap in TLS.
    let is_secure = target.scheme() == "wss";
    let stream: BoxedIo = if is_secure {
        let mut root_store = rustls::RootCertStore::empty();
        root_store.extend(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());
        let tls_config = std::sync::Arc::new(
            rustls::ClientConfig::builder()
                .with_root_certificates(root_store)
                .with_no_client_auth(),
        );
        let connector = tokio_rustls::TlsConnector::from(tls_config);
        let server_name = rustls_pki_types::ServerName::try_from(target_host.clone())
            .with_context(|| format!("Invalid TLS server name: {target_host}"))?;

        // `stream` is `BoxedIo` — we need a concrete `AsyncRead + AsyncWrite`

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Use a supported proxy scheme (http/https/socks5) for WebSocket connections.

When it happens

Trigger: Thrown at crates/zeroclaw-config/src/schema.rs:10981 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/16b85880101f3693. Report an issue: GitHub.