Weighs the soul of incoming HTTP requests to stop AI crawlers https://anubis.techaro.lol/
Xe Iaso 8c7640aa09
v1.18.0: Varis zos Galvus
The big ticket feature in this release is [CEL expression matching support](https://anubis.techaro.lol/docs/admin/configuration/expressions). This allows you to tailor your approach for the individual services you are protecting.

These can be as simple as:

```yaml
- name: allow-api-requests
  action: ALLOW
  expression:
    all:
      - '"Accept" in headers'
      - 'headers["Accept"] == "application/json"'
      - 'path.startsWith("/api/")'
```

Or as complicated as:

```yaml
- name: allow-git-clients
  action: ALLOW
  expression:
    all:
      - >-
        (
          userAgent.startsWith("git/") ||
          userAgent.contains("libgit") ||
          userAgent.startsWith("go-git") ||
          userAgent.startsWith("JGit/") ||
          userAgent.startsWith("JGit-")
        )
      - '"Git-Protocol" in headers'
      - headers["Git-Protocol"] == "version=2"
```

The docs have more information, but here's a tl;dr of the variables you have access to in expressions:

| Name            | Type                  | Explanation                                                                                                                               | Example                                                      |
| :-------------- | :-------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------- |
| `headers`       | `map[string, string]` | The [headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers) of the request being processed.                        | `{"User-Agent": "Mozilla/5.0 Gecko/20100101 Firefox/137.0"}` |
| `host`          | `string`              | The [HTTP hostname](https://web.dev/articles/url-parts#host) the request is targeted to.                                                  | `anubis.techaro.lol`                                         |
| `method`        | `string`              | The [HTTP method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Methods) in the request being processed.                    | `GET`, `POST`, `DELETE`, etc.                                |
| `path`          | `string`              | The [path](https://web.dev/articles/url-parts#pathname) of the request being processed.                                                   | `/`, `/api/memes/create`                                     |
| `query`         | `map[string, string]` | The [query parameters](https://web.dev/articles/url-parts#query) of the request being processed.                                          | `?foo=bar` -> `{"foo": "bar"}`                               |
| `remoteAddress` | `string`              | The IP address of the client.                                                                                                             | `1.1.1.1`                                                    |
| `userAgent`     | `string`              | The [`User-Agent`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent) string in the request being processed. | `Mozilla/5.0 Gecko/20100101 Firefox/137.0`                   |

This will be made more elaborate in the future. Give me time. This is a [simple, lovable, and complete](https://longform.asmartbear.com/slc/) implementation of this feature so that administrators can get hacking ASAP.

Other changes:

- Use CSS variables to deduplicate styles
- Fixed native packages not containing the stdlib and botPolicies.yaml
- Change import syntax to allow multi-level imports
- Changed the startup logging to use JSON formatting as all the other logs do.
- Added the ability to do [expression matching with CEL](./admin/configuration/expressions.mdx)
- Add a warning for clients that don't store cookies
- Disable Open Graph passthrough by default ([#435](https://github.com/TecharoHQ/anubis/issues/435))
- Clarify the license of the mascot images ([#442](https://github.com/TecharoHQ/anubis/issues/442))
- Started Suppressing 'Context canceled' errors from http in the logs ([#446](https://github.com/TecharoHQ/anubis/issues/446))

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-05-09 12:24:23 -04:00
.github build(deps): bump the gomod group across 1 directory with 4 updates (#457) 2025-05-07 17:48:10 -04:00
.vscode feat(checker): add CEL for matching complicated expressions (#421) 2025-05-03 14:26:54 -04:00
cmd feat(log): implement custom error log filter to suppress "context can… (#470) 2025-05-07 23:28:50 -04:00
data Spelling (#445) 2025-05-05 10:52:02 -04:00
decaymap Add periodic cleanup job for DecayMap (#8) (#158) 2025-03-29 23:24:06 -04:00
docs v1.18.0: Varis zos Galvus 2025-05-09 12:24:23 -04:00
internal Trim spaces from elements of split XFF string (#459) 2025-05-08 03:35:42 +00:00
lib Spelling (#445) 2025-05-05 10:52:02 -04:00
run Create Anubis FreeBSD rc.d script (#274) 2025-04-15 12:05:13 +00:00
test docs: add caddy docs (#423) 2025-05-02 19:15:05 +00:00
var initial import from /x/ monorepo 2025-03-17 19:33:07 -04:00
web Revert "fix(js): use pure JS SHA256 library, refactor (#471)" (#475) 2025-05-08 22:22:08 +00:00
xess build(deps): bump the gomod group across 1 directory with 4 updates (#457) 2025-05-07 17:48:10 -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 feat: make authorization cookie default expiration time customizable (#389) 2025-05-01 10:05:33 +00: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 the gomod group across 1 directory with 4 updates (#457) 2025-05-07 17:48:10 -04:00
go.sum build(deps): bump the gomod group across 1 directory with 4 updates (#457) 2025-05-07 17:48:10 -04:00
LICENSE initial import from /x/ monorepo 2025-03-17 19:33:07 -04:00
Makefile ci: add govulncheck (#456) 2025-05-06 14:07:55 +00:00
package-lock.json v1.18.0: Varis zos Galvus 2025-05-09 12:24:23 -04:00
package.json v1.18.0: Varis zos Galvus 2025-05-09 12:24:23 -04:00
README.md chore(sponsors): add canine.tools (#450) 2025-05-05 20:31:10 -04:00
VERSION v1.18.0: Varis zos Galvus 2025-05-09 12:24:23 -04:00
yeetfile.js Spelling (#445) 2025-05-05 10:52:02 -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

Sponsors

Anubis is brought to you by sponsors and donors like:

Distrust Terminal Trove canine.tools

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

Star History Chart

Packaging Status

Packaging status

Contributors

Made with contrib.rocks.