pub async fn connect(
host: &str,
port: u16,
addr: SocketAddr,
profile: &ChromeProfile,
proxy: Option<&Proxy>,
) -> Result<QuikConnection>Expand description
Establishes a new network connection following the Chrome 134 transport pipeline.
This function orchestrates a multi-stage handshake to ensure the resulting connection is indistinguishable from a real browser:
- Proxy/TCP: Dials the target host (optionally via a SOCKS5/HTTP tunnel).
- TLS Handshake: Performs a BoringSSL handshake with ClientHello permutation, GREASE, and extension shuffling.
- ALPS/ECH: Injects per-connection application settings (ALPS) and ECH GREASE via raw BoringSSL FFI calls.
- H2 Handshake: Negotiates the HTTP/2 session using a specialized builder that replicates Chromium’s SETTINGS frame order and connection window increments.