Skip to content

Commit 8310cfd

Browse files
Ahsaan-Ullahclaude
andcommitted
CloakBrowser: present the profile's full language list
Playwright's locale emulation reduced navigator.languages to one entry; pass Chrome's --lang and --accept-lang instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 7132f70 commit 8310cfd

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ Format based on [Keep a Changelog](https://keepachangelog.com/).
1515
window, with progress and up to 3 retries; launch logs are written as they
1616
happen and show engine download progress; and the watchdog only stops a launch
1717
that has made no progress for 5 minutes.
18+
- **CloakBrowser showed one language.** Playwright's locale emulation cut
19+
`navigator.languages` down to the locale alone (`es-ES`, with no `es`/`en`
20+
fallbacks a real browser has). Cloak now gets Chrome's own `--lang` and
21+
`--accept-lang`, so `navigator.languages`, `Intl` and the Accept-Language
22+
header (`es-ES,es;q=0.9,en;q=0.8`) all match the profile.
1823

1924
## [0.2.0] - 2026-10-25
2025

‎engine/persona/drivers.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,6 @@ def _driver_cloak(profile, store, headless=False, keep_open=True, extra_args=Non
672672
headless=headless,
673673
proxy=browser_proxy(profile.proxy).to_playwright() if profile.proxy else None,
674674
**window,
675-
locale=launch_languages(profile, geo)[0],
676675
timezone=geo["timezone"], # the exit IP's zone, not the stored one
677676
geoip=bool(profile.proxy) and not geo["ip"],
678677
**geo_opts,
@@ -683,6 +682,11 @@ def _driver_cloak(profile, store, headless=False, keep_open=True, extra_args=Non
683682
args=["--test-type", "--no-first-run", "--no-default-browser-check",
684683
*cloak_identity_args(profile, user_data), *webrtc_ip,
685684
f"--window-size={fp.viewport_width},{fp.viewport_height}",
685+
# Language the way a real Chrome gets it: UI language plus the
686+
# Accept-Language list. Playwright's locale emulation would cut
687+
# navigator.languages down to the one locale (es-ES, no es/en).
688+
f"--lang={launch_languages(profile, geo)[0]}",
689+
f"--accept-lang={','.join(launch_languages(profile, geo)[1])}",
686690
*_webrtc_arg(profile), *_dns_lockdown_arg(profile),
687691
*_extension_args(profile), *profile_launch_args(profile)[0], *(extra_args or [])],
688692
)

0 commit comments

Comments
 (0)