No description
Find a file
jae beller 5237291072
Debug tool for benchmarking proof-of-work algorithms (#155)
* cmd/anubis: add a debug option for benchmarking hashrate

Having the ability to benchmark different proof-of-work implementations
is useful for extending Anubis. This adds a flag `--debug-benchmark-js`
(and its associated environment variable `DEBUG_BENCHMARK_JS`) for
serving a tool to do so.

Internally, a there is a new policy action, "DEBUG_BENCHMARK", which
serves the benchmarking tool instead of a challenge. The flag then
replaces all bot rules with a special rule matching every request
to that action. The benchmark page makes heavy use of inline styles,
because currently all global styles are shared across all pages. This
could be fixed, but I wanted to avoid major changes to the templates.

* web/js: add signal for aborting an active proof-of-work algorithm

Both proof-of-work algorithms now take an optional `AbortSignal`, which
immediately terminates all workers and returns `false` if aborted before
the challenge is complete.

* web/js: add algorithm comparison to the benchmark page

"Compare:" is added to the benchmark page for testing the relative
performance between two algorithms. Since benchmark runs generally have
high variance, it may take a while for the averages to converge on a
stable difference.

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
Co-authored-by: Xe Iaso <me@xeiaso.net>
2025-03-29 23:38:12 -04:00
.github Add staticheck to CI (#152) 2025-03-29 15:00:22 -04:00
cmd Debug tool for benchmarking proof-of-work algorithms (#155) 2025-03-29 23:38:12 -04:00
data data: disable DroneBL lookups by default (#147) 2025-03-28 07:39:14 -04:00
decaymap Add periodic cleanup job for DecayMap (#8) (#158) 2025-03-29 23:24:06 -04:00
docs Debug tool for benchmarking proof-of-work algorithms (#155) 2025-03-29 23:38:12 -04:00
internal Add middleware to set Cache-Control header for challenge HTML (#132) 2025-03-29 21:15:50 -04:00
lib Debug tool for benchmarking proof-of-work algorithms (#155) 2025-03-29 23:38:12 -04:00
run initial import from /x/ monorepo 2025-03-17 19:33:07 -04:00
var initial import from /x/ monorepo 2025-03-17 19:33:07 -04:00
web Debug tool for benchmarking proof-of-work algorithms (#155) 2025-03-29 23:38:12 -04:00
xess web/js: show more errors when some probable error cases happen (#151) 2025-03-28 15:47:18 -04:00
.gitattributes Debug tool for benchmarking proof-of-work algorithms (#155) 2025-03-29 23:38:12 -04:00
.gitignore all: do not commit generated JS/CSS to source control (#148) 2025-03-28 14:55:25 -04:00
.ko.yaml Try using ko to build images 2025-03-19 09:10:29 -04:00
anubis.go Refactor and split out things into cmd and lib (#77) 2025-03-22 18:44:49 -04:00
Brewfile all: do not commit generated JS/CSS to source control (#148) 2025-03-28 14:55:25 -04:00
go.mod build(deps): bump github.com/go-jose/go-jose/v3 from 3.0.3 to 3.0.4 (#89) 2025-03-22 21:18:02 -04:00
go.sum build(deps): bump github.com/go-jose/go-jose/v3 from 3.0.3 to 3.0.4 (#89) 2025-03-22 21:18:02 -04:00
LICENSE initial import from /x/ monorepo 2025-03-17 19:33:07 -04:00
package-lock.json all: do not commit generated JS/CSS to source control (#148) 2025-03-28 14:55:25 -04:00
package.json web/js: show more errors when some probable error cases happen (#151) 2025-03-28 15:47:18 -04:00
PULL_REQUEST_TEMPLATE.md all: do not commit generated JS/CSS to source control (#148) 2025-03-28 14:55:25 -04:00
README.md docs(README): fix mascot link (#88) 2025-03-22 22:37:16 -04:00
VERSION version 1.15.0 (#144) 2025-03-27 16:31:41 -04:00
yeetfile.js docs/developer: add build directions for manually building Anubis (#154) 2025-03-29 20:12:35 -04:00

Anubis

A smiling chibi dark-skinned anthro jackal with brown hair and tall ears looking victorious with a thumbs-up

enbyware GitHub Issues or Pull Requests by label GitHub go.mod Go version language count repo size

Anubis weighs the soul of your connection using a sha256 proof-of-work challenge in order to protect upstream resources from scraper bots.

Installing and using this will likely result in your website not being indexed by some search engines. This is considered a feature of Anubis, not a bug.

This is a bit of a nuclear response, but AI scraper bots scraping so aggressively have forced my hand. I hate that I have to do this, but this is what we get for the modern Internet because bots don't conform to standards like robots.txt, even when they claim to.

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 and tag it with the Anubis tag. 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

Star History Chart