capiumbrowser 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,9 +2,9 @@
2
2
  "schema_version": 2,
3
3
  "minimum_release_year": 2022,
4
4
  "browser": "chrome",
5
- "status": "experimental-emulation",
6
- "gpu_policy": "host",
7
- "hardware_policy": "host",
5
+ "status": "catalog-emulation",
6
+ "gpu_policy": "catalog",
7
+ "hardware_policy": "catalog",
8
8
  "physical_device_validation": "pending",
9
9
  "default_profile_ids": [
10
10
  "pixel-7",
@@ -13,6 +13,20 @@
13
13
  "pixel-8a",
14
14
  "pixel-9"
15
15
  ],
16
+ "font_core": [
17
+ "Roboto",
18
+ "Noto Sans",
19
+ "Noto Serif",
20
+ "Noto Sans Mono",
21
+ "Noto Color Emoji",
22
+ "Noto Sans JP",
23
+ "Noto Sans KR",
24
+ "Noto Sans SC",
25
+ "Noto Sans TC",
26
+ "Noto Naskh Arabic",
27
+ "Noto Sans Devanagari",
28
+ "Noto Sans Thai"
29
+ ],
16
30
  "sources": [
17
31
  "https://support.google.com/pixelphone/answer/7158570?hl=en",
18
32
  "https://news.samsung.com/global/samsung-galaxy-a55-5g-and-galaxy-a35-5g-awesome-innovations-and-security-engineered-for-everyone",
@@ -27,7 +41,12 @@
27
41
  "platform_version": "13",
28
42
  "width": 412,
29
43
  "height": 915,
30
- "dpr": 2.625
44
+ "dpr": 2.625,
45
+ "soc": "Tensor G2",
46
+ "cores": 8,
47
+ "memory_gb": 8,
48
+ "gpu_vendor": "Google Inc. (ARM)",
49
+ "gpu_renderer": "ANGLE (ARM, Mali-G710, OpenGL ES 3.2)"
31
50
  },
32
51
  {
33
52
  "id": "pixel-8",
@@ -36,7 +55,12 @@
36
55
  "platform_version": "14",
37
56
  "width": 412,
38
57
  "height": 915,
39
- "dpr": 2.625
58
+ "dpr": 2.625,
59
+ "soc": "Tensor G3",
60
+ "cores": 9,
61
+ "memory_gb": 8,
62
+ "gpu_vendor": "Google Inc. (ARM)",
63
+ "gpu_renderer": "ANGLE (ARM, Mali-G715, OpenGL ES 3.2)"
40
64
  },
41
65
  {
42
66
  "id": "pixel-8-pro",
@@ -45,7 +69,12 @@
45
69
  "platform_version": "14",
46
70
  "width": 448,
47
71
  "height": 997,
48
- "dpr": 3.0
72
+ "dpr": 3.0,
73
+ "soc": "Tensor G3",
74
+ "cores": 9,
75
+ "memory_gb": 12,
76
+ "gpu_vendor": "Google Inc. (ARM)",
77
+ "gpu_renderer": "ANGLE (ARM, Mali-G715, OpenGL ES 3.2)"
49
78
  },
50
79
  {
51
80
  "id": "pixel-8a",
@@ -54,7 +83,12 @@
54
83
  "platform_version": "14",
55
84
  "width": 412,
56
85
  "height": 915,
57
- "dpr": 2.625
86
+ "dpr": 2.625,
87
+ "soc": "Tensor G3",
88
+ "cores": 9,
89
+ "memory_gb": 8,
90
+ "gpu_vendor": "Google Inc. (ARM)",
91
+ "gpu_renderer": "ANGLE (ARM, Mali-G715, OpenGL ES 3.2)"
58
92
  },
59
93
  {
60
94
  "id": "pixel-9",
@@ -63,7 +97,12 @@
63
97
  "platform_version": "14",
64
98
  "width": 412,
65
99
  "height": 924,
66
- "dpr": 2.625
100
+ "dpr": 2.625,
101
+ "soc": "Tensor G4",
102
+ "cores": 8,
103
+ "memory_gb": 12,
104
+ "gpu_vendor": "Google Inc. (ARM)",
105
+ "gpu_renderer": "ANGLE (ARM, Mali-G715, OpenGL ES 3.2)"
67
106
  },
