Skip to main content

tunnel_via_proxy

Function tunnel_via_proxy 

Source
pub async fn tunnel_via_proxy(
    target: &WsTarget,
    proxy: &ProxyTarget,
) -> Result<ProxiedStream, TransportError>
Expand description

Establish a tunneled connection through proxy to the WebSocket target.

On success the returned stream is positioned right after the proxy’s 200/2xx response, ready for the WebSocket handshake. The function does not perform the WebSocket handshake itself; callers wrap the stream in tokio-tungstenite::client_async.

§Errors

Returns a TransportError when: