ant0-browser 0.0.0-stage → 0.2.0-beta.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.
Files changed (163) hide show
  1. package/LICENSE +35 -0
  2. package/README.md +208 -2
  3. package/dist/canvas.d.ts +55 -0
  4. package/dist/canvas.d.ts.map +1 -0
  5. package/dist/canvas.js +82 -0
  6. package/dist/canvas.js.map +1 -0
  7. package/dist/chromium-version.d.ts +22 -0
  8. package/dist/chromium-version.d.ts.map +1 -0
  9. package/dist/chromium-version.js +22 -0
  10. package/dist/chromium-version.js.map +1 -0
  11. package/dist/claim-hints.d.ts +36 -0
  12. package/dist/claim-hints.d.ts.map +1 -0
  13. package/dist/claim-hints.js +9 -0
  14. package/dist/claim-hints.js.map +1 -0
  15. package/dist/cleanup.d.ts +35 -0
  16. package/dist/cleanup.d.ts.map +1 -0
  17. package/dist/cleanup.js +106 -0
  18. package/dist/cleanup.js.map +1 -0
  19. package/dist/content.d.ts +11 -0
  20. package/dist/content.d.ts.map +1 -0
  21. package/dist/content.js +52 -0
  22. package/dist/content.js.map +1 -0
  23. package/dist/download.d.ts +24 -0
  24. package/dist/download.d.ts.map +1 -0
  25. package/dist/download.js +227 -0
  26. package/dist/download.js.map +1 -0
  27. package/dist/errors.d.ts +49 -0
  28. package/dist/errors.d.ts.map +1 -0
  29. package/dist/errors.js +53 -0
  30. package/dist/errors.js.map +1 -0
  31. package/dist/fingerprint.d.ts +218 -0
  32. package/dist/fingerprint.d.ts.map +1 -0
  33. package/dist/fingerprint.js +475 -0
  34. package/dist/fingerprint.js.map +1 -0
  35. package/dist/fontpack.d.ts +13 -0
  36. package/dist/fontpack.d.ts.map +1 -0
  37. package/dist/fontpack.js +150 -0
  38. package/dist/fontpack.js.map +1 -0
  39. package/dist/fonts.d.ts +15 -0
  40. package/dist/fonts.d.ts.map +1 -0
  41. package/dist/fonts.js +86 -0
  42. package/dist/fonts.js.map +1 -0
  43. package/dist/geoip.d.ts +45 -0
  44. package/dist/geoip.d.ts.map +1 -0
  45. package/dist/geoip.js +290 -0
  46. package/dist/geoip.js.map +1 -0
  47. package/dist/geometry.d.ts +32 -0
  48. package/dist/geometry.d.ts.map +1 -0
  49. package/dist/geometry.js +85 -0
  50. package/dist/geometry.js.map +1 -0
  51. package/dist/humanize.d.ts +20 -0
  52. package/dist/humanize.d.ts.map +1 -0
  53. package/dist/humanize.js +921 -0
  54. package/dist/humanize.js.map +1 -0
  55. package/dist/identity-persistence.d.ts +88 -0
  56. package/dist/identity-persistence.d.ts.map +1 -0
  57. package/dist/identity-persistence.js +381 -0
  58. package/dist/identity-persistence.js.map +1 -0
  59. package/dist/identity.d.ts +81 -0
  60. package/dist/identity.d.ts.map +1 -0
  61. package/dist/identity.js +370 -0
  62. package/dist/identity.js.map +1 -0
  63. package/dist/index.d.ts +281 -0
  64. package/dist/index.d.ts.map +1 -0
  65. package/dist/index.js +790 -0
  66. package/dist/index.js.map +1 -0
  67. package/dist/launch-ticket.d.ts +191 -0
  68. package/dist/launch-ticket.d.ts.map +1 -0
  69. package/dist/launch-ticket.js +549 -0
  70. package/dist/launch-ticket.js.map +1 -0
  71. package/dist/launchopts.d.ts +266 -0
  72. package/dist/launchopts.d.ts.map +1 -0
  73. package/dist/launchopts.js +623 -0
  74. package/dist/launchopts.js.map +1 -0
  75. package/dist/motion.d.ts +106 -0
  76. package/dist/motion.d.ts.map +1 -0
  77. package/dist/motion.js +311 -0
  78. package/dist/motion.js.map +1 -0
  79. package/dist/motionscore.d.ts +57 -0
  80. package/dist/motionscore.d.ts.map +1 -0
  81. package/dist/motionscore.js +215 -0
  82. package/dist/motionscore.js.map +1 -0
  83. package/dist/native/linux-x64/PRODUCT-LICENSE.txt +28 -0
  84. package/dist/native/linux-x64/ant0_runtime.node +0 -0
  85. package/dist/native/windows-x64/PRODUCT-LICENSE.txt +28 -0
  86. package/dist/native/windows-x64/ant0_runtime.node +0 -0
  87. package/dist/persona-migration.d.ts +54 -0
  88. package/dist/persona-migration.d.ts.map +1 -0
  89. package/dist/persona-migration.js +97 -0
  90. package/dist/persona-migration.js.map +1 -0
  91. package/dist/persona-profile-v2.d.ts +169 -0
  92. package/dist/persona-profile-v2.d.ts.map +1 -0
  93. package/dist/persona-profile-v2.js +454 -0
  94. package/dist/persona-profile-v2.js.map +1 -0
  95. package/dist/persona-profile-v4.d.ts +61 -0
  96. package/dist/persona-profile-v4.d.ts.map +1 -0
  97. package/dist/persona-profile-v4.js +79 -0
  98. package/dist/persona-profile-v4.js.map +1 -0
  99. package/dist/persona-rejected.d.ts +36 -0
  100. package/dist/persona-rejected.d.ts.map +1 -0
  101. package/dist/persona-rejected.js +40 -0
  102. package/dist/persona-rejected.js.map +1 -0
  103. package/dist/population-model.d.ts +45 -0
  104. package/dist/population-model.d.ts.map +1 -0
  105. package/dist/population-model.js +245 -0
  106. package/dist/population-model.js.map +1 -0
  107. package/dist/profile-file.d.ts +201 -0
  108. package/dist/profile-file.d.ts.map +1 -0
  109. package/dist/profile-file.js +736 -0
  110. package/dist/profile-file.js.map +1 -0
  111. package/dist/release-fetch.d.ts +74 -0
  112. package/dist/release-fetch.d.ts.map +1 -0
  113. package/dist/release-fetch.js +395 -0
  114. package/dist/release-fetch.js.map +1 -0
  115. package/dist/release.d.ts +16 -0
  116. package/dist/release.d.ts.map +1 -0
  117. package/dist/release.js +26 -0
  118. package/dist/release.js.map +1 -0
  119. package/dist/render.d.ts +38 -0
  120. package/dist/render.d.ts.map +1 -0
  121. package/dist/render.js +104 -0
  122. package/dist/render.js.map +1 -0
  123. package/dist/runtime-client.d.ts +47 -0
  124. package/dist/runtime-client.d.ts.map +1 -0
  125. package/dist/runtime-client.js +327 -0
  126. package/dist/runtime-client.js.map +1 -0
  127. package/dist/runtime-launch.d.ts +22 -0
  128. package/dist/runtime-launch.d.ts.map +1 -0
  129. package/dist/runtime-launch.js +92 -0
  130. package/dist/runtime-launch.js.map +1 -0
  131. package/dist/scale.d.ts +29 -0
  132. package/dist/scale.d.ts.map +1 -0
  133. package/dist/scale.js +105 -0
  134. package/dist/scale.js.map +1 -0
  135. package/dist/shaderdialect.d.ts +33 -0
  136. package/dist/shaderdialect.d.ts.map +1 -0
  137. package/dist/shaderdialect.js +47 -0
  138. package/dist/shaderdialect.js.map +1 -0
  139. package/dist/speech-coherence.d.ts +52 -0
  140. package/dist/speech-coherence.d.ts.map +1 -0
  141. package/dist/speech-coherence.js +254 -0
  142. package/dist/speech-coherence.js.map +1 -0
  143. package/dist/template-selection.d.ts +14 -0
  144. package/dist/template-selection.d.ts.map +1 -0
  145. package/dist/template-selection.js +66 -0
  146. package/dist/template-selection.js.map +1 -0
  147. package/dist/warnings.d.ts +50 -0
  148. package/dist/warnings.d.ts.map +1 -0
  149. package/dist/warnings.js +273 -0
  150. package/dist/warnings.js.map +1 -0
  151. package/dist/webgl-coherence.d.ts +30 -0
  152. package/dist/webgl-coherence.d.ts.map +1 -0
  153. package/dist/webgl-coherence.js +98 -0
  154. package/dist/webgl-coherence.js.map +1 -0
  155. package/dist/webgpu-override.d.ts +14 -0
  156. package/dist/webgpu-override.d.ts.map +1 -0
  157. package/dist/webgpu-override.js +82 -0
  158. package/dist/webgpu-override.js.map +1 -0
  159. package/dist/widevine.d.ts +44 -0
  160. package/dist/widevine.d.ts.map +1 -0
  161. package/dist/widevine.js +203 -0
  162. package/dist/widevine.js.map +1 -0
  163. package/package.json +56 -4
