Skip to main content

Module tls

Module tls 

Source
Expand description

TLS fingerprint profile types with JA3/JA4 representation.

ALPN preferences that match genuine browsers.

§Built-in profiles

Four static profiles ship with real-world TLS parameters:

ProfileBrowser
CHROME_131Google Chrome 131
FIREFOX_133Mozilla Firefox 133
SAFARI_18Apple Safari 18
EDGE_131Microsoft Edge 131

§Example

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

let profile: &TlsProfile = &*CHROME_131;
assert_eq!(profile.name, "Chrome 131");

let ja3 = profile.ja3();
assert!(!ja3.raw.is_empty());
assert!(!ja3.hash.is_empty());

let ja4 = profile.ja4();
assert!(ja4.fingerprint.starts_with("t13"));

Structs§

CipherSuiteId
TLS cipher-suite identifier (IANA two-byte code point).
Http3Perk
SETTINGS|PSEUDO_HEADERS.
Http3PerkComparison
Result of comparing expected and observed HTTP/3 perk data.
Ja4
Example
Ja3Hash
Fields within each section are dash-separated.
ProfileMetadata
Metadata describing the provenance of a TlsProfilePack.
SignatureAlgorithm
TLS signature algorithm identifier (IANA two-byte code point).
TlsClientConfig
Wrapper around Arc<rustls::ClientConfig> built from a TlsProfile.
TlsControl
This struct lets callers choose between broad compatibility and strict
TlsExtensionId
TLS extension identifier (IANA two-byte code point).
TlsProfile
A complete TLS fingerprint profile matching a real browser’s ClientHello.
TlsProfilePack
A versioned TLS profile bundle pairing a TlsProfile with its ProfileMetadata.

Enums§

AlpnProtocol
Example
BrowserFamily
Browser family for a TLS profile pack.
PlatformClass
Operating system platform class for a TLS profile pack.
ProfileChannel
Named update channel for automatic profile resolution.
ProfileChannelError
Error returned when a profile channel cannot be resolved.
SupportedGroup
Named group (elliptic curve / key-exchange group) identifier.
TlsClientError
Error building a TLS-profiled reqwest client.
TlsConfigError
Error building a rustls ClientConfig from a TlsProfile.
TlsVersion
Example

Statics§

CHROME_131
Google Chrome 131 TLS fingerprint profile.
EDGE_131
Microsoft Edge 131 TLS fingerprint profile.
FIREFOX_133
Mozilla Firefox 133 TLS fingerprint profile.
PACK_CHROME_131
Chrome 131 profile pack.
PACK_EDGE_131
Edge 131 profile pack.
PACK_FIREFOX_133
Firefox 133 profile pack.
PACK_SAFARI_18
Safari 18 profile pack.
SAFARI_18
Apple Safari 18 TLS fingerprint profile.

Functions§

browser_headers
HTTP headers that match the browser identity of profile.
build_profiled_client
Build a [reqwest::Client] whose TLS ClientHello matches profile.
build_profiled_client_preset
Build a [reqwest::Client] using profile-specific control presets.
build_profiled_client_strict
Build a strict TLS-profiled [reqwest::Client].
build_profiled_client_with_control
Build a [reqwest::Client] with explicit TLS profile control settings.
chrome_tls_args
What flags control
default_user_agent
Return a User-Agent string that matches the given TLS profile’s browser.
expected_http3_perk_from_user_agent
Build an expected HTTP/3 perk fingerprint from a User-Agent string.
expected_ja3_from_user_agent
expected_ja4_from_user_agent
expected_tls_profile_from_user_agent
Returns the TlsProfile for the given user-agent string, if known.
profile_for_device
Select the built-in TlsProfile that best matches a DeviceProfile.