r/softwaretesting • u/ystudio3d • 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:
- 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.
- 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.
- 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.
- 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.
- 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
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/Glad_Butterfly_4424 2d ago
Would love to see the repo, especially the rrweb implementation