148 Commits
Author SHA1 Message Date
germondai fac3445f74 chore(release): prepare v1.4.0 2026-08-10 19:21:14 +02:00
germondai 693d81b84e chore(deps): refresh release dependencies 2026-08-10 19:21:02 +02:00
germondai ff5756ca46 fix(browser): update pinned runtime assets 2026-08-10 19:20:57 +02:00
germondai 4445e10202 fix(docker): support non-root runtime 2026-08-10 02:49:33 +02:00
germondai ac79af388f perf(api): accelerate cold starts 2026-08-09 23:34:47 +02:00
germondai c0769af181 fix(browser): bound memory with rolling recycling 2026-08-09 18:15:48 +02:00
germondai 66e48fd5fe fix(api): support Prowlarr POST content metadata 2026-08-09 05:15:49 +02:00
germondai 2547daa41b fix(browser): clarify Gluetun startup failures 2026-08-08 22:58:10 +02:00
germondai c2ab109fe5 fix: report effective URL after redirects 2026-08-08 18:24:29 +02:00
germondai 097565a19f chore(release): prepare v1.3.1 2026-08-02 15:51:35 +02:00
germondai 8b54abd4a1 fix(browser): keep persistent contexts pool-owned 2026-08-02 15:37:47 +02:00
germondai 3a3226ed20 chore(release): prepare v1.3.0 dependencies 2026-08-02 03:07:04 +02:00
germondai 7715f33dc7 fix(web): update canonical site URL 2026-08-02 02:46:07 +02:00
germondai 7456e75990 fix(docker): preserve architecture-specific Camoufox metadata and tune browser pool defaults 2026-08-02 02:37:36 +02:00
germondai 2fc1031874 docs: update API, architecture, proxy, deployment, and integration guides 2026-08-02 02:35:35 +02:00
germondai 357767ce3c feat(web): refresh landing page content, comparisons, proxy showcase, and SEO 2026-08-02 02:34:34 +02:00
germondai 3a4d7491b3 Merge pull request #37 from funkypenguin/fix/bound-restart-and-reclaim-stalled 2026-07-27 02:40:41 +02:00
germondai 98e61d3770 Merge pull request #33 from edasque/feat/akamai-support 2026-07-26 17:27:02 +02:00
germondai 52e9700642 Merge pull request #42 from potatosips/fix/validate-request-bodies 2026-07-26 17:01:31 +02:00
germondai f397815fe7 fix(compose): pass upstream proxy configuration 2026-07-26 16:39:52 +02:00
germondai f08f5a2b44 chore(release): prepare v1.2.0 2026-07-26 16:18:47 +02:00
germondai 6d49011114 refactor(web): simplify GitHub stars fallback 2026-07-26 15:12:09 +02:00
germondai a71f1ac8d3 docs(proxy): add setup and operation guides 2026-07-26 13:18:27 +02:00
potatosips 09c8eb9608 fix(api): validate request bodies before scraping 2026-07-26 14:09:13 +06:00
germondai eff5760ef5 feat(api): wire proxy lifecycle and context cache 2026-07-25 17:42:11 +02:00
germondai e62e73554c feat(proxy): route traffic through tiered fallback 2026-07-25 15:13:58 +02:00
germondai d7cca3ec44 feat(proxy): add challenge-aware response policy 2026-07-25 12:47:26 +02:00
germondai ce028e201c feat(proxy): add adaptive direct forwarding 2026-07-25 10:22:39 +02:00
germondai 2840af1d13 chore(release): bump all packages to v1.1.0 2026-07-22 23:13:17 +02:00
germondai 7107b2f224 feat(proxy): make host required + universal challenge wall detection 2026-07-22 23:13:16 +02:00
germondai 3b3b643904 fix(proxy): bind listener to loopback by default with MITM_PROXY_HOST override 2026-07-22 19:50:30 +02:00
germondai 331df98dca feat(proxy): rotate proxy pool in fetchRaw on CF challenge 2026-07-22 19:50:08 +02:00
GermondandGitHub 28eda7ca57 Merge branch 'dev' into feat/mitm-proxy-mode 2026-07-22 16:38:18 +02:00
germondai 6223a4e593 perf: release v1.0.1 - slimmer image, faster boot, firefox telemetry/dead-feature prefs 2026-07-21 18:31:26 +02:00
David Young 7dae357103 fix(browser): bound every await in restartEntry; reclaim stalled checkouts
`BrowserPool.restartEntry` awaited `context.close()`, `browser.close()` and the
Camoufox launch with no timeout on any of them. Camoufox hangs on close when a
content process is wedged — tiers/3.ts and tiers/4.ts already guard their
*temporary* contexts against exactly this with a 5s `Promise.race` — but the
persistent context and browser the pool owns had no such guard, and launches can
hang too.

When any one of those hangs, the entry is pinned at `restarting = true` forever.
From then on the health check hits its own `if (entry.restarting) return` guard,
so every 30s tick logs "browser N disconnected, restarting" and does nothing.
The pool silently loses that slot permanently: `restartCount` never increments,
so the restart counter sits frozen while the log implies furious activity. With
enough uptime every entry ends up in this state and the pool is inert.

Changes:

  * every await in `restartEntry`, `init()` and `shutdown()` is bounded. On
    timeout the entry is left unhealthy with `restarting` cleared, so the next
    health-check tick retries it from scratch instead of wedging.
  * `runHealthCheck` reclaims checkouts past their deadline. Previously busy
    entries were skipped entirely, so an entry whose request wedged was never
    examined again.
  * a per-checkout `lease`, returned on the handle and passed back to
    `release()`, so a request that outlives its checkout cannot free — or
    recycle, via `noteTemporaryContext` — a browser the pool has since handed to
    someone else.
  * `release()` hands its in-flight page closes to `restartEntry` rather than
    racing them, since closing a context underneath in-flight `page.close()`
    calls is one way to wedge the transport in the first place.
  * abandoned launches are counted and capped. A timeout can only stop *waiting*
    for a launch, not cancel it, so retrying without a cap could pile up hung
    Firefox processes; past the cap the entry stays down and `live` reflects it.

