fix: ask reddit.com with the firefox fingerprint first - #56
Merged
Conversation
Reddit's edge answers the chrome fingerprint with a 403 or a 429 while letting firefox through, and it allows anonymous readers about ten requests a minute per address, so the wasted chrome attempt on every read was costing a real share of that budget. identityOrder() picks the order per host: firefox then chrome for reddit.com and its subdomains, chrome then firefox everywhere else, with the same downgrade chain and plain fetch fallback as before. Refs #52.
Merged
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 #53 (refs #52). While probing the feeds, the chrome fingerprint drew 403 and 429 from reddit.com where firefox and plain curl got 200. viaImpers already retried with firefox on a blocked first attempt, but on a site that allows anonymous readers about ten requests a minute per address, the wasted chrome attempt was a real share of the budget on every read.
identityOrder(target)insrc/fetch.jsreturns the identity order for a URL: firefox then chrome for reddit.com and its subdomains, chrome then firefox everywhere else. The downgrade chain (blocked or refused first identity, then the second, then plain fetch) is unchanged.notreddit.comandreddit.com.examplekept on the default), and a refused firefox fingerprint on reddit.com still falling back to chrome.Live check:
oc reddit sub ClaudeAI -vreports HTTP 200 via impers:firefox on the first attempt, 478 tokens.npm test: 217 passing.