0.2.0: denyCidrs, chargeSpoofedBrowsers, exempt - #1
Merged
Merged
Conversation
Two crawlers that never say who they are: a VPS fleet wearing "Chrome/148", and a residential-proxy rotation cycling three Chrome strings across five hundred addresses at up to 250 requests a second, walking a directory's topic and author pages at 2.8s a render. Neither is on any user-agent list. `denyCidrs` answers a hosting provider's ranges with a tiny 403 before anything else runs. `chargeSpoofedBrowsers` asks the question only a browser can answer: every Chromium since 76 sends Sec-Fetch-Mode on every request and nothing can remove it, so a "Chrome/…" request without it is an HTTP client with a copied string, and gets the same 402 as GPTBot. `exempt` lets a site keep its signed-in readers out of either check. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WJaXiqE9BDoNfoJBhfXroC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds three options for crawlers that do not name themselves:
denyCidrs: IPv4 ranges answered 403 before anything else (a VPS fleet's hosting provider).chargeSpoofedBrowsers: a request claimingChrome/…without theSec-Fetch-Modeheader every Chromium sends is charged like a training crawler.exempt: a predicate for requests never charged (signed-in cookie).Motivation: rssamplifier is being walked by a residential-proxy rotation (499 distinct IPs in 500 requests, three Chrome strings, 25 to 250 req/s) that an IP block cannot touch, on top of the OVH fleet measured in August.
38 tests pass on Node and Bun.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WJaXiqE9BDoNfoJBhfXroC