68
107
  {
69
108
  "id": "samsung-galaxy-a55",
@@ -74,6 +113,11 @@
74
113
  "width": 360,
75
114
  "height": 800,
76
115
  "dpr": 2.25,
116
+ "soc": "Exynos 1480",
117
+ "cores": 8,
118
+ "memory_gb": 8,
119
+ "gpu_vendor": "Google Inc. (Samsung Electronics Co., Ltd.)",
120
+ "gpu_renderer": "ANGLE (Samsung Electronics Co., Ltd., Xclipse 530, OpenGL ES 3.2)",
77
121
  "geometry_status": "devtools-emulation-only",
78
122
  "geometry_note": "These Chromium preset dimensions/DPR do not directly map to the published 1080x2340 panel; physical Chrome capture required."
79
123
  },
@@ -84,7 +128,12 @@
84
128
  "platform_version": "14",
85
129
  "width": 427,
86
130
  "height": 952,
87
- "dpr": 3.0
131
+ "dpr": 3.0,
132
+ "soc": "Tensor G4",
133
+ "cores": 8,
134
+ "memory_gb": 16,
135
+ "gpu_vendor": "Google Inc. (ARM)",
136
+ "gpu_renderer": "ANGLE (ARM, Mali-G715, OpenGL ES 3.2)"
88
137
  },
89
138
  {
90
139
  "id": "pixel-9-pro-xl",
@@ -93,7 +142,12 @@
93
142
  "platform_version": "14",
94
143
  "width": 448,
95
144
  "height": 997,
96
- "dpr": 3.0
145
+ "dpr": 3.0,
146
+ "soc": "Tensor G4",
147
+ "cores": 8,
148
+ "memory_gb": 16,
149
+ "gpu_vendor": "Google Inc. (ARM)",
150
+ "gpu_renderer": "ANGLE (ARM, Mali-G715, OpenGL ES 3.2)"
97
151
  }
98
152
  ]
99
153
  }
