ant0-browser 0.0.0-stage → 0.1.1

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 (103) hide show
  1. package/LICENSE +35 -0
  2. package/README.md +100 -2
  3. package/dist/chromium-version.d.ts +22 -0
  4. package/dist/chromium-version.d.ts.map +1 -0
  5. package/dist/chromium-version.js +22 -0
  6. package/dist/chromium-version.js.map +1 -0
  7. package/dist/download.d.ts +22 -0
  8. package/dist/download.d.ts.map +1 -0
  9. package/dist/download.js +219 -0
  10. package/dist/download.js.map +1 -0
  11. package/dist/fingerprint.d.ts +213 -0
  12. package/dist/fingerprint.d.ts.map +1 -0
  13. package/dist/fingerprint.js +375 -0
  14. package/dist/fingerprint.js.map +1 -0
  15. package/dist/fontpack.d.ts +13 -0
  16. package/dist/fontpack.d.ts.map +1 -0
  17. package/dist/fontpack.js +149 -0
  18. package/dist/fontpack.js.map +1 -0
  19. package/dist/fonts.d.ts +15 -0
  20. package/dist/fonts.d.ts.map +1 -0
  21. package/dist/fonts.js +86 -0
  22. package/dist/fonts.js.map +1 -0
  23. package/dist/geoip.d.ts +45 -0
  24. package/dist/geoip.d.ts.map +1 -0
  25. package/dist/geoip.js +289 -0
  26. package/dist/geoip.js.map +1 -0
  27. package/dist/geometry.d.ts +28 -0
  28. package/dist/geometry.d.ts.map +1 -0
  29. package/dist/geometry.js +79 -0
  30. package/dist/geometry.js.map +1 -0
  31. package/dist/humanize.d.ts +20 -0
  32. package/dist/humanize.d.ts.map +1 -0
  33. package/dist/humanize.js +921 -0
  34. package/dist/humanize.js.map +1 -0
  35. package/dist/identity-persistence.d.ts +51 -0
  36. package/dist/identity-persistence.d.ts.map +1 -0
  37. package/dist/identity-persistence.js +301 -0
  38. package/dist/identity-persistence.js.map +1 -0
  39. package/dist/identity.d.ts +43 -0
  40. package/dist/identity.d.ts.map +1 -0
  41. package/dist/identity.js +197 -0
  42. package/dist/identity.js.map +1 -0
  43. package/dist/index.d.ts +234 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +593 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/launch-ticket.d.ts +87 -0
  48. package/dist/launch-ticket.d.ts.map +1 -0
  49. package/dist/launch-ticket.js +233 -0
  50. package/dist/launch-ticket.js.map +1 -0
  51. package/dist/launchopts.d.ts +133 -0
  52. package/dist/launchopts.d.ts.map +1 -0
  53. package/dist/launchopts.js +204 -0
  54. package/dist/launchopts.js.map +1 -0
  55. package/dist/motion.d.ts +106 -0
  56. package/dist/motion.d.ts.map +1 -0
  57. package/dist/motion.js +311 -0
  58. package/dist/motion.js.map +1 -0
  59. package/dist/motionscore.d.ts +57 -0
  60. package/dist/motionscore.d.ts.map +1 -0
  61. package/dist/motionscore.js +215 -0
  62. package/dist/motionscore.js.map +1 -0
  63. package/dist/persona-migration.d.ts +51 -0
  64. package/dist/persona-migration.d.ts.map +1 -0
  65. package/dist/persona-migration.js +95 -0
  66. package/dist/persona-migration.js.map +1 -0
  67. package/dist/persona-profile-v2.d.ts +155 -0
  68. package/dist/persona-profile-v2.d.ts.map +1 -0
  69. package/dist/persona-profile-v2.js +421 -0
  70. package/dist/persona-profile-v2.js.map +1 -0
  71. package/dist/population-model.d.ts +42 -0
  72. package/dist/population-model.d.ts.map +1 -0
  73. package/dist/population-model.js +224 -0
  74. package/dist/population-model.js.map +1 -0
  75. package/dist/release-fetch.d.ts +70 -0
  76. package/dist/release-fetch.d.ts.map +1 -0
  77. package/dist/release-fetch.js +392 -0
  78. package/dist/release-fetch.js.map +1 -0
  79. package/dist/release.d.ts +16 -0
  80. package/dist/release.d.ts.map +1 -0
  81. package/dist/release.js +26 -0
  82. package/dist/release.js.map +1 -0
  83. package/dist/render.d.ts +38 -0
  84. package/dist/render.d.ts.map +1 -0
  85. package/dist/render.js +104 -0
  86. package/dist/render.js.map +1 -0
  87. package/dist/shaderdialect.d.ts +33 -0
  88. package/dist/shaderdialect.d.ts.map +1 -0
  89. package/dist/shaderdialect.js +46 -0
  90. package/dist/shaderdialect.js.map +1 -0
  91. package/dist/template-selection.d.ts +14 -0
  92. package/dist/template-selection.d.ts.map +1 -0
  93. package/dist/template-selection.js +65 -0
  94. package/dist/template-selection.js.map +1 -0
  95. package/dist/warnings.d.ts +19 -0
  96. package/dist/warnings.d.ts.map +1 -0
  97. package/dist/warnings.js +159 -0
  98. package/dist/warnings.js.map +1 -0
  99. package/dist/widevine.d.ts +44 -0
  100. package/dist/widevine.d.ts.map +1 -0
  101. package/dist/widevine.js +202 -0
  102. package/dist/widevine.js.map +1 -0
  103. package/package.json +56 -4
