Merge stealth-overhaul into main
Resolved conflicts: - page.rs: keep both set_blocked_urls (#315) and stealth client wiring - ops.rs: keep SHA-512/224 + SHA-512/256 from stealth branch; keep the unreachable catch-all (vec![]) from #314 instead of silent SHA-256 fallback; updated comment accordingly - bootstrap.js: extend the digest algorithm allowlist to include SHA-512/224 and SHA-512/256 to match the Rust additions
This commit is contained in:
commit
8582fcceca
9 files changed
+471
-88
No files matched your search
@@ -286,9 +286,11 @@ impl Page {
|
||||
if self.stealth_client.is_some() {
|
||||
rt.set_stealth(true);
|
||||
rt.set_user_agent(obscura_net::STEALTH_USER_AGENT);
|
||||
// Match platform to the Linux UA so navigator.platform and
|
||||
// userAgentData.platform are consistent with navigator.userAgent.
|
||||
rt.set_platform("Linux x86_64", "Linux", "");
|
||||
rt.set_platform(
|
||||
obscura_net::STEALTH_NAVIGATOR_PLATFORM,
|
||||
obscura_net::STEALTH_UA_PLATFORM,
|
||||
obscura_net::STEALTH_UA_PLATFORM_VERSION,
|
||||
);
|
||||
} else {
|
||||
if let Ok(ua) = self.http_client.user_agent.try_read() {
|
||||
rt.set_user_agent(&ua);
|
||||
@@ -317,6 +319,10 @@ impl Page {
|
||||
rt.set_cookie_jar(self.context.cookie_jar.clone());
|
||||
rt.set_http_client(self.http_client.clone());
|
||||
rt.set_blocked_urls(self.blocked_url_patterns.clone());
|
||||
#[cfg(feature = "stealth")]
|
||||
if let Some(ref stealth) = self.stealth_client {
|
||||
rt.set_stealth_client(stealth.clone());
|
||||
}
|
||||
|
||||
if let Some(tx) = &self.intercept_tx {
|
||||
rt.set_intercept_tx(tx.clone());
|
||||
|
||||
Reference in new issue
Block a user