package/lib/channels.json CHANGED
@@ -1,30 +1,30 @@
1
1
  {
2
2
  "_comment": "SINGLE SOURCE OF TRUTH for the current stable Capium browser build per OS/arch. Each OS reaches stable independently -- edit one entry without touching the others. This file ships inside the wheel (the SDK reads it to pick each host's stable build) AND is published to the download server by the release pipeline. `version` is the reported Chromium version (what the browser reports to the customer, names the R2 folder); `engine_version` is the actual built Chromium engine (box_package verifies the binary against it) -- it differs from `version` when a platform reports a spoofed patch (Windows/macOS report .48 on the .47 engine). `revision` is our packaging counter -- the served R2 folder is chromium-v<version>.<revision>/, ALWAYS dotted-suffixed starting at 1. A Chromium version bump resets revision to 1. `published: false` means the tag is declared but no artifact exists yet.",
3
3
  "schema": 1,
4
- "updated": "2026-10-24",
4
+ "updated": "2026-10-27",
5
5
  "channels": {
6
6
  "stable": {
7
7
  "windows-x64": {
8
8
  "version": "156.0.8078.48",
9
9
  "engine_version": "156.0.8078.47",
10
- "revision": 1,
11
- "sha256": "1c4dff0da8a61036b1e14a2bbe91c79a8a083cf91879399ab5cf57d68f0e865b",
10
+ "revision": 3,
11
+ "sha256": "ad26bd1e62343ec741b3cd2ce8f73e00dfc6c25564654bfba828efb29a372a69",
12
12
  "published": true,
13
13
  "license_status_protocol": 1
14
14
  },
15
15
  "macos-arm64": {
16
16
  "version": "156.0.8078.48",
17
17
  "engine_version": "156.0.8078.47",
18
- "revision": 1,
19
- "sha256": "d545647a102c851394edbb3d6281917e5feabf1909bb128091b3eb9ed4326ee7",
18
+ "revision": 3,
19
+ "sha256": "ce85cf43d57ff5ab4d35416b874d50560705c07e296c0b41b5cb78ee0d6f6eda",
20
20
  "published": true,
21
21
  "license_status_protocol": 1
22
22
  },
23
23
  "linux-x64": {
24
24
  "version": "156.0.8078.47",
25
25
  "engine_version": "156.0.8078.47",
26
- "revision": 1,
27
- "sha256": "ff7019affcba442ea0fd1e3049d772cc26140a61615dadb8d383960b1f68a47f",
26
+ "revision": 3,
27
+ "sha256": "0ecad673f91b68b251e1185d88df6c46da35be592c46f45f015e189cd57b3152",
28
28
  "published": true,
29
29
  "license_status_protocol": 1
30
30
  },
package/lib/human.js CHANGED
@@ -1,12 +1,15 @@
1
1
  /**
2
- * human -- realistic mouse / typing / scroll for Playwright AND Puppeteer pages.
2
+ * human -- realistic mouse / typing / scroll / press-and-hold for Playwright AND Puppeteer pages.
3
3
  *
4
- * Anti-bot systems increasingly score *behavior*: instant teleport-clicks, zero-jitter typing
5
- * and single-delta scrolls are bot tells. These helpers move the cursor along a bezier path
6
- * with variable speed, type with per-key jitter, and scroll in eased increments. Pure driver
7
- * input (page.mouse / page.keyboard) -- no CDP tricks, so it stays consistent with the stealth
8
- * binary. The Playwright and Puppeteer input APIs align on everything used here except
9
- * mouse.wheel, which is bridged below.
4
+ * Anti-bot systems increasingly score *behavior*, and the modern ones (PX/HUMAN press-and-hold,
5
+ * DataDome slider) score pointer BIOMETRICS, not just "did a cursor arrive": velocity profile
6
+ * (humans accelerate then decelerate into the target -- Fitts's law -- never constant speed),
7
+ * orthogonal micro-jitter along the path, overshoot-and-correct on long moves, and physiological
8
+ * tremor during a sustained press (a hand cannot hold a mouse perfectly still; a rock-still
9
+ * multi-second hold is a machine signature). These helpers produce all of that with pure driver
10
+ * input (page.mouse / page.keyboard) -- no CDP tricks, so the event stream stays consistent with
11
+ * the stealth binary (isTrusted=true, normal coalescing). The Playwright and Puppeteer input
12
+ * APIs align on everything used here except mouse.wheel, which is bridged below.
10
13
  *
11
14
  * Presets tune the timing:
12
15
  * "default" -> natural human pace
@@ -16,9 +19,11 @@
16
19
 
17
20
  const PRESETS = {
18
21
  default: { moveSteps: [18, 34], stepMs: [6, 16], keyMs: [45, 130],
19
- clickPauseMs: [40, 140], scrollStep: [90, 220], scrollMs: [30, 90] },
22
+ clickPauseMs: [40, 140], scrollStep: [90, 220], scrollMs: [30, 90],
23
+ tremorPx: 1.1, tremorMs: [35, 110] },
20
24
  careful: { moveSteps: [30, 55], stepMs: [12, 28], keyMs: [80, 220],
21
- clickPauseMs: [120, 320], scrollStep: [50, 130], scrollMs: [60, 150] },
25
+ clickPauseMs: [120, 320], scrollStep: [50, 130], scrollMs: [60, 150],
26
+ tremorPx: 0.9, tremorMs: [50, 140] },
22
27
  };
23
28
 
24
29
  const cfg = (preset) => PRESETS[preset] || PRESETS.default;
@@ -26,54 +31,97 @@ const rand = (lo, hi) => lo + Math.random() * (hi - lo);
26
31
  const randMs = ([lo, hi]) => rand(lo, hi);
27
32
  const randInt = (lo, hi) => Math.round(rand(lo, hi));
28
33
  const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
34
+ const gauss = (mu, sigma) => {
35
+ // Box-Muller
36
+ const u = Math.random() || 1e-9;
37
+ const v = Math.random() || 1e-9;
38
+ return mu + sigma * Math.sqrt(-2 * Math.log(u)) * Math.cos(2 * Math.PI * v);
39
+ };
29
40
 
30
41
  function pos(page) {
31
42
  return page._capiumMouse || [randInt(2, 60), randInt(2, 60)];
32
43
  }
33
44
 
45
+ // Smoothstep time-warp: sampling the curve at these t values yields a bell-shaped velocity
46
+ // profile -- slow start, fast middle, decelerating arrival (Fitts-like) -- instead of the
47
+ // constant speed that uniform sampling produces.
48
+ const velocityWarp = (t) => t * t * (3 - 2 * t);
49
+
34
50
  function bezier(x0, y0, x1, y1, steps) {
35
- // two random control points -> a curved, non-linear path
51
+ // Two random control points -> a curved, non-linear path; velocity-warped sampling +
52
+ // orthogonal micro-jitter (largest mid-path, vanishing at the endpoints).
36
53
  const cx1 = x0 + (x1 - x0) * rand(0.2, 0.45) + rand(-40, 40);
37
54
  const cy1 = y0 + (y1 - y0) * rand(0.2, 0.45) + rand(-40, 40);
38
55
  const cx2 = x0 + (x1 - x0) * rand(0.55, 0.8) + rand(-40, 40);
39
56
  const cy2 = y0 + (y1 - y0) * rand(0.55, 0.8) + rand(-40, 40);
57
+ const dx = x1 - x0, dy = y1 - y0;
58
+ const dist = Math.hypot(dx, dy) || 1;
59
+ const nx = -dy / dist, ny = dx / dist; // unit normal to the gross direction
60
+ const jmax = Math.min(1.6, dist / 120); // short hops barely wobble
40
61
  const pts = [];
41
62
  for (let i = 1; i <= steps; i++) {
42
- const t = i / steps;
63
+ const lt = i / steps;
64
+ const t = velocityWarp(lt);
43
65
  const mt = 1 - t;
44
- pts.push([
45
- mt ** 3 * x0 + 3 * mt ** 2 * t * cx1 + 3 * mt * t ** 2 * cx2 + t ** 3 * x1,
46
- mt ** 3 * y0 + 3 * mt ** 2 * t * cy1 + 3 * mt * t ** 2 * cy2 + t ** 3 * y1,
47
- ]);
66
+ const x = mt ** 3 * x0 + 3 * mt ** 2 * t * cx1 + 3 * mt * t ** 2 * cx2 + t ** 3 * x1;
67
+ const y = mt ** 3 * y0 + 3 * mt ** 2 * t * cy1 + 3 * mt * t ** 2 * cy2 + t ** 3 * y1;
68
+ const j = Math.sin(Math.PI * lt) * rand(-jmax, jmax);
69
+ pts.push([x + nx * j, y + ny * j]);
48
70
  }
49
71
  return pts;
50
72
  }
51
73
 
74
+ async function runPath(page, pts, c) {
75
+ for (const [px, py] of pts) {
76
+ await page.mouse.move(px, py);
77
+ let d = randMs(c.stepMs);
78
+ if (Math.random() < 0.02) d += rand(30, 80); // occasional motor hitch
79
+ await sleep(d);
80
+ }
81
+ }
82
+
52
83
  async function wheel(page, dx, dy) {
53
84
  // Playwright: mouse.wheel(dx, dy). Puppeteer: mouse.wheel({deltaX, deltaY}).
54
85
  if (page.mouse.wheel.length >= 2) return page.mouse.wheel(dx, dy);
55
86
  return page.mouse.wheel({ deltaX: dx, deltaY: dy });
56
87
  }
57
88
 
58
- /** Move the cursor to (x, y) along a human-like curved path. */
89
+ /**
90
+ * Move the cursor to (x, y) along a human-like curved path.
91
+ *
92
+ * Long moves overshoot the target by a few pixels and correct -- the characteristic human
93
+ * "land past it, pull back" arrival that biometric scorers look for (its absence over many
94
+ * moves is a tell).
95
+ */
59
96
  async function move(page, x, y, preset = 'default') {
60
97
  const c = cfg(preset);
61
98
  const [x0, y0] = pos(page);
99
+ const dist = Math.hypot(x - x0, y - y0);
62
100
  const steps = randInt(...c.moveSteps);
63
- for (const [px, py] of bezier(x0, y0, x, y, steps)) {
64
- await page.mouse.move(px, py);
65
- await sleep(randMs(c.stepMs));
101
+ if (dist > 180 && Math.random() < 0.6) {
102
+ const ux = (x - x0) / dist, uy = (y - y0) / dist;
103
+ const over = rand(3, 14);
104
+ const ox = x + ux * over, oy = y + uy * over;
105
+ await runPath(page, bezier(x0, y0, ox, oy, steps), c);
106
+ await runPath(page, bezier(ox, oy, x, y, randInt(4, 8)), c);
107
+ } else {
108
+ await runPath(page, bezier(x0, y0, x, y, steps), c);
66
109
  }
67
110
  page._capiumMouse = [x, y];
68
111
  }
69
112
 
113
+ /** Target: a selector string, or an [x, y] pair. */
114
+ async function resolvePoint(page, target) {
115
+ if (Array.isArray(target) && target.length === 2) return [Number(target[0]), Number(target[1])];
116
+ const el = await page.waitForSelector(target, { state: 'visible', visible: true });
117
+ const box = await el.boundingBox();
118
+ return [box.x + box.width * rand(0.3, 0.7), box.y + box.height * rand(0.3, 0.7)];
119
+ }
120
+
70
121
  /** Move to a random point inside `selector` and click with a natural pause. */
71
122
  async function click(page, selector, preset = 'default') {
72
123
  const c = cfg(preset);
73
- const el = await page.waitForSelector(selector, { state: 'visible', visible: true });
74
- const box = await el.boundingBox();
75
- const tx = box.x + box.width * rand(0.3, 0.7);
76
- const ty = box.y + box.height * rand(0.3, 0.7);
124
+ const [tx, ty] = await resolvePoint(page, selector);
77
125
  await move(page, tx, ty, preset);
78
126
  await sleep(randMs(c.clickPauseMs));
79
127
  await page.mouse.down();
@@ -81,6 +129,36 @@ async function click(page, selector, preset = 'default') {
81
129
  await page.mouse.up();
82
130
  }
83
131
 
132
+ /**
133
+ * Press-and-hold on `target` (selector or [x, y]) for ~`seconds`, with tremor.
134
+ *
135
+ * Built for press-and-hold challenges (PX/HUMAN and similar), which measure the pointer
136
+ * DURING the press: a real hand drifts and trembles ~1px around the anchor the whole time,
137
+ * and releases slightly late. A hold with zero pointer events between mousedown and mouseup
138
+ * reads as synthetic no matter how good the approach path was. `seconds` should be the
139
+ * challenge's required duration; a natural human release lag is added on top.
140
+ */
141
+ async function hold(page, target, seconds, preset = 'default') {
142
+ const c = cfg(preset);
143
+ const [tx, ty] = await resolvePoint(page, target);
144
+ await move(page, tx, ty, preset);
145
+ await sleep(randMs(c.clickPauseMs));
146
+ await page.mouse.down();
147
+ const amp = c.tremorPx;
148
+ let ax = tx, ay = ty; // slow random-walk drift anchor
149
+ const end = Date.now() + Number(seconds) * 1000 + rand(150, 450);
150
+ while (Date.now() < end) {
151
+ await sleep(randMs(c.tremorMs));
152
+ if (Math.random() < 0.7) { // tremor tick: micro-move near the anchor
153
+ ax = Math.min(tx + 3, Math.max(tx - 3, ax + rand(-0.35, 0.35)));
154
+ ay = Math.min(ty + 3, Math.max(ty - 3, ay + rand(-0.35, 0.35)));
155
+ await page.mouse.move(ax + gauss(0, amp * 0.5), ay + gauss(0, amp * 0.5));
156
+ }
157
+ }
158
+ await page.mouse.up();
159
+ page._capiumMouse = [ax, ay];
160
+ }
161
+
84
162
  /** Click the field, then type with per-key jitter (occasional longer pauses). */
85
163
  async function typeText(page, selector, text, preset = 'default') {
86
164
  const c = cfg(preset);
@@ -112,7 +190,7 @@ async function dwell(loSec = 0.4, hiSec = 1.8) {
112
190
  }
113
191
 
114
192
  /**
115
- * Attach page.humanMove / humanClick / humanType / humanScroll / humanDwell.
193
+ * Attach page.humanMove / humanClick / humanType / humanScroll / humanHold / humanDwell.
116
194
  *
117
195
  * target may be a Page or a BrowserContext (all current + future pages are patched).
118
196
  * Returns target (chainable). Does NOT override page.click/type so existing code is safe;
@@ -126,6 +204,7 @@ function humanize(target, preset = 'default') {
126
204
  page.humanClick = (sel, p = preset) => click(page, sel, p);
127
205
  page.humanType = (sel, text, p = preset) => typeText(page, sel, text, p);
128
206
  page.humanScroll = (dy, p = preset) => scroll(page, dy, p);
207
+ page.humanHold = (sel, seconds, p = preset) => hold(page, sel, seconds, p);
129
208
  page.humanDwell = dwell;
130
209
  };
131
210
 
@@ -139,4 +218,4 @@ function humanize(target, preset = 'default') {
139
218
  return target;
140
219
  }
141
220
 
142
- module.exports = { humanize, move, click, typeText, scroll, dwell, PRESETS };
221
+ module.exports = { humanize, move, click, typeText, scroll, dwell, hold, PRESETS };
@@ -15,13 +15,14 @@ const proxy = require('./proxy');
15
15
  /**
16
16
  * Build [--proxy-server, --geoip] flags for geo coherence.
17
17
  *
18
- * The binary's CapiumGeoipResolver runs at PreBrowserStart ONLY when --geoip is present. A
19
- * proxy on its own does NOT trigger it: the lookup is a synchronous, blocking round-trip that
20
- * would otherwise add up to 2.5s to every proxied launch. When it does run it resolves the
21
- * egress IP (proxy exit, else the host's real public IP) and pins WebRTC / timezone /
22
- * geolocation / language -- so the SDK adds no probe of its own. geoipOn is tri-state:
23
- * * null -> default: add no flag, so NO geo lookup runs (no launch latency) even with a
24
- * proxy. Pass geoip: true to opt into proxy-exit coherence.
18
+ * The binary's CapiumGeoipResolver runs at PreBrowserStart ONLY when --geoip is present.
19
+ * When it runs it resolves the egress IP (proxy exit, else the host's real public IP) and
20
+ * pins WebRTC / timezone / geolocation / language -- so the SDK adds no probe of its own.
21
+ * geoipOn is tri-state:
22
+ * * null -> default: ON whenever a proxy is set, OFF otherwise. An uncorrected host
23
+ * timezone under a proxied identity (UTC on a server, or the operator's home
24
+ * zone against a foreign exit) is a far stronger detection signal than the
25
+ * lookup's one-off launch latency. Pass geoip: false to opt out.
25
26
  * * true -> ON with --geoip (resolves the egress -- proxy exit, or the host IP if proxyless).
26
27
  * * false -> OFF with --geoip=false, which the binary honors FIRST (explicit opt-out).
27
28
  * Returns {launchOptions, args}.
@@ -29,11 +30,11 @@ const proxy = require('./proxy');
29
30
  function proxyAndGeoArgs(spec, geoipOn) {
30
31
  const { launchOptions, args } = proxy.resolveProxyConfig(spec);
31
32
  const out = [...args];
32
- if (geoipOn === null || geoipOn === undefined) {
33
- // default: no flag, no lookup
34
- } else if (geoipOn) {
33
+ const explicitOff = geoipOn === false;
34
+ if (geoipOn === null || geoipOn === undefined) geoipOn = Boolean(spec);
35
+ if (geoipOn) {
35
36
  out.push('--geoip');
36
- } else {
37
+ } else if (explicitOff) {
37
38
  out.push('--geoip=false');
38
39
  }
39
40
  return { launchOptions, args: out };
@@ -87,4 +88,25 @@ function clearStatusFile(p) {
87
88
  } catch {}
88
89
  }
89
90
 
90
- module.exports = { proxyAndGeoArgs, buildArgs, newStatusFile, clearStatusFile };
91
+ /**
92
+ * Deterministic per-seed window geometry inside the seed's available screen area.
93
+ *
94
+ * Every profile previously got the identical maximized-like window (exactly availWidth x
95
+ * availHeight at 0,0), so all profiles sharing a pool screen were geometry-identical -- a
96
+ * clusterable signature. Real users are a mix: most keep the browser maximized, a minority
97
+ * run a windowed browser at an arbitrary size/position. Mirror that mix deterministically
98
+ * per seed (the geometry is part of the profile's stable identity, like its screen).
99
+ * Matches python browser._window_bounds_for_seed.
100
+ */
101
+ function windowBoundsForSeed(seed, aw, ah) {
102
+ const d = crypto.createHash('sha256')
103
+ .update(`capium-window:${Math.trunc(seed) || 0}`).digest();
104
+ if (d[0] % 10 < 6) return { left: 0, top: 0, width: aw, height: ah };
105
+ const w = Math.max(800, Math.trunc(aw * (0.78 + (d[1] / 255) * 0.16)));
106
+ const h = Math.max(600, Math.trunc(ah * (0.80 + (d[2] / 255) * 0.15)));
107
+ const left = Math.trunc(((aw - w) * d[3]) / 255);
108
+ const top = Math.trunc(((ah - h) * d[4]) / 255);
109
+ return { left, top, width: w, height: h };
110
+ }
111
+
112
+ module.exports = { proxyAndGeoArgs, buildArgs, newStatusFile, clearStatusFile, windowBoundsForSeed };
package/lib/mobile.js CHANGED
@@ -84,7 +84,7 @@ async function engineProbe(expected) {
84
84
  gl.getParameter(ext.UNMASKED_RENDERER_WEBGL) === 'Apple GPU';
85
85
  }
86
86
  const match = navigator.userAgent.match(/Chrome\/(\d+)\.0\.0\.0 Mobile Safari\//);
87
- if (!expected || navigator.platform !== 'Linux armv81' || !match ||
87
+ if (!expected || navigator.platform !== 'Linux armv8l' || !match ||
88
88
  !navigator.userAgent.includes('(Linux; Android 10; K)') ||
89
89
  navigator.userAgent.includes('Version/4.0') || !navigator.userAgentData) return false;
90
90
  const ch = await navigator.userAgentData.getHighEntropyValues([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capiumbrowser",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Drop-in stealth browser SDK on top of Playwright or Puppeteer (Capium Chromium).",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Capzy (https://capzy.ai)",
package/playwright.js CHANGED
@@ -27,7 +27,7 @@ const human = require('./lib/human');
27
27
  const license = require('./lib/license');
28
28
  const readiness = require('./lib/license-readiness');
29
29
  const { CapiumError, translateLaunchError, readLaunchStatus } = require('./lib/errors');
30
- const { proxyAndGeoArgs, buildArgs, newStatusFile, clearStatusFile } =
30
+ const { proxyAndGeoArgs, buildArgs, newStatusFile, clearStatusFile, windowBoundsForSeed } =
31
31
  require('./lib/launch-common');
32
32
 
33
33
  function requireDriver() {
@@ -161,9 +161,9 @@ function applyViewportDefaults(browser, mobileSeed = null, mobileDevice = null,
161
161
  *
162
162
  * seed/platform : identity. stealthArgs: false drops the default fingerprint flags.
163
163
  * proxy : "http://user:pass@host:port" | "socks5://host:port" | {server, username, ...}.
164
- * geoip : geo coherence, resolved inside the binary. null (default) = OFF: no lookup
165
- * runs, even with a proxy. true = ON: pins timezone/geo/WebRTC/language to the
166
- * egress (proxy exit, or the host IP if proxyless). false = explicit opt-out.
164
+ * geoip : geo coherence, resolved inside the binary. null (default) = ON whenever a
165
+ * proxy is set (pins timezone/geo/WebRTC/language to the exit), OFF otherwise.
166
+ * true = ON even proxyless (host IP). false = explicit opt-out.
167
167
  * timezone/locale: explicit override (IANA tz + BCP-47 locale; in-binary spoof).
168
168
  * licenseKey/licenseServer: pass the license programmatically (else read from
169
169
  * CAPIUM_LICENSE_KEY / ~/.capium/license). The binary self-licenses; the key
@@ -298,12 +298,11 @@ async function fitWindow(browser, context, page) {
298
298
  if (!scr || !scr.w || !scr.h) return;
299
299
  const aw = Math.trunc(scr.w);
300
300
  const ah = Math.trunc(scr.h);
301
- // Size the window to the FULL per-seed screen (match python _fit_window_to_screen) so
302
- // screen ~= viewport -- avoids the browserscan "screen != viewport" VM tell. NOT a forced 1440x900.
303
- const w = aw;
304
- const h = ah;
305
- const left = 0;
306
- const top = 0;
301
+ // Per-seed geometry within the seed's screen: maximized-like for most seeds,
302
+ // realistically windowed for the rest (match python _window_bounds_for_seed).
303
+ const seed = (context && context._capiumSeed) ||
304
+ (browser && browser._capiumSeed) || 0;
305
+ const { left, top, width: w, height: h } = windowBoundsForSeed(seed, aw, ah);
307
306
  pcdp = await context.newCDPSession(page);
308
307
  const { targetInfo } = await pcdp.send('Target.getTargetInfo');
309
308
  // Persistent contexts may have no Browser handle; their page session still
package/puppeteer.js CHANGED
@@ -31,7 +31,7 @@ const human = require('./lib/human');
31
31
  const license = require('./lib/license');
32
32
  const readiness = require('./lib/license-readiness');
33
33
  const { CapiumError, translateLaunchError, readLaunchStatus } = require('./lib/errors');
34
- const { proxyAndGeoArgs, buildArgs, newStatusFile, clearStatusFile } =
34
+ const { proxyAndGeoArgs, buildArgs, newStatusFile, clearStatusFile, windowBoundsForSeed } =
35
35
  require('./lib/launch-common');
36
36
 
37
37
  function requireDriver() {
@@ -267,12 +267,10 @@ async function fitWindow(browser, page) {
267
267
  if (!scr || !scr.w || !scr.h) return;
268
268
  const aw = Math.trunc(scr.w);
269
269
  const ah = Math.trunc(scr.h);
270
- // Size the window to the FULL per-seed screen (match python _fit_window_to_screen) so
271
- // screen ~= viewport -- avoids the browserscan "screen != viewport" VM tell. NOT a forced 1440x900.
272
- const w = aw;
273
- const h = ah;
274
- const left = 0;
275
- const top = 0;
270
+ // Per-seed geometry within the seed's screen: maximized-like for most seeds,
271
+ // realistically windowed for the rest (match python _window_bounds_for_seed).
272
+ const seed = (browser && browser._capiumSeed) || 0;
273
+ const { left, top, width: w, height: h } = windowBoundsForSeed(seed, aw, ah);
276
274
  cdp = await page.createCDPSession();
277
275
  const { targetInfo } = await cdp.send('Target.getTargetInfo');
278
276
  const { windowId } = await cdp.send('Browser.getWindowForTarget',