← all repositories
cutetailbud/ff-ruyijs

Firefox guts, no browser: a Python-driven JS engine for bots

ruyiJS embeds the real SpiderMonkey and Necko stack so your Python code can run a site's own JavaScript — and pass the bot checks that flag fake browsers.

★1.1k stars C++ Coding AssistantsAgents
ff-ruyijs
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

ruyiJS is a headless browser with the browser mostly removed: it embeds genuine Firefox 159 internals — the SpiderMonkey JS engine, the Necko network stack, and Skia for Canvas — behind a Python API. You open a Context, load HTML, and eval JavaScript that persists across calls, with live objects coming back as callable JSObject/JSFunction handles. It’s aimed at scraping, JS reverse engineering, and getting past challenge pages, including as a tool for AI agents like Codex or Claude Code.

The interesting bit

The anti-bot pitch is authenticity rather than imitation: the TLS ClientHello is produced by the real NSS library, not a hand-rolled fingerprint, and you can switch between Firefox 100–159 TLS profiles per context to rotate JA3/JA4 identities. Meanwhile there’s no renderer, no window, no layout — just the parts of a browser that scripts actually touch.

Key highlights

  • Each Context is an isolated process with its own persistent JS world and per-context proxy, so sessions don’t leak into each other.
  • In-page fetch/XHR ride real HTTP/1.1, 2, and 3 via Necko; net_log() inspects every request.
  • put_resource() lets you serve captured responses yourself and replay a whole flow fully offline.
  • One validated configure_fingerprint() surface covers Navigator, Screen, viewport, timezone, and locale.
  • Wheels for Windows x64, macOS arm64, and Linux x86_64; the Windows runtime is ~42 MB and pinned by SHA256.

Caveats

  • Platform support is uneven: the macOS wheel has no xpcshell, proxies fall back to an HTTP CONNECT tunnel, and the README points to docs/macos.md for “remaining gaps.”
  • Linux requires glibc 2.39+ (Ubuntu 24.04-era), and macOS requires Apple Silicon on macOS 26 or later.
  • AGPL-3.0 with a commercial-license requirement for closed-source use — check that fits your project before building on it.

Verdict

If you reverse-engineer web JS or scrape behind challenges and Playwright’s full browser feels like dead weight, this is a genuinely clever slice of Firefox. If a plain HTTP client already fetches your pages, you don’t need it — the README says as much itself.

Frequently asked

What is cutetailbud/ff-ruyijs?
ruyiJS embeds the real SpiderMonkey and Necko stack so your Python code can run a site's own JavaScript — and pass the bot checks that flag fake browsers.
Is ff-ruyijs open source?
Yes — cutetailbud/ff-ruyijs is open source, released under the AGPL-3.0 license.
What language is ff-ruyijs written in?
cutetailbud/ff-ruyijs is primarily written in C++.
How popular is ff-ruyijs?
cutetailbud/ff-ruyijs has 1.1k stars on GitHub.
Where can I find ff-ruyijs?
cutetailbud/ff-ruyijs is on GitHub at https://github.com/cutetailbud/ff-ruyijs.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.