mirror of
https://github.com/BastilleBSD/templates.git
synced 2025-12-10 17:00:30 +01:00
Add template for www/go-anubis
This commit is contained in:
15
www/go-anubis/Bastillefile
Normal file
15
www/go-anubis/Bastillefile
Normal 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
8
www/go-anubis/README.md
Normal 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
|
||||
```
|
||||
3
www/go-anubis/usr/local/etc/syslog.d/anubis.conf
Normal file
3
www/go-anubis/usr/local/etc/syslog.d/anubis.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
!anubis
|
||||
*.* /var/log/anubis.log
|
||||
!*
|
||||
Reference in New Issue
Block a user