use std::net::Ipv4Addr; use reqwest::impersonate::Impersonate; use reqwest_impersonate as reqwest; #[tokio::main] async fn main() -> Result<(), Box> { // Build a client to mimic Chrome126 let mut client = reqwest::Client::builder() .impersonate(Impersonate::Chrome126) .enable_ech_grease() .permute_extensions() .build()?; let resp = client.get("https://api.ip.sb/ip").send().await?; println!("{}", resp.text().await?); client.set_local_address(Some(Ipv4Addr::new(172, 20, 10, 2).into())); let resp = client.get("https://api.ip.sb/ip").send().await?; println!("{}", resp.text().await?); Ok(()) }