@@ -0,0 +1,213 @@
1
+ export interface FingerprintOptions {
2
+ /**
3
+ * Master fingerprint seed (the per-eTLD+1 farbling root). Same seed => the same stable
4
+ * identity across launches; different seeds => unlinkable identities. Any string or number
5
+ * is accepted (non-numeric seeds are hashed engine-side — they will not crash the renderer).
6
+ */
7
+ fingerprint?: string | number;
8
+ /**
9
+ * Spoofed OS family for UA / UA-CH / navigator.platform. `"android"` is a best-effort **mobile**
10
+ * persona (seed-selected from a Pixel/Galaxy device pool): Android UA + `Sec-CH-UA-Mobile: ?1`,
11
+ * touch (`maxTouchPoints`), `pointer:coarse`/`hover:none`, mobile screen/DPR, Mali/Adreno WebGL,
12
+ * `plugins=0`, and a mobile viewport (auto-sets a phone `--window-size`). On a desktop engine the
13
+ * GPU *render* and fine page geometry stay desktop (documented residual tells) — pair with
14
+ * `canvasBridge` for render coherence.
15
+ */
16
+ platform?: "windows" | "linux" | "macos" | "android";
17
+ /** Spoofed platform version (UA-CH high-entropy). */
18
+ platformVersion?: string;
19
+ /** Browser brand for UA / UA-CH. */
20
+ brand?: "Chrome" | "Edge" | "Opera" | "Vivaldi" | (string & {});
21
+ /** Brand version. */
22
+ brandVersion?: string;
23
+ /**
24
+ * TLS network persona — keep the TLS ClientHello coherent with the persona's claimed Chrome
25
+ * version, so the network layer follows the UA instead of always emitting the build's native TLS.
26
+ * Only the version-variant ClientHello fields change (post-quantum key-share group, ALPS
27
+ * codepoint); the cipher list, version bounds, and per-connection extension permutation stay
28
+ * exactly real-Chrome. Chromium-core only (Chrome/Edge/Brave/Opera share the ClientHello; brand
29
+ * differs in headers/UA-CH, not TLS).
30
+ *
31
+ * - `"match-persona"` (default) / `"auto"`: follow `brandVersion`'s major; with no `brandVersion`
32
+ * the persona claims the browser's native version, so this is a no-op (native TLS).
33
+ * - `"native"` / `"off"`: leave the build's native TLS unchanged.
34
+ * - `"chrome-<major>"` or a number (e.g. `120`): pin the TLS shape to that Chromium major.
35
+ */
36
+ tlsProfile?: "match-persona" | "auto" | "native" | "off" | `chrome-${number}` | (string & {}) | number;
37
+ /** WebGL UNMASKED_VENDOR string. */
38
+ gpuVendor?: string;
39
+ /** WebGL UNMASKED_RENDERER string. */
40
+ gpuRenderer?: string;
41
+ /** navigator.hardwareConcurrency. */
42
+ hardwareConcurrency?: number;
43
+ /** navigator.deviceMemory in GB (spec-clamps to 8 — larger values report as 8). */
44
+ deviceMemory?: number;
45
+ /**
46
+ * screen.width in CSS px. NOTE: spoofing screen dimensions is a reliable block trigger on strict
47
+ * anti-bots (a faked screen cannot be reconciled with the real window/render surface), so this is
48
+ * opt-in and is NOT part of the `lightStealth` preset. Best when the host's real display matches.
49
+ */
50
+ screenWidth?: number;
51
+ /** screen.height in CSS px (see the caveat on `screenWidth`). */
52
+ screenHeight?: number;
53
+ /** screen.availWidth in CSS px (see the caveat on `screenWidth`). */
54
+ availWidth?: number;
55
+ /** screen.availHeight in CSS px (see the caveat on `screenWidth`). */
56
+ availHeight?: number;
57
+ /** screen.colorDepth (e.g. 24). */
58
+ colorDepth?: number;
59
+ /** window.devicePixelRatio (e.g. 1, 1.25, 1.5). */
60
+ devicePixelRatio?: number;
61
+ /** navigator.maxTouchPoints (0 on a mouse-only desktop). */
62
+ maxTouchPoints?: number;
63
+ /**
64
+ * Light-stealth preset: spoof a coherent, seed-derived bundle of the metadata axes that SURVIVE
65
+ * strict anti-bot checks — hardwareConcurrency, deviceMemory, colorDepth, devicePixelRatio,
66
+ * maxTouchPoints — applied via the native override switches ONLY (never the `--fingerprint`
67
+ * persona machinery / farbling that strict anti-bots detect). Rendering (canvas/WebGL/audio/fonts),
68
+ * TLS, and the real Chrome version are all left untouched, so the identity stays coherent and
69
+ * passes. Screen dimensions are deliberately NOT spoofed (a faked screen is a reliable block
70
+ * trigger) — pass screenWidth/etc. explicitly to opt in. An explicit field wins over the preset.
71
+ * The lightest identity variation that still passes strict detection.
72
+ */
73
+ lightStealth?: boolean;
74
+ /** Geolocation as "lat,lng" (only returned when the page is granted permission). */
75
+ location?: string;
76
+ /** IANA timezone, e.g. "America/New_York". */
77
+ timezone?: string;
78
+ /**
79
+ * Accept-Language / navigator.languages, e.g. "en-US,en". Sets BOTH the server-side
80
+ * Accept-Language header and navigator.language(s) coherently (Chromium `--accept-lang`).
81
+ * Set this under launch `overrides` to match the timezone/proxy region.
82
+ */
83
+ acceptLanguage?: string;
84
+ /** WebRTC egress IP to report (typically your proxy's public IP). */
85
+ webrtcIp?: string;
86
+ /**
87
+ * WebRTC host-candidate mDNS concealment. Real Chrome hides local host candidates behind an
88
+ * `<uuid>.local` mDNS name so a page opening an RTCPeerConnection cannot read the LAN address;
89
+ * that is the default here too. Set `"off"` only if you need routable raw host candidates
90
+ * (LAN/P2P) — it re-exposes the private IP to every page.
91
+ *
92
+ * Requires an engine built with `enable_mdns=true`; with it off the responder is never compiled,
93
+ * concealment cannot happen, and the LAN IP leaks regardless of this option. (Builds before
94
+ * 150.0.7871.114-r4 were in exactly that state.)
95
+ */
96
+ webrtcMdns?: "on" | "off";
97
+ /**
98
+ * Present the machine's **real GPU** instead of a spoofed one. WebGL `UNMASKED_VENDOR`/`RENDERER`,
99
+ * the `getParameter` table, and the canvas/WebGL render all report the genuine host backend. This
100
+ * is the most coherent setting against strict browser-tampering classifiers: the GPU string and
101
+ * the actually-rendered pixels match, so there is no GPU spoof to catch (the same reason a stock
102
+ * browser passes). Composes with `fingerprintProfile` — the profile still supplies
103
+ * screen/fonts/audio/hardware, but the **real host GPU is kept** instead of the profile's GPU
104
+ * (which the host cannot actually render, and would otherwise be a string-vs-render mismatch).
105
+ * Pair with `fingerprintNoise: false` so the canvas/WebGL readback isn't perturbed either.
106
+ *
107
+ * Trade-off: every persona on one physical machine then shares the same canvas/WebGL identity, so
108
+ * a tracker can link them by GPU hash. Best for single-identity / one-persona-per-host use; for
109
+ * multi-account-on-one-machine, keep this off and instead match the profile's GPU to the host.
110
+ */
111
+ disableGpuFingerprint?: boolean;
112
+ /**
113
+ * Set `false` to turn OFF the per-eTLD+1 farbling NOISE (canvas/WebGL/audio/client-rects), so
114
+ * those surfaces return their natural, unperturbed values. Use when a site's anti-bot ML scores
115
+ * the noise pattern as "tampered". Identity spoofs (UA/screen/GPU/persona)
116
+ * stay on. Default (unset/`true`) keeps the noise.
117
+ */
118
+ fingerprintNoise?: boolean;
119
+ /**
120
+ * `false` reports the machine's REAL WebGL UNMASKED_VENDOR/RENDERER and changes nothing else --
121
+ * the getParameter limit table, the extension list, getShaderPrecisionFormat and the readPixels
122
+ * farble all stay on the persona. The GPU-STRING half of `disableGpuFingerprint` on its own, for
123
+ * hosts that rasterise in software. Note `navigator.gpu` still follows the wide flag, so with
124
+ * this alone WebGPU describes the persona while WebGL reports the real device.
125
+ * Requires engine >= Chromium 150 r12; inert on older builds.
126
+ */
127
+ gpuStringSpoof?: boolean;
128
+ /**
129
+ * `false` turns off the per-eTLD+1 farble on CANVAS 2D readback only (`getImageData`, and
130
+ * `toDataURL` of a 2D canvas). WebGL readPixels and every other farbled surface are unchanged --
131
+ * unlike `fingerprintNoise: false`, which is the process-wide off switch. `toBlob()` is gated by
132
+ * neither. Requires engine >= Chromium 150 r12; inert on older builds.
133
+ */
134
+ canvasNoise?: boolean;
135
+ /**
136
+ * Import a real captured fingerprint so the browser presents *that machine's* identity instead
137
+ * of the synthetic seed-derived one. Accepts a path to a `.json` profile, a profile object, or a
138
+ * JSON string (capture one with `tools/fingerprint-collect`). Fields present in the profile
139
+ * override the seed-derived persona; absent fields fall back to the seed, so partial profiles
140
+ * stay coherent.
141
+ */
142
+ fingerprintProfile?: string | Record<string, unknown>;
143
+ /**
144
+ * `navigator.storage.estimate().quota` in **megabytes**. A tiny/ephemeral quota reads as a test
145
+ * machine or incognito; set a realistic on-disk value (e.g. `250000` for ~244 GB).
146
+ */
147
+ storageQuota?: number;
148
+ /**
149
+ * Canvas bridge — forward canvas/WebGL readbacks to a remote real-GPU host so the pixels a page
150
+ * hashes are coherent with the GPU your persona claims. Setting `url` enables it and auto-adds
151
+ * `--no-sandbox` (the bridge opens its socket from the renderer process).
152
+ *
153
+ * Latency note: a synchronous readback over the bridge is a network round-trip on the renderer
154
+ * thread (a timing signal vs latency-aware detectors). Mitigations are built in — the engine
155
+ * prefetches+caches so deferred/animated/repeated reads don't block — and you can tune behavior
156
+ * here: `mode` restricts bridging to the origins where canvas coherence is actually scored, and
157
+ * `fallback: "local"` makes a cold cache miss serve the fast local render instead of stalling.
158
+ */
159
+ canvasBridge?: {
160
+ /** Bridge endpoint, "ws://host:port[/path]". Required to enable the bridge. */
161
+ url: string;
162
+ /** HTTP Basic credentials "user:secret"; must match the server. */
163
+ auth?: string;
164
+ /** Per-origin policy: "off" | "all" (default) | "allow" | "deny". */
165
+ mode?: "off" | "all" | "allow" | "deny";
166
+ /** eTLD+1 list bridged when mode="allow". */
167
+ allow?: string[];
168
+ /** eTLD+1 list NOT bridged when mode="deny". */
169
+ deny?: string[];
170
+ /** Cold cache-miss behavior: "block" (default) | "local" (never stall; render locally). */
171
+ fallback?: "block" | "local";
172
+ };
173
+ }
174
+ export declare const FINGERPRINT_KEYS: (keyof FingerprintOptions)[];
175
+ /** Split an options object into its fingerprint half and the remaining (Playwright) half. */
176
+ export declare function splitFingerprintOptions<T extends object>(options: T): {
177
+ fingerprint: FingerprintOptions;
178
+ rest: Omit<T, keyof FingerprintOptions>;
179
+ };
180
+ /** Normalize an Accept-Language value for Chromium's `--accept-lang`: a plain comma-separated
181
+ * tag list with NO `;q=` weights or spaces (Chromium adds the q-weights to the header itself; a
182
+ * `;` in the switch value trips a DCHECK and crashes the renderer). */
183
+ export declare function cleanAcceptLanguage(v: string): string;
184
+ /** Encode a captured ant0-browser-profile for the `--fingerprint-profile` switch. `value` may be a
185
+ * path to a `.json` file, a profile object, or a JSON string. gzip+base64 keeps the full capture
186
+ * (~40 KB) within Chromium's command-line length limit (gzip ~6x); the engine gunzips + parses it. */
187
+ export declare function encodeProfile(value: string | Record<string, unknown>): string;
188
+ /** Best-effort imported profile language list for Chromium's locale switches. */
189
+ export declare function profileAcceptLanguage(value: string | Record<string, unknown>): string | undefined;
190
+ /**
191
+ * Deterministic, coherent metadata bundle for `lightStealth`, applied via the NATIVE override
192
+ * switches only (never `--fingerprint`). Spoofs ONLY the axes that survive strict anti-bot checks:
193
+ * hardwareConcurrency, deviceMemory, colorDepth, devicePixelRatio, maxTouchPoints. It deliberately
194
+ * does NOT spoof screen/avail dimensions (a faked screen is a reliable block trigger). Presents the
195
+ * browser's REAL version (no brandVersion spoof — a version lie desyncs UA-CH + TLS from the real
196
+ * binary). The seed->row mapping matches the Python SDK (full sha256 digest as a big integer mod N).
197
+ */
198
+ export declare function lightStealthValues(seed?: string | number): Partial<FingerprintOptions>;
199
+ /**
200
+ * Resolve `tlsProfile` to a concrete `--fingerprint-tls-profile` value, or undefined (native TLS).
201
+ * "match-persona"/"auto" (default) follows `brandVersion`; "native"/"off"/undefined -> native;
202
+ * "chrome-<major>" or a number -> pinned. Unrecognized values -> native (never break the handshake).
203
+ * Always resolves to `chrome-<major>` (Chromium-core; the brand lives in headers, not the ClientHello).
204
+ */
205
+ export declare function resolveTlsProfile(value: FingerprintOptions["tlsProfile"], o: FingerprintOptions): string | undefined;
206
+ /**
207
+ * A plausible IANA timezone for a primary Accept-Language tag (`en-US` -> `America/New_York`), so the
208
+ * default persona's timezone is coherent with its locale rather than leaking the host's UTC. Falls
209
+ * back by language subtag, then to America/New_York (matching the en-US Accept-Language default).
210
+ */
211
+ export declare function defaultTimezone(primaryLang: string): string | undefined;
212
+ export declare function fingerprintArgs(o: FingerprintOptions, identityApi?: boolean): string[];
213
+ //# sourceMappingURL=fingerprint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../src/fingerprint.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IACrD,qDAAqD;IACrD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oCAAoC;IACpC,KAAK,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAChE,qBAAqB;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,UAAU,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC;IACvG,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mFAAmF;IACnF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACr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AAE,OAAO,GAAG,OAAO,CAAC;KAC9B,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,EAAE,CAAC,MAAM,kBAAkB,CAAC,EA+BxD,CAAC;AAEF,6FAA6F;AAC7F,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,MAAM,EACtD,OAAO,EAAE,CAAC,GACT;IAAE,WAAW,EAAE,kBAAkB,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,kBAAkB,CAAC,CAAA;CAAE,CAW9E;AAED;;uEAEuE;AACvE,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED;;sGAEsG;AACtG,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CA0B7E;AAwBD,iFAAiF;AACjF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAEjG;AAwBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CActF;AAUD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,kBAAkB,CAAC,YAAY,CAAC,EACvC,CAAC,EAAE,kBAAkB,GACpB,MAAM,GAAG,SAAS,CAapB;AAiBD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASvE;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,kBAAkB,EAAE,WAAW,UAAQ,GAAG,MAAM,EAAE,CA4HpF"}
@@ -0,0 +1,375 @@
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 { assertPersonaProfileV2 } from "./persona-profile-v2.js";
5
+ import { existsSync, readFileSync } from "node:fs";
6
+ import { createHash } from "node:crypto";
7
+ export const FINGERPRINT_KEYS = [
8
+ "fingerprint",
9
+ "platform",
10
+ "platformVersion",
11
+ "brand",
12
+ "brandVersion",
13
+ "gpuVendor",
14
+ "gpuRenderer",
15
+ "hardwareConcurrency",
16
+ "deviceMemory",
17
+ "screenWidth",
18
+ "screenHeight",
19
+ "availWidth",
20
+ "availHeight",
21
+ "colorDepth",
22
+ "devicePixelRatio",
23
+ "maxTouchPoints",
24
+ "lightStealth",
25
+ "location",
26
+ "timezone",
27
+ "acceptLanguage",
28
+ "webrtcIp",
29
+ "webrtcMdns",
30
+ "disableGpuFingerprint",
31
+ "fingerprintNoise",
32
+ "gpuStringSpoof",
33
+ "canvasNoise",
34
+ "fingerprintProfile",
35
+ "storageQuota",
36
+ "canvasBridge",
37
+ "tlsProfile",
38
+ ];
39
+ /** Split an options object into its fingerprint half and the remaining (Playwright) half. */
40
+ export function splitFingerprintOptions(options) {
41
+ const fingerprint = {};
42
+ const rest = {};
43
+ for (const [k, v] of Object.entries(options)) {
44
+ if (FINGERPRINT_KEYS.includes(k)) {
45
+ fingerprint[k] = v;
46
+ }
47
+ else {
48
+ rest[k] = v;
49
+ }
50
+ }
51
+ return { fingerprint, rest: rest };
52
+ }
53
+ /** Normalize an Accept-Language value for Chromium's `--accept-lang`: a plain comma-separated
54
+ * tag list with NO `;q=` weights or spaces (Chromium adds the q-weights to the header itself; a
55
+ * `;` in the switch value trips a DCHECK and crashes the renderer). */
56
+ export function cleanAcceptLanguage(v) {
57
+ return String(v)
58
+ .split(",")
59
+ .map((t) => t.split(";")[0].trim())
60
+ .filter(Boolean)
61
+ .join(",");
62
+ }
63
+ /** Encode a captured ant0-browser-profile for the `--fingerprint-profile` switch. `value` may be a
64
+ * path to a `.json` file, a profile object, or a JSON string. gzip+base64 keeps the full capture
65
+ * (~40 KB) within Chromium's command-line length limit (gzip ~6x); the engine gunzips + parses it. */
66
+ export function encodeProfile(value) {
67
+ let raw;
68
+ if (typeof value === "object") {
69
+ if (value.schema_version === 2)
70
+ assertPersonaProfileV2(value);
71
+ raw = Buffer.from(JSON.stringify(value));
72
+ }
73
+ else if (existsSync(value)) {
74
+ raw = readFileSync(value);
75
+ }
76
+ else {
77
+ raw = Buffer.from(value); // assume a JSON string
78
+ }
79
+ if (typeof value !== "object") {
80
+ try {
81
+ const parsed = JSON.parse(raw.toString("utf8"));
82
+ if (typeof parsed === "object" && parsed !== null
83
+ && parsed.schema_version === 2) {
84
+ assertPersonaProfileV2(parsed);
85
+ }
86
+ }
87
+ catch (error) {
88
+ if (error instanceof SyntaxError) {
89
+ // Preserve legacy behavior: Chromium reports malformed legacy JSON.
90
+ }
91
+ else {
92
+ throw error;
93
+ }
94
+ }
95
+ }
96
+ return gzipSync(raw, { level: 9 }).toString("base64");
97
+ }
98
+ /** Read imported language and canonical-v2 timezone values without changing legacy profiles. */
99
+ function profileLocale(value) {
100
+ let obj;
101
+ try {
102
+ if (typeof value === "object")
103
+ obj = value;
104
+ else if (existsSync(value))
105
+ obj = JSON.parse(readFileSync(value, "utf8"));
106
+ else
107
+ obj = JSON.parse(value);
108
+ }
109
+ catch {
110
+ return {};
111
+ }
112
+ const nav = obj?.navigator;
113
+ const locale = obj?.locale;
114
+ const langs = obj?.schema_version === 2 ? locale?.languages : nav?.languages;
115
+ const timezone = obj?.schema_version === 2 && typeof locale?.timezone === "string" && locale.timezone
116
+ ? locale.timezone
117
+ : undefined;
118
+ return {
119
+ language: Array.isArray(langs) && langs.length ? langs.map(String).join(",") : undefined,
120
+ timezone,
121
+ };
122
+ }
123
+ /** Best-effort imported profile language list for Chromium's locale switches. */
124
+ export function profileAcceptLanguage(value) {
125
+ return profileLocale(value).language;
126
+ }
127
+ // Coherent Windows-plausible desktop/laptop metadata bundles, indexed by a hash of the seed:
128
+ // [screen_w, screen_h, avail_w, avail_h, dpr, color_depth, device_memory_gb, hw_concurrency].
129
+ // lightStealth uses ONLY dpr/color_depth/device_memory/hw_concurrency from each row (screen stays
130
+ // real — see the note on `lightStealth`). The screen columns are retained so an explicit opt-in
131
+ // screen spoof can reuse a coherent row.
132
+ const LIGHT_STEALTH_PROFILES = [
133
+ [1920, 1080, 1920, 1040, 1.0, 24, 8, 8],
134
+ [1920, 1080, 1920, 1040, 1.0, 24, 16, 12],
135
+ [1920, 1080, 1920, 1040, 1.0, 24, 16, 16],
136
+ [2560, 1440, 2560, 1400, 1.0, 24, 16, 16],
137
+ [2560, 1440, 2560, 1400, 1.5, 24, 16, 12],
138
+ [1536, 864, 1536, 824, 1.25, 24, 8, 8],
139
+ [1536, 864, 1536, 824, 1.25, 24, 16, 12],
140
+ [1366, 768, 1366, 728, 1.0, 24, 8, 4],
141
+ [1366, 768, 1366, 728, 1.0, 24, 4, 4],
142
+ [1440, 900, 1440, 860, 1.0, 24, 8, 8],
143
+ [1600, 900, 1600, 860, 1.0, 24, 8, 8],
144
+ [1680, 1050, 1680, 1010, 1.0, 24, 8, 8],
145
+ [1920, 1200, 1920, 1160, 1.0, 24, 16, 12],
146
+ [3840, 2160, 3840, 2120, 1.0, 24, 32, 16],
147
+ ];
148
+ /**
149
+ * Deterministic, coherent metadata bundle for `lightStealth`, applied via the NATIVE override
150
+ * switches only (never `--fingerprint`). Spoofs ONLY the axes that survive strict anti-bot checks:
151
+ * hardwareConcurrency, deviceMemory, colorDepth, devicePixelRatio, maxTouchPoints. It deliberately
152
+ * does NOT spoof screen/avail dimensions (a faked screen is a reliable block trigger). Presents the
153
+ * browser's REAL version (no brandVersion spoof — a version lie desyncs UA-CH + TLS from the real
154
+ * binary). The seed->row mapping matches the Python SDK (full sha256 digest as a big integer mod N).
155
+ */
156
+ export function lightStealthValues(seed) {
157
+ // Preserve the historical upstream deterministic salt so existing seedless profiles do not change.
158
+ const key = seed === undefined || seed === null || String(seed) === "" ? "clearcote-light-stealth" : String(seed);
159
+ const hex = createHash("sha256").update(key, "utf8").digest("hex");
160
+ const idx = Number(BigInt("0x" + hex) % BigInt(LIGHT_STEALTH_PROFILES.length));
161
+ const row = LIGHT_STEALTH_PROFILES[idx];
162
+ return {
163
+ devicePixelRatio: row[4],
164
+ colorDepth: row[5],
165
+ deviceMemory: row[6],
166
+ hardwareConcurrency: row[7],
167
+ maxTouchPoints: 0,
168
+ brand: "chrome",
169
+ };
170
+ }
171
+ /** Build the Chromium switches for a set of fingerprint options. */
172
+ /** Parse the leading integer (the major) out of a version string like "120.0.6099.109" -> 120. */
173
+ function majorFromVersion(value) {
174
+ if (value === undefined || value === null)
175
+ return undefined;
176
+ const head = String(value).trim().split(".")[0];
177
+ return /^\d+$/.test(head) ? Number(head) : undefined;
178
+ }
179
+ /**
180
+ * Resolve `tlsProfile` to a concrete `--fingerprint-tls-profile` value, or undefined (native TLS).
181
+ * "match-persona"/"auto" (default) follows `brandVersion`; "native"/"off"/undefined -> native;
182
+ * "chrome-<major>" or a number -> pinned. Unrecognized values -> native (never break the handshake).
183
+ * Always resolves to `chrome-<major>` (Chromium-core; the brand lives in headers, not the ClientHello).
184
+ */
185
+ export function resolveTlsProfile(value, o) {
186
+ if (value === undefined || value === null || value === "" || value === "native" || value === "off") {
187
+ return undefined;
188
+ }
189
+ if (value === "match-persona" || value === "auto") {
190
+ const major = majorFromVersion(o.brandVersion);
191
+ return major ? `chrome-${major}` : undefined;
192
+ }
193
+ if (typeof value === "number")
194
+ return `chrome-${value}`;
195
+ const text = String(value).trim().toLowerCase();
196
+ if (/^chrome-\d+$/.test(text))
197
+ return text;
198
+ if (/^\d+$/.test(text))
199
+ return `chrome-${text}`;
200
+ return undefined;
201
+ }
202
+ // Primary Accept-Language tag -> a plausible IANA timezone, so the default persona's timezone is
203
+ // coherent with its locale instead of leaking the host's (often UTC on servers/containers). Not
204
+ // geo-truth — resolve the proxy exit-IP and pass an explicit timezone override for accuracy.
205
+ const LOCALE_TZ = {
206
+ "en-US": "America/New_York", "en-CA": "America/Toronto", "en-GB": "Europe/London",
207
+ "en-AU": "Australia/Sydney", "en-NZ": "Pacific/Auckland", "en-IE": "Europe/Dublin",
208
+ "de-DE": "Europe/Berlin", "de-AT": "Europe/Vienna", "fr-FR": "Europe/Paris",
209
+ "es-ES": "Europe/Madrid", "es-MX": "America/Mexico_City", "it-IT": "Europe/Rome",
210
+ "nl-NL": "Europe/Amsterdam", "pt-BR": "America/Sao_Paulo", "pt-PT": "Europe/Lisbon",
211
+ "pl-PL": "Europe/Warsaw", "sv-SE": "Europe/Stockholm", "ja-JP": "Asia/Tokyo",
212
+ "ko-KR": "Asia/Seoul", "zh-CN": "Asia/Shanghai", "zh-TW": "Asia/Taipei",
213
+ "ru-RU": "Europe/Moscow", "tr-TR": "Europe/Istanbul", "ar-SA": "Asia/Riyadh",
214
+ "hi-IN": "Asia/Kolkata", "id-ID": "Asia/Jakarta",
215
+ };
216
+ /**
217
+ * A plausible IANA timezone for a primary Accept-Language tag (`en-US` -> `America/New_York`), so the
218
+ * default persona's timezone is coherent with its locale rather than leaking the host's UTC. Falls
219
+ * back by language subtag, then to America/New_York (matching the en-US Accept-Language default).
220
+ */
221
+ export function defaultTimezone(primaryLang) {
222
+ if (!primaryLang)
223
+ return undefined;
224
+ const tag = primaryLang.trim();
225
+ if (LOCALE_TZ[tag])
226
+ return LOCALE_TZ[tag];
227
+ const lang = tag.split("-")[0].toLowerCase();
228
+ for (const [key, tz] of Object.entries(LOCALE_TZ)) {
229
+ if (key.toLowerCase().startsWith(lang + "-"))
230
+ return tz;
231
+ }
232
+ return "America/New_York";
233
+ }
234
+ export function fingerprintArgs(o, identityApi = false) {
235
+ const args = [];
236
+ o = { ...o }; // never mutate the caller's options
237
+ if (o.lightStealth) {
238
+ // Fill in the coherent metadata bundle via native override switches. An explicit caller field
239
+ // (e.g. deviceMemory: 16) wins over the preset. CRITICAL: never emit --fingerprint, so the
240
+ // persona machinery / farbling never engages; each value then takes the C++ flag > real path.
241
+ const preset = lightStealthValues(o.fingerprint);
242
+ for (const [k, v] of Object.entries(preset)) {
243
+ const cur = o[k];
244
+ if (cur === undefined || cur === null || cur === "")
245
+ o[k] = v;
246
+ }
247
+ delete o.fingerprint;
248
+ }
249
+ const set = (flag, value) => {
250
+ if (value !== undefined && value !== null && value !== "") {
251
+ args.push(`--${flag}=${value}`);
252
+ }
253
+ };
254
+ set("fingerprint", o.fingerprint);
255
+ // Default the persona platform to the HOST OS so it's coherent with the binary the SDK ships for
256
+ // this machine (Windows binary -> windows, Linux binary -> linux). Override via
257
+ // platform: "windows" | "linux" | "macos".
258
+ const hostPlatform = { win32: "windows", linux: "linux", darwin: "macos" }[process.platform] ?? "windows";
259
+ set("fingerprint-platform", o.platform ?? (identityApi ? undefined : hostPlatform));
260
+ set("fingerprint-platform-version", o.platformVersion);
261
+ // ant0-browser presents as Google Chrome (its UA says "Chrome/<v>"); default the UA-CH brand to
262
+ // "chrome" so navigator.userAgentData advertises "Google Chrome", not bare "Chromium" (a
263
+ // UA/UA-CH mismatch some bot detectors flag). Override via brand: "Edge" etc.
264
+ set("fingerprint-brand", o.brand ?? (identityApi ? undefined : "chrome"));
265
+ set("fingerprint-brand-version", o.brandVersion);
266
+ set("fingerprint-gpu-vendor", o.gpuVendor);
267
+ set("fingerprint-gpu-renderer", o.gpuRenderer);
268
+ set("fingerprint-hardware-concurrency", o.hardwareConcurrency);
269
+ // Native metadata overrides (flag > persona > real). Read directly by the getters — no
270
+ // --fingerprint persona machinery — so they are safe to spoof individually or via lightStealth.
271
+ //
272
+ // Emit each EXACTLY ONCE. These were previously set in two separate blocks, so every override
273
+ // went out twice. Chromium takes the last occurrence and the values were identical, so nothing
274
+ // misbehaved — but a command line carrying `--fingerprint-device-memory` twice is a shape no
275
+ // real browser produces, and the engine exposes the command line over CDP
276
+ // (BrowserHandler::GetBrowserCommandLine), so it was a free tell.
277
+ //
278
+ // `set` compares strictly against undefined, so a numeric 0 is emitted rather than dropped —
279
+ // that matters for maxTouchPoints, where 0 is a real value (a non-touch desktop), not "unset".
280
+ set("fingerprint-device-memory", o.deviceMemory);
281
+ set("fingerprint-screen-width", o.screenWidth);
282
+ set("fingerprint-screen-height", o.screenHeight);
283
+ set("fingerprint-avail-width", o.availWidth);
284
+ set("fingerprint-avail-height", o.availHeight);
285
+ set("fingerprint-color-depth", o.colorDepth);
286
+ set("fingerprint-device-pixel-ratio", o.devicePixelRatio);
287
+ set("fingerprint-max-touch-points", o.maxTouchPoints);
288
+ set("fingerprint-location", o.location);
289
+ set("fingerprint-storage-quota", o.storageQuota);
290
+ set("timezone", o.timezone);
291
+ // Always send a coherent Accept-Language. Without --accept-lang Chromium falls back to the
292
+ // build/OS locale, which can leak a language that mismatches the proxy's country/timezone
293
+ // (e.g. en-GB on a US IP) — a geo-inconsistency tell. Prefer an explicit value, then an imported
294
+ // profile's languages, then en-US,en on the internal legacy path.
295
+ const importedLocale = o.fingerprintProfile ? profileLocale(o.fingerprintProfile) : {};
296
+ const acceptLanguage = o.acceptLanguage || importedLocale.language || (identityApi ? undefined : "en-US,en");
297
+ const cleanLang = acceptLanguage ? cleanAcceptLanguage(String(acceptLanguage)) : "";
298
+ if (cleanLang)
299
+ args.push(`--accept-lang=${cleanLang}`);
300
+ // Also pin the UI/ICU locale to the PRIMARY Accept-Language tag, so Intl.DateTimeFormat /
301
+ // NumberFormat / Collator (main thread AND workers) resolve to the same locale as
302
+ // navigator.language. Without --lang, Chromium falls back to the build/OS locale (e.g. en-GB on an
303
+ // en-US persona) — a locale-incoherence tell auditors flag (navigator.language=en-US but Intl=en-GB).
304
+ const primaryLang = cleanLang.split(",")[0];
305
+ if (primaryLang)
306
+ args.push(`--lang=${primaryLang}`);
307
+ // Default the timezone to one coherent with the persona locale when none is set
308
+ // resolve one), so a server/container run doesn't leak the host's UTC (a datacenter tell) while
309
+ // navigator.language says e.g. en-US. An explicit timezone override takes precedence.
310
+ if (!o.timezone) {
311
+ const tz = importedLocale.timezone || (identityApi ? undefined : defaultTimezone(primaryLang));
312
+ if (tz)
313
+ args.push(`--timezone=${tz}`);
314
+ }
315
+ set("webrtc-ip", o.webrtcIp);
316
+ // Only "off" is meaningful — concealment ON is both the Chromium default and real Chrome's
317
+ // behaviour, so there is nothing to emit for "on".
318
+ //
319
+ // This uses Chromium's OWN feature flag rather than a ant0-browser switch. The mDNS responder is
320
+ // created in PeerConnectionDependencyFactory behind `kWebRtcHideLocalIpsWithMdns`; disabling
321
+ // the feature means no responder is built and host candidates are signalled as raw IPs.
322
+ // Verified end-to-end: with the flag, host candidates come back as 192.168.x.x; without it,
323
+ // as <uuid>.local. mergeFeatureFlags folds this into any other --disable-features value.
324
+ if (o.webrtcMdns === "off")
325
+ args.push("--disable-features=WebRtcHideLocalIpsWithMdns");
326
+ if (o.disableGpuFingerprint)
327
+ args.push("--disable-gpu-fingerprint");
328
+ // fingerprintNoise=false turns OFF the per-eTLD+1 farbling noise (canvas/WebGL/audio/client-rects)
329
+ // so those surfaces return natural values — for sites whose ML flags the noise as "tampered".
330
+ // Identity spoofs (UA/screen/GPU/persona) stay on. Default keeps the noise.
331
+ if (o.fingerprintNoise === false)
332
+ args.push("--disable-fingerprint-noise");
333
+ // The two INDEPENDENT halves of the bundles above (engine >= Chromium 150 r12).
334
+ if (o.gpuStringSpoof === false)
335
+ args.push("--disable-gpu-string-spoof");
336
+ if (o.canvasNoise === false)
337
+ args.push("--disable-canvas-noise");
338
+ // fingerprintProfile transports a profile to the native parser. Canonical v2 profiles are
339
+ // complete and activate atomically; only the deprecated unversioned format has partial-field
340
+ // fallback semantics.
341
+ if (o.fingerprintProfile)
342
+ args.push(`--fingerprint-profile=${encodeProfile(o.fingerprintProfile)}`);
343
+ // Canvas bridge: forward canvas/WebGL readbacks to a remote real-GPU host. Enabling it
344
+ // (url set) requires --no-sandbox (the bridge opens its socket from the renderer process).
345
+ if (o.canvasBridge?.url) {
346
+ const cb = o.canvasBridge;
347
+ args.push(`--canvas-bridge-url=${cb.url}`);
348
+ if (cb.auth)
349
+ args.push(`--canvas-bridge-auth=${cb.auth}`);
350
+ if (cb.mode)
351
+ args.push(`--canvas-bridge-mode=${cb.mode}`);
352
+ if (cb.allow?.length)
353
+ args.push(`--canvas-bridge-allow=${cb.allow.join(",")}`);
354
+ if (cb.deny?.length)
355
+ args.push(`--canvas-bridge-deny=${cb.deny.join(",")}`);
356
+ if (cb.fallback)
357
+ args.push(`--canvas-bridge-fallback=${cb.fallback}`);
358
+ if (!args.includes("--no-sandbox"))
359
+ args.push("--no-sandbox");
360
+ }
361
+ // tlsProfile keeps the TLS ClientHello coherent with the persona's claimed Chrome version (the
362
+ // network layer follows the UA). Default "match-persona" follows brandVersion; "chrome-<major>"
363
+ // pins it; "native"/off/unset leaves native TLS. Only version-variant fields change.
364
+ const tlsSwitch = resolveTlsProfile(o.tlsProfile ?? "match-persona", o);
365
+ if (tlsSwitch)
366
+ args.push(`--fingerprint-tls-profile=${tlsSwitch}`);
367
+ // The Android persona lays the page out as a mobile viewport, which needs a phone-sized window
368
+ // (Chromium's ~500px minimum width floor still applies). Auto-set one; a caller-supplied
369
+ // --window-size in `args` overrides this (Chromium takes the last --window-size).
370
+ if (o.platform === "android") {
371
+ args.push("--window-size=412,915");
372
+ }
373
+ return args;
374
+ }
375
+ //# 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,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAgLzC,MAAM,CAAC,MAAM,gBAAgB,GAAiC;IAC5D,aAAa;IACb,UAAU;IACV,iBAAiB;IACjB,OAAO;IACP,cAA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AI,EAAE,CAAC,KAAK,EAAE,MAAM;YAAE,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC/E,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM;YAAE,IAAI,CAAC,IAAI,CAAC,wBAAwB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5E,IAAI,EAAE,CAAC,QAAQ;YAAE,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAChE,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,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC7B,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":"AAkBA,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"}