1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! # http-quik: High-Fidelity stealth transport engine
//!
//! `http-quik` is a specialized HTTP transport library designed for absolute network identity parity
//! with Google Chrome. It provides low-level control over the entire protocol stack—from TLS
//! handshakes to HTTP/2 frame signaling—to ensure that every network interaction is
//! indistinguishable from a real browser.
//!
//! This crate is a core component of the [Phantom Engine](https://github.com/polymit/phantom-engine)
//! ecosystem and provides the high-stealth transport layer required for modern agentic navigation.
//!
//! ## Why http-quik?
//! Modern Anti-Bot systems (like Cloudflare, Akamai, and DataDome) use "Passive Fingerprinting"
//! to identify automated traffic. They inspect:
//! 1. **TLS Fingerprint (JA3/JA4)**: The order of cipher suites, extensions, and elliptic curves.
//! 2. **HTTP/2 Fingerprint (Akamai)**: The SETTINGS frame values, the order of pseudo-headers, and stream priority.
//!
//! `http-quik` solves this by using a custom BoringSSL stack and a specialized HTTP/2 builder to replicate
//! these fingerprints with bit-perfect accuracy.
//!
//! ## Core Features
//! - **BoringSSL Integration**: Full control over ClientHello, including GREASE and extension permutation.
//! - **Chrome 134 Identity**: Pre-configured profiles for the latest Chrome stable releases.
//! - **Connection Pooling**: Managed H2 session reuse to maintain consistent behavioral fingerprints.
//! - **Stealth Redirects**: A redirect state machine that handles `sec-fetch-*` headers and method rotation identical to Chromium.
//!
//! ## Getting Started
//!
//! ```rust
//! use http_quik::{Client, ChromeProfile, Platform};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), http_quik::Error> {
//! // Create a client with a macOS Chrome 134 identity
//! let client = Client::builder()
//! .profile(http_quik::profile::chrome_134::profile(Platform::MacOsArm))
//! .build()?;
//!
//! // Execute a stealth request
//! let response = client.get("https://example.com").await?;
//! println!("Status: {}", response.status());
//!
//! Ok(())
//! }
//! ```
//!
//! ## Safety & FFI
//! This crate uses `boring` and `boring-sys` for low-level TLS control. All unsafe blocks are
//! localized to the `tls` and `client` modules and are documented with safety rationales.
/// Low-level HTTP/2 frame and builder configuration.
///
/// This module provides internal utilities for overriding the default H2 handshake
/// to match Chromium's behavioral markers.
pub
/// TLS connector construction and FFI bindings for BoringSSL.
///
/// Handles the bit-perfect replication of Chrome's TLS handshake, including
/// post-quantum key shares and extension permutation.
pub
pub use crate;
pub use crate;
pub use crateAKAMAI_FINGERPRINT;
pub use crateJA3_HASH;
pub use crate;