Add the Chrome fallback and the needs-human flow.

Bot checks escalate to headless Chrome with stealth, which claims the
same identity as tls-client and hands its cookies back to the jar. The
visit counts against the rate limits. If Chrome can't clear a check,
the URL is marked needs-human. Pressing Enter on it in the TUI, or
running 'dibs solve', opens a visible window; dibs carries on once the
page loads. Processes now merge the cookie file on save, with the
newest cookie winning.
This commit is contained in:
Overlord committed 2026-10-14 14:08:56 +02:00
1 parent f2ea1297e8
commit e2cbc1a55c
20 files changed
+905 -73

No files matched your search

+5 -1
View File
@@ -24,6 +24,10 @@ const (
backoffBase = 2 * time.Minute
backoffCap = 30 * time.Minute
// recheck caps each sleep of a waiting request, so that a cleared
// backoff lets it go soon.
recheck = 5 * time.Second
)
// HostState is what the limiter remembers about a host. It is persisted so
@@ -144,7 +148,7 @@ func (l *Limiter) wait(ctx context.Context, host, checkURL string) error {
if reserved { return nil }
select {
case <-l.clock.After(at.Sub(l.clock.Now())):
case <-l.clock.After(min(at.Sub(l.clock.Now()), recheck)):
case <-ctx.Done():
return ctx.Err()
}