A caddy plugin to place Anubis (anti-AI scrapper) directly within caddy as a middleware.
Find a file
2025-05-10 14:41:21 -04:00
caddy_anubis.go chore: update import paths in caddy_anubis.go to reflect the new GitHub repository structure 2025-05-10 14:41:21 -04:00
go.mod chore: update import paths in caddy_anubis.go to reflect the new GitHub repository structure 2025-05-10 14:41:21 -04:00
go.sum chore: update import paths in caddy_anubis.go to reflect the new GitHub repository structure 2025-05-10 14:41:21 -04:00
README.md chore: update anubis dependency to use the new GitHub repository and adjust import paths 2025-05-10 14:39:39 -04:00

caddy-anubis

caddy-anubis is a plugin that loads anubis for requests in order to slow down AI and Scraper traffic from destroying infrastucture.

I do not currently recommend it for production usage as the current implementation is more of a Proof-of-Concept then anything and due to it being pinned to anubis v1.15.2 as the main.mjs was no longer served on later versions

Known Issues

  • The very first request after a Caddy start or restart takes about 5 seconds before anubis kicks in. All subsequent requests, even after clearing cookies work perfectly and are near instant.

Usage

AFIK doesn't work inside a route or handler block.

Example:

#order anubis after encode
#order redir after anubis
localhost {
  request_header +X-Real-IP {remote_host}
  request_header +X-Forwarded-For {remote_host}
  anubis

  reverse_proxy 127.0.0.1:3000
}

Build from source

xcaddy build --with git.z0x.ca/z0x/caddy-anubis

Credits