Skip to main content

Module tls_validation

Module tls_validation 

Source
Expand description

Automated TLS fingerprint validation suite.

Verifies that stygian’s TLS profiles produce correct JA3/JA4 hashes and HTTP/2 SETTINGS frames when compared against real browser captures.

Unit tests validate comparison logic and format of reference hashes. Network integration tests are #[ignore]-gated to avoid CI flakiness.

§Example

use stygian_browser::tls_validation::{TlsValidationReport, CHROME_136_JA3};

let report = TlsValidationReport {
    ja3_expected: CHROME_136_JA3.to_string(),
    ja3_actual: CHROME_136_JA3.to_string(),
    ja3_match: true,
    ja4_expected: String::new(),
    ja4_actual: String::new(),
    ja4_match: true,
    http2_settings_match: true,
    alpn_match: true,
    issues: vec![],
};
assert!(report.is_ok());

Structs§

TlsValidationConfig
Configuration for live TLS validation against an echo service.
TlsValidationReport
Result of validating a TlsProfile against expected browser fingerprints.

Constants§

CHROME_131_JA3
JA3 hash for Google Chrome 131 (captured from real browser traffic).
CHROME_136_HTTP2_SETTINGS
Chrome 136 HTTP/2 SETTINGS frame — ordered (id, value) pairs that the browser sends in its initial SETTINGS frame.
CHROME_136_JA3
JA3 hash for Google Chrome 136 (captured from real browser traffic).
CHROME_136_JA4
JA4 fingerprint for Google Chrome 136.

Traits§

TlsProfileValidate
Extension trait that adds validate_static() to TlsProfile.

Functions§

compare_http2_settings
Compare observed HTTP/2 SETTINGS against a reference list.
validate_profile_static
Validate a TlsProfile against reference hashes without making a network connection.