Skip to content

feat(renderer): align browser locale with the proxy exit country - #511

Merged
us merged 1 commit into
mainfrom
feat/geo-locale-alignment
Sep 8, 2026
Merged

feat(renderer): align browser locale with the proxy exit country#511
us merged 1 commit into
mainfrom
feat/geo-locale-alignment

Conversation

@us

@us us commented Sep 8, 2026

Copy link
Copy Markdown
Owner

What changed

  • New crw_renderer::locale: a 32-row country table (ISO alpha-2, plus a uk alias for GB) mapping to an Accept-Language and an IANA timezone.
  • On the tier whose egress actually leaves from the pinned country (the one that composes a country-suffixed proxy login, chrome_proxy), and only when no per-request proxy overrides that egress, the CDP session now sets acceptLanguage on Network.setUserAgentOverride (plain tag form, Chromium adds the weights), Emulation.setTimezoneOverride, Emulation.setLocaleOverride, and the stealth script's navigator.languages.
  • A caller-supplied Accept-Language wins over every language signal; the clock still follows the exit country.
  • Refusals of the two Emulation overrides are logged at debug with the method name.

What did not change

  • No country, an unknown country, or any other tier: byte-identical CDP traffic and script bytes. The HTTP tier is untouched, since its egress is never country-pinned.
  • The country parameter's precedence and the proxy credential composition are untouched.

Verification

  • cargo test -p crw-renderer --features cdp: 943 passed (933 existing + 10 new).
  • Clippy clean with and without features, fmt clean.
  • Not verified live: a country-pinned render against a fingerprint probe through the residential proxy. The change is off on the hosted deployment's default path (no country), so production behaviour is unchanged until a caller sets country.

Measurement for the rest of the issue

Over 806 blocked requests in three days of production traces, confirmed geo-block signatures were 0.87% (all one host), and a ccTLD prior was wrong 97% of the time. Phases 1 to 3 of the issue are not worth building; details on the issue.

ref #385

When a request pins a residential exit country, the chrome_proxy tier still
announced a US browser: Accept-Language en-US, navigator.languages en-US, and
a UTC clock. An IP/locale mismatch is a stronger bot signal than a flagged IP
on its own, so the explicit country parameter was working against itself.

A country table in crw_renderer::locale maps the pinned country to an
Accept-Language and an IANA timezone. On the tier whose egress actually leaves
from that country (the one that composes a country-suffixed proxy login) the
session now sets acceptLanguage on Network.setUserAgentOverride, an
Emulation timezone override, an Emulation locale override, and the stealth
script's navigator.languages. A caller-supplied Accept-Language wins over every
language signal; the clock still follows the exit country. With no country, or
on any other tier, every path is byte-identical to before.

ref #385
@us
us merged commit 6155ac6 into main Sep 8, 2026
10 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant