本文也在我的博客:https://blog.135579.xyz/archives/share/anubis-waf-experience/ 上发布
看到一篇文章:GNOME GitLab 使用 PoW 工具 Anubis 应对 GenAI 爬虫滥用行为 (层叠, FOSS infrastructure is under attack by AI companies)
可爱,马上使用
介绍
Anubis 是一个基于 PoW 的类 WAF 工具,可以保护你的网站免受爬虫爬取(从莫名其妙的爬虫到 OpenAI、Anthropic 爬虫,抑或是 Wayback Machine)
可以作为在不接入 Cloudflare 时一个较好的盾
快速部署
参考官方文档,直接使用 docker compose 部署,以下是我的配置(有点奇怪):
services:
anubis-nginx:
image: ghcr.io/techarohq/anubis:latest
environment:
BIND: ":8080"
DIFFICULTY: "5"
METRICS_BIND: ":9090"
SERVE_ROBOTS_TXT: "true"
TARGET: "http://host.docker.internal:18822"
ports:
- 18823:8080
extra_hosts:
- "host.docker.internal:host-gateway"
出来就是这样的:https://anubis.d0ne.me/ (Difficulty 5 计算的时间有点久,生产环境可以调成 Difficulty 4)
成功阻挡了网页存档:https://archive.is/BCXdX, https://web.archive.org/web/~
总结
好!