Timeouts are configurable (`closeTimeoutMs`, `launchTimeoutMs`, `stallAfterMs`,
`healthIntervalMs`) with the API exposing them as BROWSER_*_MS env vars.

Adds regression tests for the hung close, the hung launch, stall accounting,
budget-aware stall deadlines, disconnected-but-busy entries, and stale releases.
The hung-close and hung-launch tests both fail against the unpatched pool.
2026-07-21 14:47:53 +12:00
David Young 961579724a fix(api): gate /health on real pool capacity, not available + busy
`/health` returns 200 as soon as `pool` is non-null, which happens before
`await pool.init()` has warmed any browser — so a readiness probe on /health
passes before the process can solve anything.

The obvious fix, `available + busy > 0`, is also wrong, and fails in a much
worse way. A request that hangs mid-solve never reaches the orchestrator's
`finally`, so it never calls `release()` and its entry stays `busy` for the life
of the process. `busy` therefore counts dead entries as capacity, and /health
can report 200/"ok" indefinitely on a pool with zero usable browsers — the
failure is completely invisible to any external check.

Adds `stalled` and `live` to PoolStats:

  * an entry is `stalled` once its checkout outlives the caller's own budget
    (req.maxTimeout, threaded through acquire()) plus a grace period, so a slow
    but genuinely live request is never miscounted
  * `live` counts entries that can serve work now or are genuinely mid-request:
    idle-and-connected, plus busy-and-connected-and-not-stalled

/health now gates on `live > 0`. A fully utilised pool still reports ready, so
this does not flap under load, but a wedged one cannot report ready at all.

`isUsable()` also checks `browser.isConnected()` rather than trusting the
`healthy` flag, which is only refreshed on the 30s health-check tick and is
never refreshed at all for busy entries.
2026-07-21 14:47:53 +12:00
aziz66andClaude Fable 5 aa719dd1fa feat(proxy): browser-backed MITM forward-proxy mode
The FlareSolverr /v1 contract only returns cookies + user-agent. Clients like
Prowlarr take those and re-fetch the target with their own HTTP stack, which is
re-challenged on sites whose Cloudflare clearance is bound to the solving
browser's connection fingerprint (e.g. 1337x) — no cookie is portable to a
plain HTTP client, so those indexers can't be used at all.

Add an optional HTTP(S) forward proxy (MITM_PROXY_ENABLED). Point such a client's
proxy at it (per-indexer HTTP proxy in Prowlarr) and every request — search and
the .torrent/magnet grab — is transparently re-issued through the browser pool,
returning the RAW response bytes so binary downloads pass through intact.

- ca.ts: self-generated CA (persisted) + on-demand per-host leaf certs
- server.ts: per-host loopback-TLS termination (Bun's node:tls can't drive a
  handshake via emit("connection") or honor SNICallback, so one listening TLS
  server per host is the reliable path); raw-byte capture via page.goto response
  body, with the download-event path for binaries; scrape() fallback solves CF
- /proxy-ca.crt route to fetch the CA for the client's trust store
- New env: MITM_PROXY_{ENABLED,PORT,CA_DIR,MAX_TIER,DEBUG}

Off by default; localhost-only by design (a MITM proxy can impersonate any host
to a client that trusts its CA).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 01:13:45 +04:00
germondai f8c90f0c49 docs: replace dragonflydb references with redis 8.8 and reformat markdown 2026-07-11 17:00:29 +02:00
germondai f746206de9 docs: update trawl docker image size in compare table 2026-07-11 16:37:25 +02:00
germondai 6f96285544 chore(release): bump to 1.0.0 and backfill versioned changelog history
Splits the single [Unreleased] CHANGELOG block into dated 0.1.0-1.0.0
sections matching the milestone commits being tagged for issue #24
(numeric release tags), and bumps every package.json to 1.0.0.
2026-07-10 21:11:04 +02:00
germondai 040c7352fb chore(deps): bump typescript to v7 and update workspace dependencies 2026-07-10 19:19:35 +02:00
germondai 9311cb38a4 fix(a11y): drop redundant role attribute and update biome lint config 2026-07-10 19:17:37 +02:00
germondai 1f1a45ee0b style: use shallowRef for primitive refs in web nav 2026-07-10 17:35:25 +02:00
germondai 09bdd18b30 docs: update docs and README for Dragonfly and new structure 2026-07-10 08:31:54 +02:00
germondai a40eb1708b feat(web): show live GitHub star count in navbar 2026-07-09 17:57:42 +02:00
germondai 613b41ad23 refactor(api): split index.ts into config, deps, routes, and add root status route 2026-07-09 10:40:36 +02:00
germondai 7f2dc4fb8e docs(web): bump docker image size to 1.14 GB in comparison table 2026-07-08 15:48:48 +02:00
germondai 9fb92d9809 fix(docker): bake GeoLite2 mmdb into api image to prevent geoip startup crash 2026-07-08 15:48:48 +02:00
germondai 52cd0ce3ac fix(docker): install curl in api runtime image so healthcheck works 2026-07-08 15:48:48 +02:00
GermondandGitHub a8eaf8f843 Merge pull request #19 from edasque/fix/tier-detection-and-proxy-wiring
Fix silent false-successes in tier detection, add Tier 4 captcha parity, surface proxy/timing info
2026-07-08 03:36:55 +02:00