@@ -0,0 +1,475 @@
1
+ // Maps the SDK's fingerprint options to the Ant0 Browser Chromium command-line switches.
2
+ // Switch names mirror components/ungoogled/ungoogled_switches.cc (see patches/000-fingerprint-switches.patch).
3
+ import { gzipSync } from "node:zlib";
4
+ import { assertPersonaProfileV4 } from "./persona-profile-v4.js";
5
+ import { CANVAS_NOISE_KEY_SWITCH, assertCanvasNoiseKey, canvasMode, } from "./canvas.js";
6
+ import { SdkInputError } from "./errors.js";
7
+ import { webgpuOverridePlan } from "./webgpu-override.js";
8
+ import { assertPersonaProfileV2 } from "./persona-profile-v2.js";
9
+ import { existsSync, readFileSync } from "node:fs";
10
+ import { createHash } from "node:crypto";
11
+ export const FINGERPRINT_KEYS = [
12
+ "fingerprint",
13
+ "platform",
14
+ "platformVersion",
15
+ "brand",
16
+ "brandVersion",
17
+ "gpuVendor",
18
+ "gpuRenderer",
19
+ "hardwareConcurrency",
20
+ "deviceMemory",
21
+ "screenWidth",
22
+ "screenHeight",
23
+ "availWidth",
24
+ "availHeight",
25
+ "colorDepth",
26
+ "devicePixelRatio",
27
+ "maxTouchPoints",
28
+ "lightStealth",
29
+ "location",
30
+ "timezone",
31
+ "acceptLanguage",
32
+ "webrtcIp",
33
+ "webrtcMdns",
34
+ "disableGpuFingerprint",
35
+ "fingerprintNoise",
36
+ "gpuStringSpoof",
37
+ "canvasNoise",
38
+ "canvas",
39
+ "canvasNoiseKey",
40
+ "fingerprintProfileFile",
41
+ "fingerprintProfile",
42
+ "storageQuota",
43
+ "tlsProfile",
44
+ ];
45
+ /** Split an options object into its fingerprint half and the remaining (Playwright) half. */
46
+ export function splitFingerprintOptions(options) {
47
+ const fingerprint = {};
48
+ const rest = {};
49
+ for (const [k, v] of Object.entries(options)) {
50
+ if (FINGERPRINT_KEYS.includes(k)) {
51
+ fingerprint[k] = v;
52
+ }
53
+ else {
54
+ rest[k] = v;
55
+ }
56
+ }
57
+ return { fingerprint, rest: rest };
58
+ }
59
+ /** Normalize an Accept-Language value for Chromium's `--accept-lang`: a plain comma-separated
60
+ * tag list with NO `;q=` weights or spaces (Chromium adds the q-weights to the header itself; a
61
+ * `;` in the switch value trips a DCHECK and crashes the renderer). */
62
+ export function cleanAcceptLanguage(v) {
63
+ return String(v)
64
+ .split(",")
65
+ .map((t) => t.split(";")[0].trim())
66
+ .filter(Boolean)
67
+ .join(",");
68
+ }
69
+ /** Encode a captured ant0-browser-profile for the `--fingerprint-profile` switch. `value` may be a
70
+ * path to a `.json` file, a profile object, or a JSON string. gzip+base64 keeps the full capture
71
+ * (~40 KB) within Chromium's command-line length limit (gzip ~6x); the engine gunzips + parses it. */
72
+ export function encodeProfile(value) {
73
+ let raw;
74
+ if (typeof value === "object") {
75
+ if (value.schema_version === 2)
76
+ assertPersonaProfileV2(value);
77
+ if (value.schema_version === 4)
78
+ assertPersonaProfileV4(value);
79
+ raw = Buffer.from(JSON.stringify(value));
80
+ }
81
+ else if (existsSync(value)) {
82
+ raw = readFileSync(value);
83
+ }
84
+ else {
85
+ raw = Buffer.from(value); // assume a JSON string
86
+ }
87
+ if (typeof value !== "object") {
88
+ try {
89
+ const parsed = JSON.parse(raw.toString("utf8"));
90
+ if (typeof parsed === "object" && parsed !== null
91
+ && parsed.schema_version === 2) {
92
+ assertPersonaProfileV2(parsed);
93
+ }
94
+ else if (typeof parsed === "object" && parsed !== null
95
+ && parsed.schema_version === 4) {
96
+ assertPersonaProfileV4(parsed);
97
+ }
98
+ }
99
+ catch (error) {
100
+ if (error instanceof SyntaxError) {
101
+ // Preserve legacy behavior: Chromium reports malformed legacy JSON.
102
+ }
103
+ else {
104
+ throw error;
105
+ }
106
+ }
107
+ }
108
+ return gzipSync(raw, { level: 9 }).toString("base64");
109
+ }
110
+ /** Read imported language and canonical-v2 timezone values without changing legacy profiles. */
111
+ function profileLocale(value) {
112
+ let obj;
113
+ try {
114
+ if (typeof value === "object")
115
+ obj = value;
116
+ else if (existsSync(value))
117
+ obj = JSON.parse(readFileSync(value, "utf8"));
118
+ else
119
+ obj = JSON.parse(value);
120
+ }
121
+ catch {
122
+ return {};
123
+ }
124
+ const nav = obj?.navigator;
125
+ const locale = obj?.locale;
126
+ const langs = obj?.schema_version === 2 ? locale?.languages : nav?.languages;
127
+ const timezone = obj?.schema_version === 2 && typeof locale?.timezone === "string" && locale.timezone
128
+ ? locale.timezone
129
+ : undefined;
130
+ return {
131
+ language: Array.isArray(langs) && langs.length ? langs.map(String).join(",") : undefined,
132
+ timezone,
133
+ };
134
+ }
135
+ /** Best-effort imported profile language list for Chromium's locale switches. */
136
+ export function profileAcceptLanguage(value) {
137
+ return profileLocale(value).language;
138
+ }
139
+ // Coherent Windows-plausible desktop/laptop metadata bundles, indexed by a hash of the seed:
140
+ // [screen_w, screen_h, avail_w, avail_h, dpr, color_depth, device_memory_gb, hw_concurrency].
141
+ // lightStealth uses ONLY dpr/color_depth/device_memory/hw_concurrency from each row (screen stays
142
+ // real — see the note on `lightStealth`). The screen columns are retained so an explicit opt-in
143
+ // screen spoof can reuse a coherent row.
144
+ const LIGHT_STEALTH_PROFILES = [
145
+ [1920, 1080, 1920, 1040, 1.0, 24, 8, 8],
146
+ [1920, 1080, 1920, 1040, 1.0, 24, 16, 12],
147
+ [1920, 1080, 1920, 1040, 1.0, 24, 16, 16],
148
+ [2560, 1440, 2560, 1400, 1.0, 24, 16, 16],
149
+ [2560, 1440, 2560, 1400, 1.5, 24, 16, 12],
150
+ [1536, 864, 1536, 824, 1.25, 24, 8, 8],
151
+ [1536, 864, 1536, 824, 1.25, 24, 16, 12],
152
+ [1366, 768, 1366, 728, 1.0, 24, 8, 4],
153
+ [1366, 768, 1366, 728, 1.0, 24, 4, 4],
154
+ [1440, 900, 1440, 860, 1.0, 24, 8, 8],
155
+ [1600, 900, 1600, 860, 1.0, 24, 8, 8],
156
+ [1680, 1050, 1680, 1010, 1.0, 24, 8, 8],
157
+ [1920, 1200, 1920, 1160, 1.0, 24, 16, 12],
158
+ [3840, 2160, 3840, 2120, 1.0, 24, 32, 16],
159
+ ];
160
+ /**
161
+ * Deterministic, coherent metadata bundle for `lightStealth`, applied via the NATIVE override
162
+ * switches only (never `--fingerprint`). Spoofs ONLY the axes that survive strict anti-bot checks:
163
+ * hardwareConcurrency, deviceMemory, colorDepth, devicePixelRatio, maxTouchPoints. It deliberately
164
+ * does NOT spoof screen/avail dimensions (a faked screen is a reliable block trigger). Presents the
165
+ * browser's REAL version (no brandVersion spoof — a version lie desyncs UA-CH + TLS from the real
166
+ * binary). The seed->row mapping matches the Python SDK (full sha256 digest as a big integer mod N).
167
+ */
168
+ export function lightStealthValues(seed) {
169
+ // Default seed string for seedless calls: the same persona every time unless an explicit seed is passed.
170
+ const key = seed === undefined || seed === null || String(seed) === "" ? "ant0-light-stealth" : String(seed);
171
+ const hex = createHash("sha256").update(key, "utf8").digest("hex");
172
+ const idx = Number(BigInt("0x" + hex) % BigInt(LIGHT_STEALTH_PROFILES.length));
173
+ const row = LIGHT_STEALTH_PROFILES[idx];
174
+ return {
175
+ devicePixelRatio: row[4],
176
+ colorDepth: row[5],
177
+ deviceMemory: row[6],
178
+ hardwareConcurrency: row[7],
179
+ maxTouchPoints: 0,
180
+ brand: "chrome",
181
+ };
182
+ }
183
+ /** Build the Chromium switches for a set of fingerprint options. */
184
+ /** Parse the leading integer (the major) out of a version string like "120.0.6099.109" -> 120. */
185
+ function majorFromVersion(value) {
186
+ if (value === undefined || value === null)
187
+ return undefined;
188
+ const head = String(value).trim().split(".")[0];
189
+ return /^\d+$/.test(head) ? Number(head) : undefined;
190
+ }
191
+ /**
192
+ * Resolve `tlsProfile` to a concrete `--fingerprint-tls-profile` value, or undefined (native TLS).
193
+ * "match-persona"/"auto" (default) follows `brandVersion`; "native"/"off"/undefined -> native;
194
+ * "chrome-<major>" or a number -> pinned. Unrecognized values -> native (never break the handshake).
195
+ * Always resolves to `chrome-<major>` (Chromium-core; the brand lives in headers, not the ClientHello).
196
+ */
197
+ export function resolveTlsProfile(value, o) {
198
+ if (value === undefined || value === null || value === "" || value === "native" || value === "off") {
199
+ return undefined;
200
+ }
201
+ if (value === "match-persona" || value === "auto") {
202
+ const major = majorFromVersion(o.brandVersion);
203
+ return major ? `chrome-${major}` : undefined;
204
+ }
205
+ if (typeof value === "number")
206
+ return `chrome-${value}`;
207
+ const text = String(value).trim().toLowerCase();
208
+ if (/^chrome-\d+$/.test(text))
209
+ return text;
210
+ if (/^\d+$/.test(text))
211
+ return `chrome-${text}`;
212
+ return undefined;
213
+ }
214
+ // Primary Accept-Language tag -> a plausible IANA timezone, so the default persona's timezone is
215
+ // coherent with its locale instead of leaking the host's (often UTC on servers/containers). Not
216
+ // geo-truth — resolve the proxy exit-IP and pass an explicit timezone override for accuracy.
217
+ const LOCALE_TZ = {
218
+ "en-US": "America/New_York", "en-CA": "America/Toronto", "en-GB": "Europe/London",
219
+ "en-AU": "Australia/Sydney", "en-NZ": "Pacific/Auckland", "en-IE": "Europe/Dublin",
220
+ "de-DE": "Europe/Berlin", "de-AT": "Europe/Vienna", "fr-FR": "Europe/Paris",
221
+ "es-ES": "Europe/Madrid", "es-MX": "America/Mexico_City", "it-IT": "Europe/Rome",
222
+ "nl-NL": "Europe/Amsterdam", "pt-BR": "America/Sao_Paulo", "pt-PT": "Europe/Lisbon",
223
+ "pl-PL": "Europe/Warsaw", "sv-SE": "Europe/Stockholm", "ja-JP": "Asia/Tokyo",
224
+ "ko-KR": "Asia/Seoul", "zh-CN": "Asia/Shanghai", "zh-TW": "Asia/Taipei",
225
+ "ru-RU": "Europe/Moscow", "tr-TR": "Europe/Istanbul", "ar-SA": "Asia/Riyadh",
226
+ "hi-IN": "Asia/Kolkata", "id-ID": "Asia/Jakarta",
227
+ };
228
+ /**
229
+ * A plausible IANA timezone for a primary Accept-Language tag (`en-US` -> `America/New_York`), so the
230
+ * default persona's timezone is coherent with its locale rather than leaking the host's UTC. Falls
231
+ * back by language subtag, then to America/New_York (matching the en-US Accept-Language default).
232
+ */
233
+ export function defaultTimezone(primaryLang) {
234
+ if (!primaryLang)
235
+ return undefined;
236
+ const tag = primaryLang.trim();
237
+ if (LOCALE_TZ[tag])
238
+ return LOCALE_TZ[tag];
239
+ const lang = tag.split("-")[0].toLowerCase();
240
+ for (const [key, tz] of Object.entries(LOCALE_TZ)) {
241
+ if (key.toLowerCase().startsWith(lang + "-"))
242
+ return tz;
243
+ }
244
+ return "America/New_York";
245
+ }
246
+ /** The persona's device pixel ratio when the SDK knows it, else undefined (a native identity, or an
247
+ * engine-picked persona, leaves the real display scale alone). Order: the explicit
248
+ * `devicePixelRatio`, the `lightStealth` bundle's value, then a v2 profile's `display.device_pixel_ratio`. */
249
+ export function personaDpr(o) {
250
+ const ok = (v) => typeof v === "number" && Number.isFinite(v) && v > 0 && v <= 8;
251
+ if (ok(o.devicePixelRatio))
252
+ return o.devicePixelRatio;
253
+ if (o.devicePixelRatio === undefined && o.lightStealth) {
254
+ const v = lightStealthValues(o.fingerprint).devicePixelRatio;
255
+ if (ok(v))
256
+ return v;
257
+ }
258
+ const d = profileDisplay(o);
259
+ return ok(d?.device_pixel_ratio) ? d.device_pixel_ratio : undefined;
260
+ }
261
+ /** A v2 profile's `display` block, or undefined (no profile, unreadable, or the legacy format). */
262
+ function profileDisplay(o) {
263
+ if (o.fingerprintProfile === undefined)
264
+ return undefined;
265
+ let obj;
266
+ try {
267
+ const v = o.fingerprintProfile;
268
+ obj = typeof v === "object" ? v : existsSync(v) ? JSON.parse(readFileSync(v, "utf8")) : JSON.parse(v);
269
+ }
270
+ catch {
271
+ return undefined;
272
+ }
273
+ const root = obj;
274
+ if (root && root.schema_version === 4) {
275
+ // Schema 4 (spec 2.4): surfaces.display names the available area avail_width/avail_height;
276
+ // present it under the v2 key names so both formats yield the same flags for the same numbers.
277
+ const sd = root.surfaces?.display;
278
+ if (!sd || typeof sd !== "object")
279
+ return undefined;
280
+ const s4 = sd;
281
+ return { device_pixel_ratio: s4.device_pixel_ratio, available_width: s4.avail_width, available_height: s4.avail_height };
282
+ }
283
+ if (!root || root.schema_version !== 2)
284
+ return undefined;
285
+ const d = root.display;
286
+ return d && typeof d === "object" ? d : undefined;
287
+ }
288
+ /** The persona's available screen in CSS px (explicit `availWidth`/`availHeight`, else a v2 profile). */
289
+ export function personaAvail(o) {
290
+ const num = (v) => (typeof v === "number" && Number.isFinite(v) && v > 0 ? v : undefined);
291
+ const d = profileDisplay(o);
292
+ return {
293
+ width: num(o.availWidth) ?? num(d?.available_width),
294
+ height: num(o.availHeight) ?? num(d?.available_height),
295
+ };
296
+ }
297
+ /** Engine switch that names a persona file (schema 4). One constant, one-line change. */
298
+ export const PROFILE_FILE_SWITCH = "--fingerprint-profile-file";
299
+ /** The `schema_version` of a profile given as an object, JSON text or a path; undefined if unreadable. */
300
+ function profileSchemaVersion(value) {
301
+ try {
302
+ const obj = typeof value === "object" ? value : existsSync(value) ? JSON.parse(readFileSync(value, "utf8")) : JSON.parse(value);
303
+ return obj?.schema_version;
304
+ }
305
+ catch {
306
+ return undefined;
307
+ }
308
+ }
309
+ export function fingerprintArgs(o, identityApi = false) {
310
+ const args = [];
311
+ o = { ...o }; // never mutate the caller's options
312
+ if (o.lightStealth) {
313
+ // Fill in the coherent metadata bundle via native override switches. An explicit caller field
314
+ // (e.g. deviceMemory: 16) wins over the preset. CRITICAL: never emit --fingerprint, so the
315
+ // persona machinery / farbling never engages; each value then takes the C++ flag > real path.
316
+ const preset = lightStealthValues(o.fingerprint);
317
+ for (const [k, v] of Object.entries(preset)) {
318
+ const cur = o[k];
319
+ if (cur === undefined || cur === null || cur === "")
320
+ o[k] = v;
321
+ }
322
+ delete o.fingerprint;
323
+ }
324
+ const set = (flag, value) => {
325
+ if (value !== undefined && value !== null && value !== "") {
326
+ args.push(`--${flag}=${value}`);
327
+ }
328
+ };
329
+ // The seed makes the engine noise canvas readback on its own, so `canvas` cannot be honoured with it:
330
+ // "real" would still be noised, and a noise key is ignored.
331
+ if (o.canvas !== undefined && o.fingerprint !== undefined && o.fingerprint !== null && o.fingerprint !== "") {
332
+ throw new SdkInputError("sdk.canvas_invalid", 'canvas cannot be combined with the fingerprint seed: with a seed the engine noises canvas readback by itself ' +
333
+ '("real" would still be noised and a noise key is ignored). Use an identity, which has no seed.');
334
+ }
335
+ set("fingerprint", o.fingerprint);
336
+ // Default the persona platform to the HOST OS so it's coherent with the binary the SDK ships for
337
+ // this machine (Windows binary -> windows, Linux binary -> linux). Override via
338
+ // platform: "windows" | "linux" | "macos".
339
+ const hostPlatform = { win32: "windows", linux: "linux", darwin: "macos" }[process.platform] ?? "windows";
340
+ set("fingerprint-platform", o.platform ?? (identityApi ? undefined : hostPlatform));
341
+ set("fingerprint-platform-version", o.platformVersion);
342
+ // ant0-browser presents as Google Chrome (its UA says "Chrome/<v>"); default the UA-CH brand to
343
+ // "chrome" so navigator.userAgentData advertises "Google Chrome", not bare "Chromium" (a
344
+ // UA/UA-CH mismatch some bot detectors flag). Override via brand: "Edge" etc.
345
+ set("fingerprint-brand", o.brand ?? (identityApi ? undefined : "chrome"));
346
+ set("fingerprint-brand-version", o.brandVersion);
347
+ set("fingerprint-gpu-vendor", o.gpuVendor);
348
+ set("fingerprint-gpu-renderer", o.gpuRenderer);
349
+ // Keep WebGPU on the override's GPU family (see webgpu-override.ts).
350
+ args.push(...webgpuOverridePlan(o).args);
351
+ set("fingerprint-hardware-concurrency", o.hardwareConcurrency);
352
+ // Native metadata overrides (flag > persona > real). Read directly by the getters — no
353
+ // --fingerprint persona machinery — so they are safe to spoof individually or via lightStealth.
354
+ //
355
+ // Emit each EXACTLY ONCE. These were previously set in two separate blocks, so every override
356
+ // went out twice. Chromium takes the last occurrence and the values were identical, so nothing
357
+ // misbehaved — but a command line carrying `--fingerprint-device-memory` twice is a shape no
358
+ // real browser produces, and the engine exposes the command line over CDP
359
+ // (BrowserHandler::GetBrowserCommandLine), so it was a free tell.
360
+ //
361
+ // `set` compares strictly against undefined, so a numeric 0 is emitted rather than dropped —
362
+ // that matters for maxTouchPoints, where 0 is a real value (a non-touch desktop), not "unset".
363
+ set("fingerprint-device-memory", o.deviceMemory);
364
+ set("fingerprint-screen-width", o.screenWidth);
365
+ set("fingerprint-screen-height", o.screenHeight);
366
+ set("fingerprint-avail-width", o.availWidth);
367
+ set("fingerprint-avail-height", o.availHeight);
368
+ set("fingerprint-color-depth", o.colorDepth);
369
+ set("fingerprint-device-pixel-ratio", o.devicePixelRatio);
370
+ // Persona scale: make the REAL scale the persona's. Without it a host at scale 2 shows through
371
+ // (0.5px borders, 0.5 pointer steps, 2x screenshots) while the persona claims 1. Measured on
372
+ // Linux: the flag closes the gap with no engine patch. A caller's own --force-device-scale-factor
373
+ // in `args` comes later on the command line and wins.
374
+ const scale = personaDpr(o);
375
+ if (scale !== undefined)
376
+ args.push(`--force-device-scale-factor=${scale}`);
377
+ set("fingerprint-max-touch-points", o.maxTouchPoints);
378
+ set("fingerprint-location", o.location);
379
+ set("fingerprint-storage-quota", o.storageQuota);
380
+ set("timezone", o.timezone);
381
+ // Always send a coherent Accept-Language. Without --accept-lang Chromium falls back to the
382
+ // build/OS locale, which can leak a language that mismatches the proxy's country/timezone
383
+ // (e.g. en-GB on a US IP) — a geo-inconsistency tell. Prefer an explicit value, then an imported
384
+ // profile's languages, then en-US,en on the internal legacy path.
385
+ const importedLocale = o.fingerprintProfile ? profileLocale(o.fingerprintProfile) : {};
386
+ const acceptLanguage = o.acceptLanguage || importedLocale.language || (identityApi ? undefined : "en-US,en");
387
+ const cleanLang = acceptLanguage ? cleanAcceptLanguage(String(acceptLanguage)) : "";
388
+ if (cleanLang)
389
+ args.push(`--accept-lang=${cleanLang}`);
390
+ // Also pin the UI/ICU locale to the PRIMARY Accept-Language tag, so Intl.DateTimeFormat /
391
+ // NumberFormat / Collator (main thread AND workers) resolve to the same locale as
392
+ // navigator.language. Without --lang, Chromium falls back to the build/OS locale (e.g. en-GB on an
393
+ // en-US persona) — a locale-incoherence tell auditors flag (navigator.language=en-US but Intl=en-GB).
394
+ const primaryLang = cleanLang.split(",")[0];
395
+ if (primaryLang)
396
+ args.push(`--lang=${primaryLang}`);
397
+ // Default the timezone to one coherent with the persona locale when none is set
398
+ // resolve one), so a server/container run doesn't leak the host's UTC (a datacenter tell) while
399
+ // navigator.language says e.g. en-US. An explicit timezone override takes precedence.
400
+ if (!o.timezone) {
401
+ const tz = importedLocale.timezone || (identityApi ? undefined : defaultTimezone(primaryLang));
402
+ if (tz)
403
+ args.push(`--timezone=${tz}`);
404
+ }
405
+ set("webrtc-ip", o.webrtcIp);
406
+ // Only "off" is meaningful — concealment ON is both the Chromium default and real Chrome's
407
+ // behaviour, so there is nothing to emit for "on".
408
+ //
409
+ // This uses Chromium's OWN feature flag rather than a ant0-browser switch. The mDNS responder is
410
+ // created in PeerConnectionDependencyFactory behind `kWebRtcHideLocalIpsWithMdns`; disabling
411
+ // the feature means no responder is built and host candidates are signalled as raw IPs.
412
+ // Verified end-to-end: with the flag, host candidates come back as 192.168.x.x; without it,
413
+ // as <uuid>.local. mergeFeatureFlags folds this into any other --disable-features value.
414
+ if (o.webrtcMdns === "off")
415
+ args.push("--disable-features=WebRtcHideLocalIpsWithMdns");
416
+ if (o.disableGpuFingerprint)
417
+ args.push("--disable-gpu-fingerprint");
418
+ // fingerprintNoise=false turns OFF the per-eTLD+1 farbling noise (canvas/WebGL/audio/client-rects)
419
+ // so those surfaces return natural values — for sites whose ML flags the noise as "tampered".
420
+ // Identity spoofs (UA/screen/GPU/persona) stay on. Default keeps the noise.
421
+ if (o.fingerprintNoise === false)
422
+ args.push("--disable-fingerprint-noise");
423
+ // The two INDEPENDENT halves of the bundles above (engine ant0.8 or later).
424
+ if (o.gpuStringSpoof === false)
425
+ args.push("--disable-gpu-string-spoof");
426
+ if (o.canvasNoise === false)
427
+ args.push("--disable-canvas-noise");
428
+ // Canvas mode (see ./canvas.ts). Real sends nothing. Noise sends the profile's key, once. An explicit
429
+ // canvas: "noise" without a key is an error; the identity path (prepareIdentityOptions) supplies the key.
430
+ if (canvasMode(o) === "noise") {
431
+ assertCanvasNoiseKey(o.canvasNoiseKey);
432
+ if (o.canvasNoiseKey !== undefined)
433
+ args.push(`${CANVAS_NOISE_KEY_SWITCH}=${o.canvasNoiseKey}`);
434
+ else if (o.canvas === "noise") {
435
+ throw new SdkInputError("sdk.canvas_key_missing", 'canvas: "noise" needs a canvasNoiseKey (16 lowercase hex characters)');
436
+ }
437
+ }
438
+ // fingerprintProfile transports a profile to the native parser. Canonical v2 profiles are
439
+ // complete and activate atomically; only the deprecated unversioned format has partial-field
440
+ // fallback semantics.
441
+ if (o.fingerprintProfile) {
442
+ if (profileSchemaVersion(o.fingerprintProfile) === 4) {
443
+ // Schema 4 never goes inline: the launch code writes it to a private file first.
444
+ if (typeof o.fingerprintProfile === "string") {
445
+ throw new SdkInputError("sdk.persona_profile_invalid", "a schema_version 4 persona cannot be given to fingerprintProfile as a path or JSON text (that supports schema 2 " +
446
+ "only); pass it through identity: { mode: \"captured\", source }, which accepts a path or JSON text and writes the private file");
447
+ }
448
+ if (!o.fingerprintProfileFile) {
449
+ throw new SdkInputError("sdk.persona_file_missing", "a schema_version 4 persona travels in a private file; launch through the SDK launch functions");
450
+ }
451
+ args.push(`${PROFILE_FILE_SWITCH}=${o.fingerprintProfileFile}`);
452
+ }
453
+ else {
454
+ args.push(`--fingerprint-profile=${encodeProfile(o.fingerprintProfile)}`);
455
+ }
456
+ }
457
+ // tlsProfile keeps the TLS ClientHello coherent with the persona's claimed Chrome version (the
458
+ // network layer follows the UA). Default "match-persona" follows brandVersion; "chrome-<major>"
459
+ // pins it; "native"/off/unset leaves native TLS. Only version-variant fields change.
460
+ const tlsSwitch = resolveTlsProfile(o.tlsProfile ?? "match-persona", o);
461
+ if (tlsSwitch)
462
+ args.push(`--fingerprint-tls-profile=${tlsSwitch}`);
463
+ // The Android persona lays the page out as a mobile viewport, which needs a phone-sized window
464
+ // (Chromium's ~500px minimum width floor still applies). Auto-set one; a caller-supplied
465
+ // --window-size in `args` overrides this (Chromium takes the last --window-size).
466
+ // A schema 4 persona names its OS in the profile; no platform switch is derived from it.
467
+ const v4Family = typeof o.fingerprintProfile === "object" && o.fingerprintProfile !== null
468
+ && o.fingerprintProfile.schema_version === 4
469
+ ? o.fingerprintProfile.identity?.os?.family : undefined;
470
+ if ((o.platform ?? v4Family) === "android") {
471
+ args.push("--window-size=412,915");
472
+ }
473
+ return args;
474
+ }
475
+ //# sourceMappingURL=fingerprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fingerprint.js","sourceRoot":"","sources":["../src/fingerprint.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,+GAA+G;AAE/G,O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AAC,CAAC;QAC5E,CAAC;IACH,CAAC;IACD,+FAA+F;IAC/F,gGAAgG;IAChG,qFAAqF;IACrF,MAAM,SAAS,GAAG,iBAAiB,CAAC,CAAC,CAAC,UAAU,IAAI,eAAe,EAAE,CAAC,CAAC,CAAC;IACxE,IAAI,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,6BAA6B,SAAS,EAAE,CAAC,CAAC;IACnE,+FAA+F;IAC/F,yFAAyF;IACzF,kFAAkF;IAClF,yFAAyF;IACzF,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,kBAAkB,KAAK,QAAQ,IAAI,CAAC,CAAC,kBAAkB,KAAK,IAAI;WACrF,CAAC,CAAC,kBAAkB,CAAC,cAAc,KAAK,CAAC;QAC5C,CAAC,CAAE,CAAC,CAAC,kBAAmE,CAAC,QAAQ,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5G,IAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,KAAK,SAAS,EAAE,CAAC;QAC3C,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const PACK_VERSION = "windows-v1";
2
+ export declare const PACK_SHA256 = "c3ec22541252f983e0467317427530695fc1db4fccf109b79f8d4fdec0110511";
3
+ /** The opt-in pack URL (`ANT0_BROWSER_FONT_PACK_URL`), read at call time — not frozen at import —
4
+ * so a host process (e.g. a daemon) can set it after loading the SDK. Empty string when unset. */
5
+ export declare function packUrl(): string;
6
+ /** Return a directory of real Windows font files, or undefined (fall back to bundled clones). */
7
+ export declare function resolveFontPack(opts?: {
8
+ quiet?: boolean;
9
+ download?: boolean;
10
+ }): Promise<string | undefined>;
11
+ /** Lower-cased family names in the pack (cached in families.txt; fc-scan once if missing). */
12
+ export declare function packFamilies(packDir?: string): Set<string>;
13
+ //# sourceMappingURL=fontpack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fontpack.d.ts","sourceRoot":"","sources":["../src/fontpack.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,YAAY,eAAe,CAAC;AAEzC,eAAO,MAAM,WAAW,qEAAqE,CAAC;AAG9F;kGACkG;AAClG,wBAAgB,OAAO,IAAI,MAAM,CAEhC;AA4DD,iGAAiG;AACjG,wBAAsB,eAAe,CAAC,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAarH;AAED,8FAA8F;AAC9F,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAqB1D"}