Skip to content

fix(stealth): close screen/window geometry headless tells#293

Draft
JWriter20 wants to merge 1 commit into
apify:masterfrom
JWriter20:pr/upstream-screen-window-stealth
Draft

fix(stealth): close screen/window geometry headless tells#293
JWriter20 wants to merge 1 commit into
apify:masterfrom
JWriter20:pr/upstream-screen-window-stealth

Conversation

@JWriter20

Copy link
Copy Markdown
Contributor

Three related leaks in the spoofed screen/window geometry, all from
BrowserForge fingerprints that ship physically-impossible or
headless-looking dimensions:

  1. navigator.platform / oscpu arch mismatch: ~8% of Linux fingerprints
    report "Linux armv81" while the UA says "Linux x86_64". CreepJS
    cross-checks oscpu/platform/UA arch, so force both to match the UA.

  2. noTaskbar: when screen.avail == screen on both axes, CreepJS's
    noTaskbar Like-Headless flag flips. Subtract a typical chrome height
    (mac 25 / win 40 / lin 27) from availHeight and clamp outer/inner
    height to the new avail.

  3. dimension hierarchy: enforce inner <= outer <= avail <= screen on both
    axes, since the browser faithfully reports whatever we inject and a
    fingerprint with e.g. outerWidth > screen.width leaks as impossible
    geometry.

Also stop the geoip block from clobbering user-supplied geo fields
(timezone / geolocation:* / locale:*) — fill gaps with setInto instead of
a spreading overwrite, and treat a user-set timezone as driving geo so
the proxy-without-geoip warning doesn't false-fire.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Three related leaks in the spoofed screen/window geometry, all from
BrowserForge fingerprints that ship physically-impossible or
headless-looking dimensions:

1. navigator.platform / oscpu arch mismatch: ~8% of Linux fingerprints
   report "Linux armv81" while the UA says "Linux x86_64". CreepJS
   cross-checks oscpu/platform/UA arch, so force both to match the UA.

2. noTaskbar: when screen.avail == screen on both axes, CreepJS's
   noTaskbar Like-Headless flag flips. Subtract a typical chrome height
   (mac 25 / win 40 / lin 27) from availHeight and clamp outer/inner
   height to the new avail.

3. dimension hierarchy: enforce inner <= outer <= avail <= screen on both
   axes, since the browser faithfully reports whatever we inject and a
   fingerprint with e.g. outerWidth > screen.width leaks as impossible
   geometry.

Also stop the geoip block from clobbering user-supplied geo fields
(timezone / geolocation:* / locale:*) — fill gaps with setInto instead of
a spreading overwrite, and treat a user-set timezone as driving geo so
the proxy-without-geoip warning doesn't false-fire.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants