Skip to main content

build_profiled_client

Function build_profiled_client 

Source
pub fn build_profiled_client(
    profile: &TlsProfile,
    proxy_url: Option<&str>,
) -> Result<Client, TlsClientError>
Expand description

Build a [reqwest::Client] whose TLS ClientHello matches profile.

The returned client: (via default_user_agent).

  • Sets browser-matched HTTP headers via browser_headers (Accept, Accept-Encoding, Sec-CH-UA, etc.).
  • Routes through proxy_url when provided.

§Errors

§Example

use stygian_browser::tls::{build_profiled_client, CHROME_131};

let client = build_profiled_client(&CHROME_131, None).unwrap();