Commit Graph

3 Commits

Author SHA1 Message Date
Jim Zhang @ wonderhoi
f5dc97b131 fix(net): scope passive callbacks to the registering page (#414)
The on_request/on_response Vec lived on the ObscuraHttpClient shared by
every page in the context, so a callback registered on one page fired for
all pages (#408 cross-page bleed) and outlived its page.

Callbacks now live in a per-page CallbackRegistry (Arc shared with the
page's JS runtime state). Page-driven fetch paths (navigation, POST,
scripts, stylesheets, robots.txt, module loads, JS fetch/XHR in both
plain and stealth modes) pass the registry through; the HTTP client
itself is callback-free.

Adds callbacks_do_not_bleed_across_pages: page A's callback stays silent
for page B's requests and stops firing after page A is dropped.
2026-07-16 12:43:13 +02:00
SGavrl
5db0dc0e01 docs: document the interception API and refresh the skill
The request interception API (#306) and the global --stealth flag are
merged, so:

- Use-as-a-Rust-library.md: add an "Intercept requests" section covering
  on_request/on_response, enable_interception (Continue/Fulfill/Fail),
  and add_preload_script, with examples.
- Intercept-and-modify-requests.md: point embedders at the native API.
- AGENTS.md: --stealth is now global (all subcommands incl. scrape, via
  OBSCURA_STEALTH for workers); note the interception API on the obscura
  crate and that op_fetch_url rewrites must stay behind validate_fetch_url.
- skills/obscura/SKILL.md: fix the build note (stealth is not a default
  feature), correct "randomized" to a consistent fingerprint, add the
  global --stealth flag, --dump assets/cookies, and an interception note.
2026-06-24 23:27:19 +00:00
SGavrl
a727fe82ad Add GitBook-synced docs under docs/
Mirror the wiki content into a docs/ tree so GitBook Git Sync can connect to
this repo. Adds SUMMARY.md for the table of contents, .gitbook.yaml pointing
GitBook at docs/, and converts wiki page links to relative .md paths.
2026-06-06 09:04:30 +00:00