pub struct OrderedHeaders { /* private fields */ }Expand description
Ordered headers with JA4H fingerprint calculation.
JA4H (JA4 for HTTP) fingerprints HTTP clients based on:
- Header order
- Header names (normalized to lowercase)
This implementation is intentionally header-name/order based and does not include header values in the hash. Firefox version differences that only change the User-Agent value are not JA4H-distinguishable here.
This type preserves exact header order for fingerprint accuracy.
Implementations§
Source§impl OrderedHeaders
impl OrderedHeaders
Create Chrome navigation headers with exact order. Uses Chrome 148 (latest implemented) by default.
Create Firefox navigation headers with exact order. Uses Firefox 151 (latest implemented release) by default.
Sourcepub fn headers(&self) -> &[(String, String)]
pub fn headers(&self) -> &[(String, String)]
Get headers as vector pairs (cached for stable references).
Sourcepub fn headers_ref(&self) -> &Headers
pub fn headers_ref(&self) -> &Headers
Borrow the underlying byte-spanned headers.
Sourcepub fn ja4h_fingerprint(&self) -> String
pub fn ja4h_fingerprint(&self) -> String
Calculate JA4H fingerprint string.
JA4H format: header_names|header_order_hash
- header_names: comma-separated lowercase header names
- header_order_hash: hash of header order