Hacker News
Show HN: Mochi.js: bun-native high-fidelity browser automation library
I’m sharing mochi.js (https://github.com/0xchasercat/mochi), a Bun-native, raw-CDP browser automation framework. It's designed to make programmatic browser use more effective by focusing on consistency and measured parity with regular traffic, purely from the JS layer, against stock Chromium.
The most common forms of browser automation focus heavily on client-side line by line probes, which are mostly cosmetic. This makes people feel better but it doesn't have much relevance to actual WAF or anti-automation defences.
Mochi.js focuses on what actually matters, allowing you to get past captchas, WAF's and most defence mechanisms. In fact, in some cases it actually outperforms chromium forks simply by virtue of not having to lie.
The foundation is built on a probe manifest based on analyzing several WAF's and trying to cover most of the ground that matters, and from there building upwards while ensuring every decision is backed by data. Solves turnstile/interstitial automatically, single digit fpjs suspect score, very good client-side results, though browserscan and a few others are known limitations that are fundamentally conflicting with what WAF's probe for.
I'll be here if anyone wants to discuss the details, check out the docs and github. It's completely free and open source, MIT, strictly no relationship to any proprietary products whatsoever. No affiliation to patched chromium forks, or SaaS.
But I also want to talk about why I built this, because the current paradigm of "bot detection" is fundamentally broken.
Traditionally they would probably try to label my repository a malicious tool, or at best, a grey hat one.
Let's take Turnstile for example, If you attach a debugger to see what data they are extracting from your hardware, their script intentionally self-destructs. When they try to extract your data—acting as a guest on your silicon, using your electricity, without asking, the industry calls it "Security."
But if you write a script to control exactly what data your own hardware emits, refusing to provide the data they have no right to ask for, you are suddenly labeled a "Malicious Actor" engaged in "Bot Evasion."
I find it absurd we let ourselves put up with this, and the stance of the bot-evasion community only makes them feel more able to take a higher moral ground.
I have built a library that respects my hardware's reality. If that breaks your security model, that's because your security model relies on trespassing and secrecy. I stopped apologizing. Who's next?
Mochi is the exact opposite of WAF opacity. It is a glass box. It is MIT-licensed. The entire DAG, fingerprint manifest schema, harvesting process, is documented. We even commit our live benchmarks to the public record (mochi on a Linux datacenter IP scored a suspect_score: 8 and bot: not_detected against FingerprintJS Pro v4).
We don't even lie unnecessarily. We default to host-OS matching. If you run mochi on a Linux server, it uses privacy-sensible fingerprints for Linux, not Windows, because Linux is a real-user signal. It proves that WAFs aren't actually blocking what most people think they are, which begs the question of what they are really doing in that obfuscated payload.
The legitimacy argument is exactly how they captured the narrative. And nobody challenged it because the people on the other side were too busy acting like they were doing something wrong.
Is this a conspiracy theory? For sure, but only because they allow it to be. Try make a conspiracy theory about the sticky riceball.
bastawhiz
|next
[-]
jarym
|root
|parent
|next
[-]
SwellJoe
|root
|parent
|next
|previous
[-]
david_p
|root
|parent
|next
[-]
I feel awkward about all this probably-LLM-generated prose that does not respect me enough as a reader to explain acronyms and give context.
BandButcher
|root
|parent
|previous
[-]
"...browser automation framework..." was about all i understood
and even then it had me guessing if it was talking about an alternative e2e testing framework like cypress, selenium, playwright.....and somehow I was right lmao (i think?)
but literally all the other jargon there had me stumped. I'm still afraid to google
a getParameter(0x9245) probe
Likewise, the text does come across to me as LLM heavy (with a spice of pizzazz), but even as a dev who uses playwright I doubt I would change after seeing this.To OP: not convincing enough.
Maybe this is targeted towards super users who are deep in the weeds of various browser automation framework internals.
A better marketing approach towards someone like me who just uses this to test my apps e2e and be done with it, would be to have simple cliches like:
"10x faster than playwright",
"Same API",
"Did we mention....SUPER FAST!?"
I might call bs on that, but I'd be more likely to try it out.
simjnd
|next
|previous
[-]
- Trying to navigate to `https://deviceandbrowserinfo.com/are_you_a_bot` crashes it for some reason
- Trying to go to `https://grok.com` and the page doesn't render
I wished it actually worked because I use my own hand-rolled thin-wrapper over CDP and I would love for a more robust solution to avoid being detected, but man this does not inspire confidence.
hmokiguess
|next
|previous
[-]
Doesn't this defeats the purpose? Essentially giving away the mechanism to the ones implementing fingerprint so they can learn how to detect you and starting a cat/mouse chase in the open
There's a reason why some kinds of technology stay opaque, not always publishing these things help in the way you think they do
antod
|next
|previous
[-]
Mochikit got bundled with Turbogears an early Rails like Python framework. Rails inspired a lot of frameworks back then. Must be over 20yrs ago.
wavemode
|next
|previous
[-]
SwellJoe
|next
|previous
[-]
WTF are you talking about? This is incoherent?