r/softwaretesting • • 4d ago

Lessons from building a self-hosted Patchright + Camoufox + rrweb runner with an 800MB proxy byte-budget guard

I built an open-source Playwright/Crawlee studio (MIT) over the last few months and wanted to share a few engineering patterns that actually held up in production runs:

  1. Patchright + Camoufox separation: Keeping Patchright isolated from playwright-extra avoids CDP-level leaks while deriving the UA from the installed browser version to avoid version drift.
  2. Live rrweb bridge without leaking secrets: Streaming DOM snapshots to a local dashboard (:4310) in 25-event batches every 250ms with maskAllInputs enabled, plus an in-memory FIFO secret redactor (up to 500 secrets) before anything hits logs or telemetry.
  3. Metered proxy Byte-Budget Guard: Enforcing an 800MB cap on a 1GB residential rail with automatic failover to static datacenter pools, plus an ultra_lite asset cache that blocks heavy media while keeping GA4/analytics beacons firing.
  4. Read-only Target Preflight: Classifies targets as open / cf_interstitial / site_tick / dead before spinning up workers. Strictly detection and reporting — never attempts to solve CAPTCHAs.
  5. Live Inbox OTP verification: Spins up temporary inboxes per session to test full signup and email verification flows end-to-end.

Happy to share the MIT GitHub repo in the comments if anyone wants to inspect the code or tests.

8 Upvotes

3 comments sorted by

1

u/Flat-Entry-8735 3d ago

So, can it bypass detection by app servers like Gmail, TikTok, or Facebook ...? Because the browser fingerprint gets stored, and logging into multiple accounts with the same fingerprint will get the accounts banned/locked.

1

u/ystudio3d 3d ago

No — it's explicitly not built for bypassing detection on Gmail, TikTok, Facebook, or running multi-account social farms. The persistent profiles and geo-matched fingerprints are meant for testing your own/authorized sites (like verifying consent banners, localization, and returning-user analytics across regions) without triggering false positives on your own infra.

1

u/Glad_Butterfly_4424 2d ago

Would love to see the repo, especially the rrweb implementation