feat(cloudflare): cf-status preflight — skip re-solving when cf_clearance is still valid
Passing a Cloudflare challenge mints an HttpOnly cf_clearance cookie bound to IP+UA. 'chrome-use cf-status' (aliases cf/cloudflare-status/clearance) reports whether the active page is currently a CF challenge and whether a still-valid cf_clearance exists (read via CDP — HttpOnly is invisible to document.cookie), plus CF_VERIFIED_DEVICE trust, and a recommendation: proceed (already cleared, don't re-solve) / solve (challenge up, no clearance) / reissue (clearance present but page still blocks → IP/UA drifted). Lets an agent avoid re-solving what it already cleared — the persistence optimization. Pure helpers unit-tested; live -verified on a real cf_clearance.
This commit is contained in:
@@ -127,6 +127,19 @@ cadence, and scroll/drag ease. Default `off`; a per-navigation detector
|
||||
auto-escalates pages guarded by Akamai/PerimeterX/DataDome to `human`. Leave it
|
||||
on auto; force `human` only when you already know the target scores behaviour.
|
||||
|
||||
**Cloudflare clearance — solve once, reuse.** Passing a Cloudflare challenge
|
||||
mints a `cf_clearance` cookie (HttpOnly — invisible to `eval`/`document.cookie`;
|
||||
read it via `chrome-use cookies`). It's bound to your **IP + User-Agent**: reuse
|
||||
the same exit IP and UA and you skip the challenge until it expires. Driving the
|
||||
user's real Chrome (relay) persists it natively; for isolated sessions,
|
||||
`--session-name <name>` save/restores it. Before spending effort solving, run
|
||||
`chrome-use cf-status` (aliases `cf`, `clearance`): it reports whether the page
|
||||
is *currently* a Cloudflare challenge and whether a still-valid `cf_clearance`
|
||||
exists, with a recommendation — `proceed` (already cleared, don't re-solve),
|
||||
`solve` (challenge up, no clearance), or `reissue` (clearance present but page
|
||||
still blocks → IP/UA drifted, re-solve). Use it as a preflight to avoid
|
||||
re-solving what you already cleared.
|
||||
|
||||
## Two ways to drive a page — and when to drop to `eval`
|
||||
|
||||
You have a **real Chrome with the user's DOM**. Two layers, mix them freely:
|
||||
|
||||
Reference in New Issue
Block a user