
* fix(js): use pure JS SHA256 library, refactor Closes #458 Additionally, I made a horrifying discovery: Firefox seems to actively hinder performance if you are using more than one Worker per page. It does not spread the load out across cores like I expected. Instead it seems to make that one Worker thrash and have to constantly context switch, which caused a lot of slowdown. The benchmarks in #155 continue to be the best contribution ever made to Anubis. What clued me into there being a problem here was the fact that the "slow" algorithm was faster than the "fast" algorithm on my laptop. This made no intuitive sense to me so I dug further. Either way I think this is a Firefox bug at its core, but for now we have to work around it by doing the hacky terrible thing that I hate. I also swapped the SHA256 operations to @aws-crypto/sha256-js on the advice of a trusted cryptography expert. I don't know what performance differences this makes, but I'm getting 150-225 kilohashes per second, which is pretty dang good. Signed-off-by: Xe Iaso <me@xeiaso.net> * fix(js): apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Xe Iaso <me@xeiaso.net> * fix(js): use fast algo for fast worker Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Anubis

Sponsors
Anubis is brought to you by sponsors and donors like:
Overview
Anubis weighs the soul of your connection using a proof-of-work challenge in order to protect upstream resources from scraper bots.
This program is designed to help protect the small internet from the endless storm of requests that flood in from AI companies. Anubis is as lightweight as possible to ensure that everyone can afford to protect the communities closest to them.
Anubis is a bit of a nuclear response. This will result in your website being blocked from smaller scrapers and may inhibit "good bots" like the Internet Archive. You can configure bot policy definitions to explicitly allowlist them and we are working on a curated set of "known good" bots to allow for a compromise between discoverability and uptime.
In most cases, you should not need this and can probably get by using Cloudflare to protect a given origin. However, for circumstances where you can't or won't use Cloudflare, Anubis is there for you.
If you want to try this out, connect to anubis.techaro.lol.
Support
If you run into any issues running Anubis, please open an issue. Please include all the information I would need to diagnose your issue.
For live chat, please join the Patreon and ask in the Patron discord in the channel #anubis
.
Star History
Packaging Status
Contributors
Made with contrib.rocks.