anubis

Fri 07 November 2025

这导致越来越多的网站使用 Anubis,这是一种基于工作量证明的机器人保护解决方案,要求所有访问者在继续之前解决其设备上的小加密问题。

它可能是一个很好的 DDoS 保护解决方案,特别是对于不想使用 Cloudflare 的人来说。但似乎大多数 Anubis 用户不需要 DDoS 保护 - 只需要保护 agaist 激进的 LLM 抓取工具。如果这是你唯一的用例,你可能不需要 Anubis。

domain.com {
    # Match all requests without a "verified" cookie"
    @unverified not header Cookie *verified*

    # Serve them a JS page that sets the cookie
    handle @unverified {
        header Content-Type text/html
        respond <<EOF
            <script>
            document.cookie = 'verified=1; Path=/;';
            window.location.reload();
            </script>
        EOF 418
    }

    # Proxy all other requests normally
    reverse_proxy localhost:3001
}

,它可以工作,并且与 Anubis 一样有效,同时不会因 10 秒的页面加载时间而打扰您的访问者。

如果您唯一关心的是 ClaudeBot,大多数使用 Anubis 的网站似乎都是这种情况,请去用一个不烦人的解决方案替换您烦人的权宜之计。

https://fxgn.dev/blog/anubis/

Category: 网上冲浪2025