Repository navigation
Probe SearXNG instances at / instead of running a search - #15
Merged
Merged
Conversation
SearXNG ships a bot limiter that rejects search requests which do not look like they came from a browser. Our health check requested /search?q=current+weather, so 28 of 39 instances answered HTTP 429 and were pruned as dead -- even though they serve users fine, because a real browser sends the headers and cookies the limiter wants. Measured across all 39 instances with the probe's own User-Agent: GET / 200 on 38/39 GET /search?q=... 200 on 6/39 Probing the root page asks the question we actually care about -- is this instance up and serving -- without tripping bot detection that never applies to the users we redirect. Anti-bot detection still applies: isBlockPage inspects the body, and it still flags an Anubis-walled instance on the root probe. searxng goes from 2/39 to 37/39 healthy, and the whole-app live instance count from 59 to 95. Only searxng's test_url is changed. whoogle, librey and tent still probe a search endpoint; whether they have the same problem has not been measured. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RU5GnqJo2CsjM4zoPX5jv
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.
Follow-up to #14. That PR restored SearXNG's instance list (0 → 39), but only 2 of the 39 survived the health check. This is why.
The problem
SearXNG ships a bot limiter that rejects search requests which don't look like they came from a browser. Our health check requested
/search?q=current+weather, so 28 of 39 instances answered HTTP 429 and were pruned as dead — even though they serve users fine, because a real browser sends the headers and cookies the limiter wants.Measured across all 39 instances using the probe's own User-Agent:
GET /GET /search?q=current+weatherFailure breakdown on
/search: 28×429, 2×418, 2×403, 1×202.Probing the root page asks the question we actually care about — is this instance up and serving — without tripping bot detection that never applies to the users we redirect to it.
This is a narrower instance of exactly what upstream cited when archiving. The difference is that here it's fixable: the challenge isn't on the page users land on, it's on the endpoint we chose to poke.
Result
Anti-bot detection still does its job —
isBlockPageinspects the response body, and it still flags an Anubis-walled instance on the root probe. The remaining two failures are one403and one genuine Anubis wall.Scope
Only
searxng'stest_urlchanges.whoogle,libreyandtentstill probe a search endpoint; whether they have the same problem hasn't been measured, so I left them alone rather than guessing.The diff is one line per file — the JSON formatting is byte-identical otherwise.
🤖 Generated with Claude Code
https://claude.ai/code/session_017RU5GnqJo2CsjM4zoPX5jv