Compare commits

...
1 Commits
Author SHA1 Message Date
fauno f70a28f9d1 feat: anubis geoip
continuous-integration/drone/pr Build is failing
2026-11-10 16:17:56 -03:00
4 changed files with 47 additions and 1 deletions
+8
View File
@@ -236,6 +236,13 @@ WRITE_TIMEOUT=0s
## Anubis metrics
#COMPOSE_FILE="$COMPOSE_FILE:compose.anubis-metrics.yml"
## Enable Anubis GeoIP detection
#COMPOSE_FILE="$COMPOSE_FILE:compose.anubis-geoip.yml"
# YAML list of blocked ASNs
#ANUBIS_GEOIP_BLOCKED_ASNS='[13335,136907,45102]'
# YAML list of blocked countries
#ANUBIS_GEOIP_BLOCKED_COUNTRIES='[BR,CN,VN]'
## Enable onion service support
#ONION_ENABLED=1
@@ -259,3 +266,4 @@ WRITE_TIMEOUT=0s
#RATE_LIMIT_AVERAGE=100
#RATE_LIMIT_BURST=200
#RATE_LIMIT_PERIOD=1s
+1 -1
View File
@@ -1,4 +1,4 @@
export TRAEFIK_YML_VERSION=v37
export FILE_PROVIDER_YML_VERSION=v14
export ENTRYPOINT_VERSION=v5
export ANUBIS_YML_VERSION=v1
export ANUBIS_YML_VERSION=v2
+28
View File
@@ -1,7 +1,35 @@
bots:
{{ if eq (env "ANUBIS_GEOIP_ENABLED") "true" }}
{{ if ne (env "ANUBIS_GEOIP_BLOCKED_ASNS") "" }}
- name: blocked-asns
action: WEIGH
asns:
match: {{ env "ANUBIS_GEOIP_BLOCKED_ASNS" }}
weight:
adjust: 10
{{ end }}
{{ if ne (env "ANUBIS_GEOIP_BLOCKED_COUNTRIES") "" }}
- name: countries-with-aggressive-scrapers
action: WEIGH
geoip:
countries: {{ env "ANUBIS_GEOIP_BLOCKED_COUNTRIES" }}
weight:
adjust: 10
{{ end }}
{{ end }}
- import: (data)/meta/default-config.yaml
{{ if eq (env "ANUBIS_METRICS_ENABLED") "true" }}
metrics:
bind: ":9090"
network: "tcp"
{{ end }}
{{ if eq (env "ANUBIS_GEOIP_ENABLED") "true" }}
geoip:
asn:
path: /var/lib/anubis/GeoLite2-ASN.mmdb
country:
path: /var/lib/anubis/GeoLite2-Country.mmdb
logging:
sink: stdio
asn: true
{{ end }}
+10
View File
@@ -0,0 +1,10 @@
---
version: "3.8"
services:
anubis:
environment:
ANUBIS_GEOIP_ENABLED: "true"
volumes:
- "anubis-geoip:/var/lib/anubis/:ro"
volumes:
anubis-geoip: