No description
Find a file
jae beller 3771a3b627
Show a progress bar for the probability of completing the proof of work challenge (#87)
Since the challenge is done off of the main thread, there is no simple
way to report the progress done towards completing it. This change
adds a callback parameter, `progressCallback`, which is called with
the most recently attempted nonce every ~1024 iterations (should this
be configurable?). For the single-threaded "slow" algorithm, this is
exactly every 1024 iterations. For the multi-threaded "fast" algorithm,
threads take turns reporting in a round-robin as then notice they
have passed a multiple of 1024. This complexity is to avoid individual
threads falling behind their siblings due to the overhead of messaging
the main thread. To minimize this overhead as much as possible, a
regular number is sent instead of an object.

With the new information provided by the callback, a hash rate display
is added to the challenge page. This display is updated at most once
per second and set with tabular numbers to avoid the constantly changing
value being too visually distracting.

* web: show a progress bar based on completion probability

To provide more feedback to the user, the spinner is replaced with a
progress bar of the probability the challenge is complete. Since it
looks a little weird that a progress bar would fill up a quarter of the
way and then jump to the end (even though the probability would make
that happen 1 in 4 times), the bar is mapped with a quadratic easing
function to move faster at the beginning and then slow down as the
probability of redirection increases. If the probability exceeds 90%,
a message appears letting the user know things are taking longer than
expected and to continue being patient.

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-03-29 21:24:58 -04:00
.github Add staticheck to CI (#152) 2025-03-29 15:00:22 -04:00
cmd Add staticheck to CI (#152) 2025-03-29 15:00:22 -04:00
data data: disable DroneBL lookups by default (#147) 2025-03-28 07:39:14 -04:00
decaymap Linting and staticcheck fixes. (#101) 2025-03-25 10:02:05 -04:00
docs Show a progress bar for the probability of completing the proof of work challenge (#87) 2025-03-29 21:24:58 -04:00
internal Add middleware to set Cache-Control header for challenge HTML (#132) 2025-03-29 21:15:50 -04:00
lib Add middleware to set Cache-Control header for challenge HTML (#132) 2025-03-29 21:15:50 -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 Show a progress bar for the probability of completing the proof of work challenge (#87) 2025-03-29 21:24:58 -04:00
xess web/js: show more errors when some probable error cases happen (#151) 2025-03-28 15:47:18 -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