browser-search icon indicating copy to clipboard operation
browser-search copied to clipboard

CloakBrowser: false-positive Cloudflare challenge on normal pages adds a 20s delay

Open Johell1NS opened this issue 1 month ago • 1 comments

Problem

scripts/cloak/challenges.mjs scores a normal page as a Cloudflare challenge when it only has the __cf_bm cookie or a server: cloudflare header. waitForChallenge never considers it resolved (the cookie name contains bm), so every cloak-fetch on a site behind Cloudflare waits the full 20 seconds and reports challengeResolved: false.

Also

  • scripts/cloak/lib/session.mjs throws immediately when a session lock is held and writes .lock inside the Chromium profile. A directory lock with an owner token, heartbeat, stale detection and waiting is more robust. Profiles move to ~/.browser-search/cloak-sessions/profiles/<proto>-<host>-<hash>, so saved sessions start fresh after the update.
  • challenge.strategy must be returned by waitForChallenge (it is read by cloak-fetch.mjs).
  • npm audit reports ip-address <= 10.7.0 (moderate, transitive via socks). npm audit fix updates it to 10.7.4.

Fix

Header/resource/marker-based detection rules, the improved session lock, the strategy field and the lockfile update, released as a patch.

Johell1NS avatar Oct 21 '26 12:10 Johell1NS

Released in v3.2.0.

Johell1NS avatar Oct 21 '26 12:10 Johell1NS