No description
Find a file
Xe Iaso 74e11505c6
feat: enable loading config fragments (#321)
* feat(config): support importing bot policy snippets

This changes the grammar of the Anubis bot policy config to allow
importing from internal shared rules or external rules on the
filesystem.

This lets you create a file at `/data/policies/block-evilbot.yaml` and
then import it with:

```yaml
bots:
- import: /data/policies/block-evilbot.yaml
```

This also explodes the default policy file into a bunch of composable
snippets.

Thank you @Aibrew for your example gitea Atom / RSS feed rules!

Signed-off-by: Xe Iaso <me@xeiaso.net>

* fix(data): update botPolicies.json to use imports

Signed-off-by: Xe Iaso <me@xeiaso.net>

* fix(cmd/anubis): extract bot policies with --extract-resources

This allows a user that doesn't have anything but the Anubis binary to
figure out what the default configuration does.

* docs(data/botPolices.yaml): document import syntax in-line

Signed-off-by: Xe Iaso <me@xeiaso.net>

* fix(lib/policy): better test importing from JSON snippets

Signed-off-by: Xe Iaso <me@xeiaso.net>

* docs(admin): Add import syntax documentation

This documents the import syntax and is based on the block comment at
the top of the default bot policy file.

* docs(changelog): add note about importing snippets

Signed-off-by: Xe Iaso <me@xeiaso.net>

* style(lib/policy/config): use an error value instead of an inline error

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-23 07:01:28 -04:00
.github fix(docs): make the docs respect light/dark mode (#334) 2025-04-23 04:01:02 +00:00
cmd feat: enable loading config fragments (#321) 2025-04-23 07:01:28 -04:00
data feat: enable loading config fragments (#321) 2025-04-23 07:01:28 -04:00
decaymap Add periodic cleanup job for DecayMap (#8) (#158) 2025-03-29 23:24:06 -04:00
docs feat: enable loading config fragments (#321) 2025-04-23 07:01:28 -04:00
internal feat(cmd/anubis): compute full XFF header (#328) 2025-04-23 04:06:47 +00:00
lib feat: enable loading config fragments (#321) 2025-04-23 07:01:28 -04:00
run Create Anubis FreeBSD rc.d script (#274) 2025-04-15 12:05:13 +00:00
var initial import from /x/ monorepo 2025-03-17 19:33:07 -04:00
web Add headers bot rule (#300) 2025-04-20 22:18:21 +00:00
xess Use outline shorthand (#293) 2025-04-19 16:03:11 -04:00
.air.toml feat: Add Open Graph tag support (#195) 2025-04-06 20:02:12 -04:00
.gitattributes Debug tool for benchmarking proof-of-work algorithms (#155) 2025-03-29 23:38:12 -04:00
.gitignore docs: fix edit me links and configuration subcategory (#238) 2025-04-07 17:28:29 -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 lib: move config to yaml (#307) 2025-04-21 00:09:27 +00:00
go.sum lib: move config to yaml (#307) 2025-04-21 00:09:27 +00:00
LICENSE initial import from /x/ monorepo 2025-03-17 19:33:07 -04:00
Makefile dev: Improvements to build scripts (#232) 2025-04-11 22:00:48 -04:00
package-lock.json dev: Improvements to build scripts (#232) 2025-04-11 22:00:48 -04:00
package.json dev: Improvements to build scripts (#232) 2025-04-11 22:00:48 -04:00
README.md README: add contributor images 2025-04-16 12:40:56 -04:00
VERSION v1.16.0 (#244) 2025-04-10 00:07:14 +00:00
yeetfile.js make a half-baked tarball (#221) 2025-04-06 12:44:52 +00: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. 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

Packaging Status

Packaging status

Contributors

Made with contrib.rocks.