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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
//! `guise`: canonical stealth substrate for the Santh fleet.
//!
//! `guise` consolidates the fleet's previously-duplicated stealth
//! implementations (captchaforge, archived golemn-browser, wafrift, see
//! `MASTER_PLAN/02_stealth.md`) into one lib with four orthogonal primitives:
//! browser-fingerprint profiles, human-behavior timing, TLS-profile re-exports,
//! and a runtime stealth-probe that verifies the disguise actually defeats
//! detection at runtime (not just that the override is present in source).
//!
//! # Vocabulary (one naming convention)
//!
//! - `StealthProfile` is the **canonical selector**: the one enum naming a
//! coherent (browser, OS, GPU) identity. Everything derives from it.
//! - `profile_facts(StealthProfile) -> ProfileFacts` is the **source data**.
//! - A `<Domain>Profile` is a pure, derived *projection* of that data for one
//! domain (e.g. `HeaderProfile` (HTTP headers), and the TLS / geo facets).
//! There is exactly **one** type per projection; no per-module duplicates.
//! - **Applied / runtime** instances are named for what they are, never `*Profile`
//! (e.g. `http::RequestHeaders` (a materialized header set)).
//! - **Home-rule:** `fingerprint/` owns fingerprint DATA; `http/` and `cdp/` APPLY it.
//!
//! # Features
//!
//! | Feature | Enables |
//! |---------|---------|
//! | `fingerprint` (default) | [`fingerprint`] profile bundles + JS overrides |
//! | `human` (default) | [`human`] keystroke / mouse / behavioral-grammar timing |
//! | `http-headers` (default via `http`) | [`http`] browser header templates without TLS deps |
//! | `http` (default) | [`http`] browser headers + TLS profile re-exports |
//! | `pacing` (default) | [`pacing`] jitter + retry backoff policies |
//! | `rotation` (default) | [`rotation`] profile cycling + config-name resolution |
//! | `config` (default) | [`config`] Tier-A defaults→TOML→CLI configuration |
//! | `tls-impersonate` | [`http::StealthClient`] (wreq / BoringSSL) |
//! | `browser` | [`browser`] BiDi stealth application, [`human`] timing, and the [`probe`] runtime self-test |
//! | `tier-b-toml` | [`ProfileBundle::from_toml`] community profiles |
//!
//! # Safe defaults
//!
//! - **Input size:** No cap enforced. All inputs are in-memory Rust values
//! (`&str`, typed structs). The only I/O is `ProfileBundle::from_toml` (the
//! `tier-b-toml` feature), which reads a TOML file entirely into a `String`
//! via `std::fs::read_to_string` - the limit is the OS file-size limit; no
//! internal byte cap is applied. All other APIs operate on already-loaded
//! in-memory data with no size constraint.
//! - **Recursion depth:** No recursive algorithms are present in this crate.
//! All iteration is flat (loops over slices and hash-map look-ups); stack
//! depth is bounded by the call chain depth alone.
//! - **Outbound network:** None. This crate emits no outbound connections of
//! any kind. The `http` feature re-exports type definitions from `scanclient`
//! but does not initiate requests; the optional `tls-impersonate` feature's
//! `StealthClient` is owned by `scanclient` and is only forwarded here.
//! - **Process spawning:** The `browser` feature delegates process spawning to
//! the `runtime-foxdriver` crate (Firefox BiDi launch). `guise` itself does
//! not call `std::process::Command` directly.
//! - **Filesystem writes:** None. The only filesystem access is the read in
//! `ProfileBundle::from_toml` (`tier-b-toml` feature). No file is written,
//! created, or truncated anywhere in this crate.
//! - **Credential exposure:** None. This crate holds no credentials, API keys,
//! or secrets and does not log, serialize, or transmit caller-supplied data
//! outside the process. Profile bundles contain only synthetic browser
//! fingerprint constants (UA strings, screen sizes, WebGL strings).
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
// Runtime stealth self-test, surfaced at the crate root so a consumer can probe
// a live page against the correct browser family without reaching into the
// module: `guise::run_probe_for(&page, guise::UserAgentBrowser::Firefox)`.
pub use ;