stealth
Canonical browser fingerprint bundles, human keystroke timing, and TLS profile re-exports for the Santh fleet.
What it does
stealth provides five orthogonal stealth primitives that work together:
-
Fingerprint bundles (
fingerprintfeature, default) - Tier-AProfileBundlevalues pair aStealthProfile(JS property overrides for navigator, WebGL, screen, etc.) with the matching TLSImpersonateProfile.profile_jsrenders overrides into a CDP-injectable IIFE.validate_overrides/validate_browser_coherencedetect UA/platform/brands mismatches before they reach a WAF. -
Human keystroke timing (
humanfeature, default) -plan_keystrokesproduces aVec<Keystroke>(char, hold_ms, gap_ms_before, is_correction) drawn from per-bigram timing envelopes calibrated on real human typing data. Supports typo injection with backspace correction and random thinking pauses. All timing is deterministic given a seededRng. -
TLS profile re-exports (
httpfeature, default) - thin re-exports ofscanclient::tls_impersonate::{ImpersonateProfile, supported_profiles}. The heavierStealthClient(rquest + BoringSSL) is gated behindtls-impersonate. -
HTTP browser headers (
http+fingerprint+rotation, default) - orderedUser-Agent,Accept-*, Client Hint, andSec-Fetch-*templates derived from the sameStealthProfilethat drives browser JS overrides. -
Pacing and rotation (
pacing+rotation, default) - deterministic profile cycling, named profile resolution, exclusive-upper-bound jitter, and shared exponential backoff policy.
Optional extras: CDP injection (browser feature) via apply_stealth / apply_cdp_mask for
a chromiumoxide::Page, Tier-B community TOML profiles (tier-b-toml), and a stealth-probe
scoring engine (probe module, browser feature).
Quick start
Add to Cargo.toml:
= { = "libs/runtime/stealth" }
Generate a Chrome 131/Windows fingerprint + type "hello" with realistic timing:
use ;
use ;
let bundle = chrome_131_windows;
bundle.validate_browser_coherence.unwrap;
let mut rng = seed_from_u64;
let keys = plan_keystrokes;
assert_eq!;
Inject the bundle into a chromiumoxide page (requires the browser feature):
use apply_stealth;
apply_stealth.await?; // call once, before goto()
When to use / When not
Use when:
- You need a coherent UA + platform + brands + TLS fingerprint tuple (not just a UA string).
- You need human-realistic keystroke timing for CDP input dispatch.
- You want type-safe profile selection with compile-time coherence checking.
Do not use when:
- You need live browser fingerprint data (this crate ships static profiles; update them manually).
- You need full TLS impersonation without enabling the
tls-impersonatefeature - that feature pulls BoringSSL viascanclientand lengthens compile time significantly. - You are working outside the Santh fleet and have no
scanclientworkspace dependency - thehttpfeature will not resolve.
Compared to alternatives
| Capability | stealth | playwright-stealth | puppeteer-extra-stealth |
|---|---|---|---|
| Typed, validated profile bundles | yes | no | no |
| TLS ClientHello matching | yes (tls-impersonate) | no | no |
| Bigram keystroke timing | yes | no | partial |
| Zero outbound network | yes | yes | yes |
| Rust compile-time safety | yes | N/A (JS) | N/A (JS) |
| Live profile update | manual | community | community |
Unlike JS stealth libraries, this crate exposes typed Rust structs so the compiler catches UA/platform mismatches before deployment.
How it fits in Santh
stealth is a runtime substrate consumed by the scanner and behavior layers:
libs/runtime/stealth ← this crate (fingerprint + timing data)
↑
libs/scanner/scanclient ← HTTP client (uses ImpersonateProfile + StealthClient)
↑
libs/runtime/behavior/* ← orchestration (uses ProfileBundle + plan_keystrokes)
↑
bin/santh ← operator entry point
Profile bundles flow outward via scanclient for TLS impersonation. Keystroke timing is
consumed directly by behavior orchestration that drives CDP input events. The probe module
(browser feature) runs in-page JS to score how detectable the active session is.
Contributing
- Pure profile data lives in
../stealth-profiles/src/lib.rs. Add a newStealthProfilevariant, fill the profile facts, hardware tuple, navigator vendor, and Client Hint brand catalog entries there, then add aProfileBundleconstructor and extendvalidate_tls_familyif the new browser family needs cross-checking. - Timing data lives in
src/human/keystroke.rsin theHOT_BIGRAMStable and thehold_envelopematch arms. Constants are named and documented; do not hardcode new values without a citation. - All new public items require a doc comment and at least one test in the appropriate
tests/file (unit/for happy path,adversarial.rsfor hostile input,gap.rsfor pinned limitations,property.rsfor proptest invariants,integration.rsfor pipelines). cargo +nightly test -p stealthmust pass before merging. Runsanth-conform check libs/runtime/stealthand resolve anyfail-level findings.
License
Licensed under either of Apache-2.0 or MIT at your option.