Caddy plugin version of Anubis.
This plugin provides a Caddy handler that blocks unwanted requests using a sha256 PoW challenge. It's not a full replacement for Anubis, but most of the features are there.
- Install Caddy with the plugin:
caddy add-package github.com/sjtug/cerberus
- Add the handler directive to your Caddyfile. Refer to the Caddyfile for an example configuration.
- Anubis is a standalone server that can be used with any web server, while Cerberus is a Caddy plugin.
- No support for custom rules: use caddy matchers instead.
- No custom UI or anime girls.
- Scripts and parameters are inlined in HTML.
- No separate endpoint for challenge response: any query with
?cerberus
will be treated as a challenge response.
Check Caddyfile for an example configuration.
WARNING: Each cerberus directive will create a new instance of the handler. This means that if you have multiple cerberus directives, each one will have its own internal state and consume memory. Please use the cerberus
directive only once per site.
If you modified the js file, you need to run the following command to rebundle the js file:
$ devenv tasks js:bundle
Also, you need to run the following command to recompile the template if modified:
$ devenv tasks go:codegen
Please run tests and lints before submitting a PR:
$ direnv test # or go test
$ golangci-lint run