Merge pull request #17 from herrbischoff/anubis

This commit is contained in:
tschettervictor
2025-11-20 07:54:28 -07:00
committed by GitHub
3 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
ARG ED25519_PRIVATE_KEY_HEX
ARG WEB_SERVER_IP
ARG DOMAIN_NAME
CMD mkdir -p /usr/local/etc/pkg/repos
CMD echo 'FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest" }' > /usr/local/etc/pkg/repos/FreeBSD.conf
PKG go-anubis
SYSRC anubis_enable=YES
SYSRC anubis_args="-target http://${WEB_SERVER_IP}:4000 -bind ${JAIL_IP}:8923 -cookie-domain ${DOMAIN_NAME} -redirect-domain ${DOMAIN_NAME} -ed25519-private-key-hex ${ED25519_PRIVATE_KEY_HEX}"
CMD mkdir -p /usr/local/etc/syslog.d/
CP usr /
CMD touch /var/log/anubis.log
CMD chown www:www /var/log/anubis.log
SERVICE syslogd reload
SERVICE anubis start

8
www/go-anubis/README.md Normal file
View File

@@ -0,0 +1,8 @@
## go-anubis
Bastille Template for Anubis, which weighs the soul of incoming HTTP requests
to stop AI crawlers
## Usage
```shell
bastille template TARGET www/go-anubis --arg ED25519_PRIVATE_KEY_HEX=`openssl rand -hex 32` --arg WEB_SERVER_IP=10.20.30.40 --arg DOMAIN_NAME=example.com
```

View File

@@ -0,0 +1,3 @@
!anubis
*.* /var/log/anubis.log
!*