承接 flowd/phirewall-preset-bots 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

flowd/phirewall-preset-bots

Composer 安装命令:

composer require flowd/phirewall-preset-bots

包简介

Bot and AI-crawler control presets for the Phirewall PHP firewall - block AI scrapers and rate-limit aggressive SEO crawlers

README 文档

README

Block AI crawlers and rate-limit aggressive SEO crawlers with flowd/phirewall.

Presets are PortableConfig data (and ConfigLayers), materialized onto your cache with Config::with().

Installation

composer require flowd/phirewall-preset-bots

Usage

use Flowd\Phirewall\Config;
use Flowd\PhirewallPresetBots\Presets;

// Block AI crawlers, rate-limit SEO crawlers.
$config = (new Config($cache))->with(
    Presets::blockAiCrawlers(),
    Presets::throttleSeoCrawlers(limit: 60, period: 60),
);

Presets:

Preset Effect
Presets::blockAiCrawlers() Blocks (403) requests whose User-Agent matches a known AI/LLM crawler.
Presets::throttleAiCrawlers(limit, period) Rate-limits AI crawlers per client IP instead of blocking; stays indexable.
Presets::throttleSeoCrawlers(limit, period) Rate-limits aggressive SEO/marketing crawlers per client IP.

Each rule is named preset.bots.*; combine a later layer that redefines a name to override it.

What it matches

blockAiCrawlers() targets crawlers that identify as AI/LLM agents - GPTBot, ChatGPT-User, OAI-SearchBot, ClaudeBot, anthropic-ai, Claude-Web, CCBot, PerplexityBot, Bytespider, Amazonbot, Meta-ExternalAgent, FacebookBot, cohere-ai, Diffbot, omgili, ImagesiftBot, Timpibot, YouBot, DuckAssistBot. The SEO list covers AhrefsBot, SemrushBot, MJ12bot, DotBot, DataForSeoBot, BLEXBot, rogerbot, PetalBot and similar. Full lists: CrawlerCatalog.

Search and link-preview agents (Googlebot, bingbot, Applebot, facebookexternalhit) are not in either list. Google-Extended and Applebot-Extended are robots.txt opt-out tokens, not User-Agents, so they are not matched - set those in robots.txt.

Limits to be aware of

  • User-Agent matching is policy enforcement, not a security control. It stops honest crawlers that send a truthful User-Agent; a hostile scraper can send any string. Pair this with the OWASP CRS and rate-limit presets for hostile traffic.
  • Throttles key on the client IP from REMOTE_ADDR. Behind a proxy or CDN that is the proxy address, which buckets every client together. Configure a trusted client-IP resolver on the Config, or override the throttle by name.
  • The catalogue is opinionated. To keep a crawler you value (for example Amazonbot or FacebookBot), override the rule by name with your own narrower list.

Development

composer install
composer test     # rector (dry-run), php-cs-fixer (dry-run), phpunit, phpstan

License

LGPL-3.0-or-later (dual-licensed, proprietary licensing available), like flowd/phirewall.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2026-06-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固