Hacker News 中文摘要

RSS订阅

你不需要阿努比斯 -- You Don't Need Anubis

文章摘要

文章指出,面对LLM公司日益激进的爬虫行为,许多网站采用Anubis进行防护。但作者认为Anubis虽能防DDoS,对阻止LLM爬虫却无效,因为其计算成本对这些公司几乎为零,实际防护效果有限。

文章总结

标题:你其实不需要Anubis

近年来,LLM训练公司的网络爬虫行为愈发肆无忌惮。它们无视robots.txt协议,伪造用户代理和IP地址,甚至通过高频请求对小网站发起DDoS攻击——其中Anthropic公司的ClaudeBot尤为突出。相比之下,OpenAI的GPTBot至少提供了完整文档且易于屏蔽。

这导致越来越多网站开始使用Anubis——一种基于工作量证明的验证系统,要求访问者先完成小型加密计算才能继续浏览。但问题在于:Anubis实际效果有限。虽然它能有效防御DDoS攻击(特别适合不愿使用Cloudflare的用户),但多数使用者其实只需要防御LLM爬虫——这种情况下完全不需要Anubis

常见误解是Anubis通过提高计算成本来阻止爬虫。但实际情况是,LLM公司破解Anubis的边际成本近乎为零。当前Anubis看似有效,仅仅因为主流LLM爬虫不执行JavaScript

作者以自建Redlib为例,通过12行Caddy配置就实现了同等防护效果: nginx domain.com { @unverified not header Cookie *verified* handle @unverified { header Content-Type text/html respond <<EOF <script>document.cookie='verified=1; Path=/';window.location.reload();</script> EOF 418 } reverse_proxy localhost:3001 } 这种方案既不会造成10秒的页面延迟,又能有效拦截非JS爬虫。即便未来爬虫开始执行JS(华为的爬虫已能轻松破解Anubis),其失效速度也不会比Anubis更快。

值得注意的是,Cloudflare等专业防护服务仍是目前最可靠的解决方案。Anubis官方文档也承认:

多数情况下使用Cloudflare即可,Anubis仅适用于无法/不愿使用Cloudflare的场景

本文并非否定Anubis的DDoS防护价值,而是指出它正被大量误用于单纯的LLM爬虫防御。对于仅需拦截ClaudeBot的网站,完全可以用更轻量级的方案替代。


原文链接 | 作者flexagoon | 采用CC0 1.0协议授权

评论总结

评论总结:

  1. Anubis的PoW机制不合理

    • 观点:工作量证明(PoW)在密码哈希和反垃圾邮件中有意义,但在Anubis中作为防爬机制不合理,因为合法用户承担了更多成本。
    • 引用:
      • "Work functions don't make sense as a token tax; legitimate users, who far outnumber the bots, are actually paying more of a cost."
      • "The next thing Anubis builds should be that, and when they do that, they should chuck the proof of work thing."
  2. Anubis的实际效果

    • 观点:尽管PoW机制存在问题,但Anubis确实能有效阻止部分爬虫,且部署简单、误封率低。
    • 引用:
      • "it's the only thing that stopped the bot problem for me, and it's really easy to deploy."
      • "very few human visitors are incorrectly blocked by it (unlike Captchas or IP/ASN bans)."
  3. Anubis的局限性

    • 观点:Anubis仅对不执行JavaScript的简单爬虫有效,且可能被绕过(如修改User-Agent)。
    • 引用:
      • "Anubis is specifically DDOS protection, not generally anti-bot."
      • "My favourite thing about Anubis is that it completely bypasses the actual challenge if you set User-Agent header to curl."
  4. 用户体验问题

    • 观点:Anubis对真实用户造成延迟或访问失败,引发不满。
    • 引用:
      • "Every few days, I'm hit with the Anubis block... Over time, this has turned me sour on the Anubis project."
      • "Nothing makes me think a site is operated by unserious man-children more than seeing that anime cat-girl flash up."
  5. 替代方案与行业现状

    • 观点:Cloudflare等成熟方案更可靠,但缺乏竞争;需探索更平衡的解决方案。
    • 引用:
      • "Cloudflare is the default, no one seems to bother to take the risk with a competitor."
      • "We're likely to see simple checks result in detection systems that look for 'set a cookie'."
  6. 宏观反思

    • 观点:当前网络架构不可持续,可能需要围墙花园或分层网络以应对滥用。
    • 引用:
      • "Internet in its current form doesn't seem sustainable."
      • "It's time to start building overlay VPN networks for humans."

关键争议点:

  • 有效性:Anubis能否长期有效对抗日益复杂的爬虫(如执行JavaScript的爬虫)。
  • 成本分配:PoW机制是否将过多成本转嫁给真实用户。
  • 替代方案:是否有更高效且用户友好的防爬方案(如基于JavaScript的挑战)。