jumpy-lion 0.1.6-beta.0 → 0.1.6-beta.3
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.
- package/README.md +13 -0
- package/dist/browser-controller.d.ts.map +1 -1
- package/dist/browser-controller.js +57 -2
- package/dist/browser-controller.js.map +1 -1
- package/dist/browser-plugin.d.ts +49 -0
- package/dist/browser-plugin.d.ts.map +1 -1
- package/dist/browser-plugin.js +103 -1
- package/dist/browser-plugin.js.map +1 -1
- package/dist/browser-process/anti-detect-browser.d.ts +56 -0
- package/dist/browser-process/anti-detect-browser.d.ts.map +1 -0
- package/dist/browser-process/anti-detect-browser.js +142 -0
- package/dist/browser-process/anti-detect-browser.js.map +1 -0
- package/dist/browser-process/anti-detect-config.d.ts +102 -0
- package/dist/browser-process/anti-detect-config.d.ts.map +1 -0
- package/dist/browser-process/anti-detect-config.js +328 -0
- package/dist/browser-process/anti-detect-config.js.map +1 -0
- package/dist/browser-process/browser.d.ts +26 -0
- package/dist/browser-process/browser.d.ts.map +1 -1
- package/dist/browser-process/browser.js +115 -6
- package/dist/browser-process/browser.js.map +1 -1
- package/dist/browser-process/get-chrome-executable.d.ts +7 -0
- package/dist/browser-process/get-chrome-executable.d.ts.map +1 -1
- package/dist/browser-process/get-chrome-executable.js +42 -0
- package/dist/browser-process/get-chrome-executable.js.map +1 -1
- package/dist/browser-process/index.d.ts +4 -1
- package/dist/browser-process/index.d.ts.map +1 -1
- package/dist/browser-process/index.js +3 -1
- package/dist/browser-process/index.js.map +1 -1
- package/dist/crawler.d.ts +17 -0
- package/dist/crawler.d.ts.map +1 -1
- package/dist/crawler.js +5 -2
- package/dist/crawler.js.map +1 -1
- package/dist/fingerprinting/fingerprint-injector.d.ts +54 -0
- package/dist/fingerprinting/fingerprint-injector.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-injector.js +207 -58
- package/dist/fingerprinting/fingerprint-injector.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.js +16 -0
- package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.js +3 -2
- package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js +18 -10
- package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/index.d.ts +1 -2
- package/dist/fingerprinting/fingerprint-overrides/index.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/index.js +1 -2
- package/dist/fingerprinting/fingerprint-overrides/index.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.d.ts +10 -2
- package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.js +11 -2
- package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.d.ts +20 -2
- package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.js +47 -250
- package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.d.ts +12 -1
- package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.js +27 -22
- package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js +86 -28
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.d.ts +9 -2
- package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.js +10 -2
- package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.js +165 -33
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/storage-consistency.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/storage-consistency.js +10 -8
- package/dist/fingerprinting/fingerprint-overrides/storage-consistency.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/timing-consistency.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/timing-consistency.js +9 -7
- package/dist/fingerprinting/fingerprint-overrides/timing-consistency.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/ua-ch.js +6 -6
- package/dist/fingerprinting/fingerprint-overrides/utils.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/utils.js +44 -1
- package/dist/fingerprinting/fingerprint-overrides/utils.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js +43 -1
- package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.js +9 -1
- package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.js +14 -3
- package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.js.map +1 -1
- package/dist/fingerprinting/locale-resolver.d.ts +41 -0
- package/dist/fingerprinting/locale-resolver.d.ts.map +1 -0
- package/dist/fingerprinting/locale-resolver.js +155 -0
- package/dist/fingerprinting/locale-resolver.js.map +1 -0
- package/dist/fingerprinting/non-apify-fingerprint-generator.d.ts +32 -0
- package/dist/fingerprinting/non-apify-fingerprint-generator.d.ts.map +1 -0
- package/dist/fingerprinting/non-apify-fingerprint-generator.js +480 -0
- package/dist/fingerprinting/non-apify-fingerprint-generator.js.map +1 -0
- package/dist/keyboard-layout.d.ts +45 -0
- package/dist/keyboard-layout.d.ts.map +1 -0
- package/dist/keyboard-layout.js +162 -0
- package/dist/keyboard-layout.js.map +1 -0
- package/dist/page.d.ts +18 -0
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +96 -6
- package/dist/page.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -1
- package/dist/fingerprinting/fingerprint-overrides/coalesced-events-spoofing.d.ts +0 -10
- package/dist/fingerprinting/fingerprint-overrides/coalesced-events-spoofing.d.ts.map +0 -1
- package/dist/fingerprinting/fingerprint-overrides/coalesced-events-spoofing.js +0 -210
- package/dist/fingerprinting/fingerprint-overrides/coalesced-events-spoofing.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stealth-script.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/stealth-script.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAW,EAAE;IAC5C,OAAO
|
|
1
|
+
{"version":3,"file":"stealth-script.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/stealth-script.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2kCL,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-consistency.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/storage-consistency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,8BAA8B,QAAO,
|
|
1
|
+
{"version":3,"file":"storage-consistency.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/storage-consistency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,8BAA8B,QAAO,MA+UjD,CAAC"}
|
|
@@ -18,14 +18,16 @@ export const createStorageConsistencyScript = () => {
|
|
|
18
18
|
const spoofStorageAPIs = () => {
|
|
19
19
|
const platform = navigator.platform || 'Win32';
|
|
20
20
|
|
|
21
|
-
//
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
// Use centralized stable hash (set up by utils.ts before this module runs).
|
|
22
|
+
const _ss = typeof __stealth !== 'undefined' ? __stealth : {};
|
|
23
|
+
const sessionSeed = (_ss.stableHash
|
|
24
|
+
? _ss.stableHash(0xCAFE9002)
|
|
25
|
+
: (() => {
|
|
26
|
+
const ua = navigator.userAgent || '';
|
|
27
|
+
const s = window.screen;
|
|
28
|
+
return (ua.length * 17 + (s.width || 0) * 31 + (s.height || 0) * 13) % 1000000;
|
|
29
|
+
})()
|
|
30
|
+
);
|
|
29
31
|
|
|
30
32
|
// Seeded PRNG (mulberry32) for consistent values
|
|
31
33
|
const createSeededRNG = (seed) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-consistency.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/storage-consistency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAW,EAAE;IACvD,OAAO
|
|
1
|
+
{"version":3,"file":"storage-consistency.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/storage-consistency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAW,EAAE;IACvD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6UL,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing-consistency.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/timing-consistency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,6BAA6B,QAAO,
|
|
1
|
+
{"version":3,"file":"timing-consistency.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/timing-consistency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,6BAA6B,QAAO,MA6PhD,CAAC"}
|
|
@@ -24,13 +24,15 @@ export const createTimingConsistencyScript = () => {
|
|
|
24
24
|
const originalDateNow = Date.now;
|
|
25
25
|
const originalPerformanceNow = performance.now.bind(performance);
|
|
26
26
|
|
|
27
|
-
//
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
// Use centralized stable hash (set up by utils.ts before this module runs).
|
|
28
|
+
const _ss = typeof __stealth !== 'undefined' ? __stealth : {};
|
|
29
|
+
const sessionSeed = (_ss.stableHash
|
|
30
|
+
? _ss.stableHash(0xCAFE9003)
|
|
31
|
+
: (() => {
|
|
32
|
+
const ua = navigator.userAgent || '';
|
|
33
|
+
return ua.length * 17 + (screen.width || 0) * 31;
|
|
34
|
+
})()
|
|
35
|
+
);
|
|
34
36
|
|
|
35
37
|
// Seeded PRNG (mulberry32) for consistent values
|
|
36
38
|
const seededRandom = (seed) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing-consistency.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/timing-consistency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAW,EAAE;IACtD,OAAO
|
|
1
|
+
{"version":3,"file":"timing-consistency.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/timing-consistency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAW,EAAE;IACtD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2PL,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -132,24 +132,24 @@ export const createUAClientHintsSpoofingScript = (platform = 'Win32', generatedU
|
|
|
132
132
|
getHighEntropyValues: {
|
|
133
133
|
value: function(hints) {
|
|
134
134
|
return new Promise((resolve) => {
|
|
135
|
-
//
|
|
136
|
-
|
|
135
|
+
// Real Chrome resolves getHighEntropyValues via IPC microtask, not a random setTimeout
|
|
136
|
+
Promise.resolve().then(() => {
|
|
137
137
|
const result = {};
|
|
138
|
-
|
|
138
|
+
|
|
139
139
|
if (!hints || !Array.isArray(hints)) {
|
|
140
140
|
resolve(result);
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
143
|
-
|
|
143
|
+
|
|
144
144
|
// Return requested hints
|
|
145
145
|
for (const hint of hints) {
|
|
146
146
|
if (hint in highEntropyValues) {
|
|
147
147
|
result[hint] = highEntropyValues[hint];
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
|
|
151
151
|
resolve(result);
|
|
152
|
-
}
|
|
152
|
+
});
|
|
153
153
|
});
|
|
154
154
|
},
|
|
155
155
|
writable: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAO,MAoiB3C,CAAC"}
|
|
@@ -491,7 +491,50 @@ export const createStealthUtilsScript = () => {
|
|
|
491
491
|
|
|
492
492
|
// Initialize toString patch immediately
|
|
493
493
|
patchToString();
|
|
494
|
-
|
|
494
|
+
|
|
495
|
+
// ============================================
|
|
496
|
+
// SHARED SEED UTILITIES
|
|
497
|
+
// Exposed via __stealth so all override modules
|
|
498
|
+
// use the same deterministic hash instead of
|
|
499
|
+
// duplicating _stableHash in every file.
|
|
500
|
+
// ============================================
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Deterministic hash that incorporates __stealth.seedKey + UA + screen.
|
|
504
|
+
* Every override module should call _s.stableHash(uniqueSalt) for its seed.
|
|
505
|
+
*/
|
|
506
|
+
const _stableHashFn = (salt) => {
|
|
507
|
+
const key = _s.seedKey || '';
|
|
508
|
+
const ua = (typeof navigator !== 'undefined' && navigator.userAgent) || '';
|
|
509
|
+
const sw = (typeof screen !== 'undefined' && screen.width) || 0;
|
|
510
|
+
const sh = (typeof screen !== 'undefined' && screen.height) || 0;
|
|
511
|
+
const cd = (typeof screen !== 'undefined' && screen.colorDepth) || 0;
|
|
512
|
+
let h = salt | 0;
|
|
513
|
+
for (let i = 0; i < key.length; i++) h = (h << 5) - h + key.charCodeAt(i) | 0;
|
|
514
|
+
for (let i = 0; i < ua.length; i++) h = (h << 5) - h + ua.charCodeAt(i) | 0;
|
|
515
|
+
h = (h << 5) - h + sw | 0;
|
|
516
|
+
h = (h << 5) - h + sh | 0;
|
|
517
|
+
h = (h << 5) - h + cd | 0;
|
|
518
|
+
return h >>> 0;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Seeded PRNG factory (mulberry32).
|
|
523
|
+
* Usage: const rng = _s.createRNG(seed); rng() -> [0, 1)
|
|
524
|
+
*/
|
|
525
|
+
const _createRNGFn = (seed) => {
|
|
526
|
+
let s = seed | 0;
|
|
527
|
+
return () => {
|
|
528
|
+
s = s + 0x6D2B79F5 | 0;
|
|
529
|
+
let t = Math.imul(s ^ s >>> 15, 1 | s);
|
|
530
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
531
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
_s.stableHash = _stableHashFn;
|
|
536
|
+
_s.createRNG = _createRNGFn;
|
|
537
|
+
|
|
495
538
|
// Export utilities via shared stealth store (not on window - avoids detection)
|
|
496
539
|
_s.utils = {
|
|
497
540
|
makeNativeString,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAW,EAAE;IACjD,OAAO
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAW,EAAE;IACjD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkiBV,CAAC;AACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webgl-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,yBAAyB,sBAAuB,WAAW,KAAG,
|
|
1
|
+
{"version":3,"file":"webgl-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webgl-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,yBAAyB,sBAAuB,WAAW,KAAG,MAwQ1E,CAAC"}
|
|
@@ -109,7 +109,12 @@ export const createWebGLSpoofingScript = (fingerprintWebGL) => {
|
|
|
109
109
|
|
|
110
110
|
console.log('[CDP-FP-DEBUG] WebGL using platform:', platform, '- Vendor:', selectedVendor, 'Renderer:', selectedRenderer.substring(0, 60) + '...');
|
|
111
111
|
`}
|
|
112
|
-
|
|
112
|
+
|
|
113
|
+
// Store selected GPU info on __stealth for cross-API consistency (WebGPU reads this)
|
|
114
|
+
if (typeof __stealth !== 'undefined') {
|
|
115
|
+
__stealth.webglRenderer = selectedRenderer;
|
|
116
|
+
}
|
|
117
|
+
|
|
113
118
|
// Override getParameter
|
|
114
119
|
WebGLRenderingContext.prototype.getParameter = function(param) {
|
|
115
120
|
// UNMASKED_VENDOR_WEBGL
|
|
@@ -154,6 +159,43 @@ export const createWebGLSpoofingScript = (fingerprintWebGL) => {
|
|
|
154
159
|
};
|
|
155
160
|
}
|
|
156
161
|
|
|
162
|
+
// Override getShaderPrecisionFormat to prevent GPU cross-referencing.
|
|
163
|
+
// Anti-bot scripts can compare precision values against the claimed GPU/platform.
|
|
164
|
+
// These values match the standard IEEE 754 precision formats reported by modern
|
|
165
|
+
// D3D11/Metal/Vulkan drivers — consistent across NVIDIA, AMD, and Intel GPUs.
|
|
166
|
+
const _shaderPrecision = {
|
|
167
|
+
35633: { // VERTEX_SHADER
|
|
168
|
+
36336: { rangeMin: 1, rangeMax: 1, precision: 8 }, // LOW_FLOAT
|
|
169
|
+
36337: { rangeMin: 14, rangeMax: 14, precision: 10 }, // MEDIUM_FLOAT
|
|
170
|
+
36338: { rangeMin: 127, rangeMax: 127, precision: 23 }, // HIGH_FLOAT
|
|
171
|
+
36339: { rangeMin: 8, rangeMax: 7, precision: 0 }, // LOW_INT
|
|
172
|
+
36340: { rangeMin: 15, rangeMax: 14, precision: 0 }, // MEDIUM_INT
|
|
173
|
+
36341: { rangeMin: 31, rangeMax: 30, precision: 0 }, // HIGH_INT
|
|
174
|
+
},
|
|
175
|
+
35632: { // FRAGMENT_SHADER
|
|
176
|
+
36336: { rangeMin: 1, rangeMax: 1, precision: 8 },
|
|
177
|
+
36337: { rangeMin: 14, rangeMax: 14, precision: 10 },
|
|
178
|
+
36338: { rangeMin: 127, rangeMax: 127, precision: 23 },
|
|
179
|
+
36339: { rangeMin: 8, rangeMax: 7, precision: 0 },
|
|
180
|
+
36340: { rangeMin: 15, rangeMax: 14, precision: 0 },
|
|
181
|
+
36341: { rangeMin: 31, rangeMax: 30, precision: 0 },
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
const _origGetShaderPrecisionFormat = WebGLRenderingContext.prototype.getShaderPrecisionFormat;
|
|
185
|
+
WebGLRenderingContext.prototype.getShaderPrecisionFormat = function(shaderType, precisionType) {
|
|
186
|
+
const shaderFmts = _shaderPrecision[shaderType];
|
|
187
|
+
const fmt = shaderFmts && shaderFmts[precisionType];
|
|
188
|
+
if (fmt) {
|
|
189
|
+
// Return a plain object that mirrors WebGLShaderPrecisionFormat fields.
|
|
190
|
+
// Anti-bot scripts read .rangeMin/.rangeMax/.precision — instanceof is not checked.
|
|
191
|
+
return { rangeMin: fmt.rangeMin, rangeMax: fmt.rangeMax, precision: fmt.precision };
|
|
192
|
+
}
|
|
193
|
+
return _origGetShaderPrecisionFormat.apply(this, arguments);
|
|
194
|
+
};
|
|
195
|
+
if (typeof WebGL2RenderingContext !== 'undefined') {
|
|
196
|
+
WebGL2RenderingContext.prototype.getShaderPrecisionFormat = WebGLRenderingContext.prototype.getShaderPrecisionFormat;
|
|
197
|
+
}
|
|
198
|
+
|
|
157
199
|
// Override getSupportedExtensions with platform-appropriate extensions
|
|
158
200
|
const baseExtensions = [
|
|
159
201
|
'ANGLE_instanced_arrays', 'EXT_blend_minmax', 'EXT_color_buffer_half_float',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webgl-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,gBAA8B,EAAU,EAAE;IAChF,iFAAiF;IACjF,MAAM,cAAc,GAAG,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,cAAc,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAElH,OAAO;;;;;;;;;;UAUD,cAAc,CAAC,CAAC,CAAC;;oCAES,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC;;;;SAI3D,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAuFH
|
|
1
|
+
{"version":3,"file":"webgl-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webgl-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,gBAA8B,EAAU,EAAE;IAChF,iFAAiF;IACjF,MAAM,cAAc,GAAG,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,cAAc,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAElH,OAAO;;;;;;;;;;UAUD,cAAc,CAAC,CAAC,CAAC;;oCAES,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC;;;;SAI3D,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAuFH;;;;;;;;;;;;;;;;;;;yBAmBgB,cAAc,IAAI,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,UAAU;;;yBAGxF,cAAc,IAAI,gBAAgB,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,gBAAgB,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgFjH,CAAC,cAAc,CAAC,CAAC,CAAC;;;;;;;;;SASnB,CAAC,CAAC,CAAC;;SAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2CH,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpu-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webgpu-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,0BAA0B,kCAA+B,
|
|
1
|
+
{"version":3,"file":"webgpu-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webgpu-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,0BAA0B,kCAA+B,MA0NrE,CAAC"}
|
|
@@ -64,7 +64,15 @@ export const createWebGPUSpoofingScript = (experimentalMode = false) => {
|
|
|
64
64
|
return new Proxy(adapter, {
|
|
65
65
|
get(adapterTarget, adapterProp) {
|
|
66
66
|
if (adapterProp === 'name') {
|
|
67
|
-
//
|
|
67
|
+
// Derive GPU name from WebGL renderer for cross-API consistency.
|
|
68
|
+
// webgl-spoofing.ts stores the selected renderer on __stealth.webglRenderer.
|
|
69
|
+
const _wglR = typeof __stealth !== 'undefined' && __stealth.webglRenderer;
|
|
70
|
+
if (_wglR) {
|
|
71
|
+
// Extract from "ANGLE (NVIDIA, NVIDIA GeForce RTX 4060 Direct3D11 ...)"
|
|
72
|
+
const _m = _wglR.match(/ANGLE \\(\\w+, ([^,]+?)(?:\\s+Direct3D|\\s+OpenGL|,)/);
|
|
73
|
+
if (_m) return _m[1].trim();
|
|
74
|
+
}
|
|
75
|
+
// Fallback: seeded pick from list
|
|
68
76
|
const gpuNames = [
|
|
69
77
|
'NVIDIA GeForce RTX 4060',
|
|
70
78
|
'NVIDIA GeForce RTX 3060',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpu-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webgpu-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,gBAAgB,GAAG,KAAK,EAAU,EAAE;IAC3E,OAAO;;;;;;;UAOD,gBAAgB,CAAC,CAAC,CAAC;;;;;;;;;SASpB,CAAC,CAAC,CAAC,EAAE
|
|
1
|
+
{"version":3,"file":"webgpu-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webgpu-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,gBAAgB,GAAG,KAAK,EAAU,EAAE;IAC3E,OAAO;;;;;;;UAOD,gBAAgB,CAAC,CAAC,CAAC;;;;;;;;;SASpB,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwMR,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webrtc-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webrtc-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,0BAA0B,QAAO,
|
|
1
|
+
{"version":3,"file":"webrtc-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webrtc-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,0BAA0B,QAAO,MA4M7C,CAAC;AAEF,eAAO,MAAM,yBAAyB,QAAO,MAgC5C,CAAC"}
|
|
@@ -159,9 +159,20 @@ export const createWebRTCSpoofingScript = () => {
|
|
|
159
159
|
if (cachedDeviceList) return Promise.resolve(cachedDeviceList);
|
|
160
160
|
|
|
161
161
|
return originalEnumerateDevices.apply(this, arguments).then(devices => {
|
|
162
|
-
//
|
|
163
|
-
//
|
|
164
|
-
//
|
|
162
|
+
// If the platform returns no devices (headless/server/CI), inject
|
|
163
|
+
// plausible fake devices so fingerprinters don't flag an empty list.
|
|
164
|
+
// A real desktop Chrome always has at least audioinput + audiooutput.
|
|
165
|
+
if (devices.length === 0) {
|
|
166
|
+
devices = [
|
|
167
|
+
{ kind: 'audioinput', label: '', deviceId: 'default', groupId: 'default' },
|
|
168
|
+
{ kind: 'audiooutput', label: '', deviceId: 'default', groupId: 'default' },
|
|
169
|
+
{ kind: 'audioinput', label: '', deviceId: '', groupId: '' },
|
|
170
|
+
{ kind: 'audiooutput', label: '', deviceId: '', groupId: '' },
|
|
171
|
+
];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Replace device IDs with deterministic session-keyed ones,
|
|
175
|
+
// keeping the real device count so repeated calls are consistent.
|
|
165
176
|
const groupIds = {};
|
|
166
177
|
cachedDeviceList = devices.map((device, index) => {
|
|
167
178
|
const groupKey = device.kind.replace(/input|output/, '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webrtc-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webrtc-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAW,EAAE;IACnD,OAAO
|
|
1
|
+
{"version":3,"file":"webrtc-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/webrtc-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAW,EAAE;IACnD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0ML,CAAC;AACP,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAW,EAAE;IAClD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8BL,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* locale-resolver.ts — resolve a coherent locale/languages/timezone triple
|
|
3
|
+
* from whatever signals are available (user override, proxy country, fingerprint, default).
|
|
4
|
+
*
|
|
5
|
+
* One flag in, one triple out. Every locale-aware surface downstream
|
|
6
|
+
* (--lang, --fingerprint-accept-language, CDP setLocaleOverride, CDP setTimezoneOverride,
|
|
7
|
+
* FingerprintConfigJson, locale-spoofing script) reads from this single result
|
|
8
|
+
* so that every observable (navigator.language, Intl defaults, Accept-Language header,
|
|
9
|
+
* timezone) stays consistent.
|
|
10
|
+
*/
|
|
11
|
+
export interface ResolveLocaleInput {
|
|
12
|
+
/** Explicit BCP-47 tag (e.g. 'ko-KR'). Highest priority. */
|
|
13
|
+
locale?: string;
|
|
14
|
+
/** Explicit IANA timezone (e.g. 'Asia/Seoul'). Highest priority for timezone. */
|
|
15
|
+
timezone?: string;
|
|
16
|
+
/** Explicit Accept-Language header value (e.g. 'ko-KR,ko;q=0.9'). Overrides derived list. */
|
|
17
|
+
languages?: string;
|
|
18
|
+
/** ISO 3166-1 alpha-2 country code from proxy IP lookup (e.g. 'KR'). */
|
|
19
|
+
proxyCountry?: string;
|
|
20
|
+
/** Fingerprint-generator language, used as a fallback when nothing else is available. */
|
|
21
|
+
fingerprintLanguage?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ResolvedLocale {
|
|
24
|
+
/** BCP-47 tag for navigator.language / ICU default (e.g. 'ko-KR'). */
|
|
25
|
+
locale: string;
|
|
26
|
+
/** Accept-Language header value with q-values (e.g. 'ko-KR,ko;q=0.9,en;q=0.8'). */
|
|
27
|
+
languages: string;
|
|
28
|
+
/** IANA timezone identifier (e.g. 'Asia/Seoul'). */
|
|
29
|
+
timezone: string;
|
|
30
|
+
/** POSIX locale for LANG/LC_ALL env (e.g. 'ko_KR.UTF-8'). */
|
|
31
|
+
posix: string;
|
|
32
|
+
}
|
|
33
|
+
/** Resolve every locale surface from whatever signals are available. */
|
|
34
|
+
export declare function resolveLocale(input?: ResolveLocaleInput): ResolvedLocale;
|
|
35
|
+
/**
|
|
36
|
+
* Look up the proxy IP's country (ISO 3166-1 alpha-2) via ipinfo.io.
|
|
37
|
+
* Best-effort: returns undefined on any failure so callers can fall through
|
|
38
|
+
* to fingerprint/default without blocking the launch.
|
|
39
|
+
*/
|
|
40
|
+
export declare function fetchProxyCountry(proxyUrl?: string): Promise<string | undefined>;
|
|
41
|
+
//# sourceMappingURL=locale-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-resolver.d.ts","sourceRoot":"","sources":["../../src/fingerprinting/locale-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,kBAAkB;IAC/B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yFAAyF;IACzF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,cAAc;IAC3B,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;CACjB;AA0DD,wEAAwE;AACxE,wBAAgB,aAAa,CAAC,KAAK,GAAE,kBAAuB,GAAG,cAAc,CAO5E;AA8DD;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CActF"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* locale-resolver.ts — resolve a coherent locale/languages/timezone triple
|
|
3
|
+
* from whatever signals are available (user override, proxy country, fingerprint, default).
|
|
4
|
+
*
|
|
5
|
+
* One flag in, one triple out. Every locale-aware surface downstream
|
|
6
|
+
* (--lang, --fingerprint-accept-language, CDP setLocaleOverride, CDP setTimezoneOverride,
|
|
7
|
+
* FingerprintConfigJson, locale-spoofing script) reads from this single result
|
|
8
|
+
* so that every observable (navigator.language, Intl defaults, Accept-Language header,
|
|
9
|
+
* timezone) stays consistent.
|
|
10
|
+
*/
|
|
11
|
+
// ISO 3166-1 alpha-2 → BCP-47 primary locale. Covers the common Apify proxy regions.
|
|
12
|
+
// If a country maps to multiple locales (CA: en-CA vs fr-CA), pick the majority one.
|
|
13
|
+
const COUNTRY_TO_LOCALE = {
|
|
14
|
+
US: 'en-US', GB: 'en-GB', IE: 'en-IE', AU: 'en-AU', NZ: 'en-NZ', CA: 'en-CA',
|
|
15
|
+
DE: 'de-DE', AT: 'de-AT', CH: 'de-CH',
|
|
16
|
+
FR: 'fr-FR', BE: 'fr-BE', LU: 'fr-LU',
|
|
17
|
+
ES: 'es-ES', MX: 'es-MX', AR: 'es-AR', CL: 'es-CL', CO: 'es-CO', PE: 'es-PE',
|
|
18
|
+
IT: 'it-IT',
|
|
19
|
+
NL: 'nl-NL',
|
|
20
|
+
PT: 'pt-PT', BR: 'pt-BR',
|
|
21
|
+
PL: 'pl-PL',
|
|
22
|
+
CZ: 'cs-CZ', SK: 'sk-SK',
|
|
23
|
+
HU: 'hu-HU', RO: 'ro-RO', BG: 'bg-BG', HR: 'hr-HR', RS: 'sr-RS', SI: 'sl-SI',
|
|
24
|
+
GR: 'el-GR',
|
|
25
|
+
SE: 'sv-SE', NO: 'nb-NO', DK: 'da-DK', FI: 'fi-FI', IS: 'is-IS',
|
|
26
|
+
RU: 'ru-RU', UA: 'uk-UA', BY: 'be-BY',
|
|
27
|
+
TR: 'tr-TR',
|
|
28
|
+
IL: 'he-IL', AE: 'ar-AE', SA: 'ar-SA', EG: 'ar-EG',
|
|
29
|
+
JP: 'ja-JP', KR: 'ko-KR',
|
|
30
|
+
CN: 'zh-CN', HK: 'zh-HK', TW: 'zh-TW',
|
|
31
|
+
TH: 'th-TH', VN: 'vi-VN', ID: 'id-ID', MY: 'ms-MY', PH: 'en-PH', SG: 'en-SG',
|
|
32
|
+
IN: 'en-IN', PK: 'ur-PK', BD: 'bn-BD',
|
|
33
|
+
ZA: 'en-ZA',
|
|
34
|
+
};
|
|
35
|
+
// Region (ISO 3166-1 alpha-2 subtag of BCP-47) → IANA timezone.
|
|
36
|
+
// For countries that span multiple zones, pick the most populous.
|
|
37
|
+
const REGION_TO_TIMEZONE = {
|
|
38
|
+
US: 'America/New_York', CA: 'America/Toronto', MX: 'America/Mexico_City',
|
|
39
|
+
GB: 'Europe/London', IE: 'Europe/Dublin',
|
|
40
|
+
DE: 'Europe/Berlin', AT: 'Europe/Vienna', CH: 'Europe/Zurich',
|
|
41
|
+
FR: 'Europe/Paris', BE: 'Europe/Brussels', LU: 'Europe/Luxembourg',
|
|
42
|
+
ES: 'Europe/Madrid', IT: 'Europe/Rome', NL: 'Europe/Amsterdam',
|
|
43
|
+
PT: 'Europe/Lisbon', BR: 'America/Sao_Paulo', AR: 'America/Argentina/Buenos_Aires',
|
|
44
|
+
CL: 'America/Santiago', CO: 'America/Bogota', PE: 'America/Lima',
|
|
45
|
+
PL: 'Europe/Warsaw', CZ: 'Europe/Prague', SK: 'Europe/Bratislava',
|
|
46
|
+
HU: 'Europe/Budapest', RO: 'Europe/Bucharest', BG: 'Europe/Sofia',
|
|
47
|
+
HR: 'Europe/Zagreb', RS: 'Europe/Belgrade', SI: 'Europe/Ljubljana',
|
|
48
|
+
GR: 'Europe/Athens',
|
|
49
|
+
SE: 'Europe/Stockholm', NO: 'Europe/Oslo', DK: 'Europe/Copenhagen',
|
|
50
|
+
FI: 'Europe/Helsinki', IS: 'Atlantic/Reykjavik',
|
|
51
|
+
RU: 'Europe/Moscow', UA: 'Europe/Kiev', BY: 'Europe/Minsk',
|
|
52
|
+
TR: 'Europe/Istanbul',
|
|
53
|
+
IL: 'Asia/Jerusalem', AE: 'Asia/Dubai', SA: 'Asia/Riyadh', EG: 'Africa/Cairo',
|
|
54
|
+
JP: 'Asia/Tokyo', KR: 'Asia/Seoul',
|
|
55
|
+
CN: 'Asia/Shanghai', HK: 'Asia/Hong_Kong', TW: 'Asia/Taipei',
|
|
56
|
+
TH: 'Asia/Bangkok', VN: 'Asia/Ho_Chi_Minh', ID: 'Asia/Jakarta',
|
|
57
|
+
MY: 'Asia/Kuala_Lumpur', PH: 'Asia/Manila', SG: 'Asia/Singapore',
|
|
58
|
+
IN: 'Asia/Kolkata', PK: 'Asia/Karachi', BD: 'Asia/Dhaka',
|
|
59
|
+
AU: 'Australia/Sydney', NZ: 'Pacific/Auckland',
|
|
60
|
+
ZA: 'Africa/Johannesburg',
|
|
61
|
+
};
|
|
62
|
+
const DEFAULT_LOCALE = 'en-US';
|
|
63
|
+
const DEFAULT_TIMEZONE = 'UTC';
|
|
64
|
+
/** Resolve every locale surface from whatever signals are available. */
|
|
65
|
+
export function resolveLocale(input = {}) {
|
|
66
|
+
const locale = pickLocale(input);
|
|
67
|
+
const region = extractRegion(locale);
|
|
68
|
+
const timezone = pickTimezone(input, region);
|
|
69
|
+
const languages = input.languages ?? buildLanguages(locale);
|
|
70
|
+
const posix = toPosix(locale);
|
|
71
|
+
return { locale, languages, timezone, posix };
|
|
72
|
+
}
|
|
73
|
+
function pickLocale({ locale, proxyCountry, fingerprintLanguage }) {
|
|
74
|
+
if (locale && isValidBcp47(locale))
|
|
75
|
+
return locale;
|
|
76
|
+
if (proxyCountry) {
|
|
77
|
+
const fromCountry = COUNTRY_TO_LOCALE[proxyCountry.toUpperCase()];
|
|
78
|
+
if (fromCountry)
|
|
79
|
+
return fromCountry;
|
|
80
|
+
}
|
|
81
|
+
if (fingerprintLanguage && isValidBcp47(fingerprintLanguage))
|
|
82
|
+
return fingerprintLanguage;
|
|
83
|
+
return DEFAULT_LOCALE;
|
|
84
|
+
}
|
|
85
|
+
function pickTimezone({ timezone, proxyCountry }, region) {
|
|
86
|
+
if (timezone)
|
|
87
|
+
return timezone;
|
|
88
|
+
if (region) {
|
|
89
|
+
const fromRegion = REGION_TO_TIMEZONE[region];
|
|
90
|
+
if (fromRegion)
|
|
91
|
+
return fromRegion;
|
|
92
|
+
}
|
|
93
|
+
if (proxyCountry) {
|
|
94
|
+
const fromProxy = REGION_TO_TIMEZONE[proxyCountry.toUpperCase()];
|
|
95
|
+
if (fromProxy)
|
|
96
|
+
return fromProxy;
|
|
97
|
+
}
|
|
98
|
+
return DEFAULT_TIMEZONE;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Build a realistic Accept-Language string from the primary locale.
|
|
102
|
+
* Pattern mirrors what real Chrome sends:
|
|
103
|
+
* ko-KR → 'ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7'
|
|
104
|
+
* en-US → 'en-US,en;q=0.9'
|
|
105
|
+
*/
|
|
106
|
+
function buildLanguages(locale) {
|
|
107
|
+
const primary = locale;
|
|
108
|
+
const [lang] = locale.split('-');
|
|
109
|
+
const parts = [primary];
|
|
110
|
+
if (lang && lang !== primary)
|
|
111
|
+
parts.push(`${lang};q=0.9`);
|
|
112
|
+
// Only append English fallbacks when the primary language isn't already English —
|
|
113
|
+
// otherwise we'd duplicate `en` with a lower-priority q-value, which is itself a
|
|
114
|
+
// detectable anomaly.
|
|
115
|
+
if (lang !== 'en') {
|
|
116
|
+
parts.push('en-US;q=0.8', 'en;q=0.7');
|
|
117
|
+
}
|
|
118
|
+
return parts.join(',');
|
|
119
|
+
}
|
|
120
|
+
/** Extract the region subtag (uppercase) from a BCP-47 tag. 'ko-KR' → 'KR'. */
|
|
121
|
+
function extractRegion(locale) {
|
|
122
|
+
const [, region] = locale.split('-');
|
|
123
|
+
return region?.toUpperCase() ?? '';
|
|
124
|
+
}
|
|
125
|
+
/** Convert BCP-47 to POSIX locale: 'ko-KR' → 'ko_KR.UTF-8'. */
|
|
126
|
+
function toPosix(locale) {
|
|
127
|
+
const [lang, region] = locale.split('-');
|
|
128
|
+
return region ? `${lang}_${region.toUpperCase()}.UTF-8` : `${lang}.UTF-8`;
|
|
129
|
+
}
|
|
130
|
+
/** Loose BCP-47 validation: 2-3 letter lang, optional 2-letter region. Rejects garbage. */
|
|
131
|
+
function isValidBcp47(tag) {
|
|
132
|
+
return /^[a-z]{2,3}(-[A-Z]{2})?$/.test(tag);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Look up the proxy IP's country (ISO 3166-1 alpha-2) via ipinfo.io.
|
|
136
|
+
* Best-effort: returns undefined on any failure so callers can fall through
|
|
137
|
+
* to fingerprint/default without blocking the launch.
|
|
138
|
+
*/
|
|
139
|
+
export async function fetchProxyCountry(proxyUrl) {
|
|
140
|
+
try {
|
|
141
|
+
const { gotScraping } = await import('got-scraping');
|
|
142
|
+
const response = await gotScraping({
|
|
143
|
+
url: 'https://ipinfo.io/json',
|
|
144
|
+
proxyUrl,
|
|
145
|
+
responseType: 'json',
|
|
146
|
+
timeout: { request: 4000 },
|
|
147
|
+
});
|
|
148
|
+
const body = response.body;
|
|
149
|
+
return body?.country;
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=locale-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-resolver.js","sourceRoot":"","sources":["../../src/fingerprinting/locale-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA0BH,qFAAqF;AACrF,qFAAqF;AACrF,MAAM,iBAAiB,GAA2B;IAC9C,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO;IAC5E,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAA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AAE,IAAI,EAAE,CAAC;AACvC,CAAC;AAED,+DAA+D;AAC/D,SAAS,OAAO,CAAC,MAAc;IAC3B,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,QAAQ,CAAC;AAC9E,CAAC;AAED,2FAA2F;AAC3F,SAAS,YAAY,CAAC,GAAW;IAC7B,OAAO,0BAA0B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,QAAiB;IACrD,IAAI,CAAC;QACD,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;QACrD,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC;YAC/B,GAAG,EAAE,wBAAwB;YAC7B,QAAQ;YACR,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;SAC7B,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAwC,CAAC;QAC/D,OAAO,IAAI,EAAE,OAAO,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,SAAS,CAAC;IACrB,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Non-Apify fingerprint generator — Camoufox-inspired real device profiles.
|
|
3
|
+
*
|
|
4
|
+
* Camoufox's key insight: use REAL browser fingerprint samples instead of
|
|
5
|
+
* statistically-generated synthetic ones. All properties of a real profile
|
|
6
|
+
* (navigator, screen, GPU, UA-CH) were measured from the same physical device
|
|
7
|
+
* at the same time, guaranteeing cross-property consistency that synthetic
|
|
8
|
+
* generators cannot achieve.
|
|
9
|
+
*
|
|
10
|
+
* This module provides:
|
|
11
|
+
* 1. A bundled database of real Chrome device profiles (the primary source).
|
|
12
|
+
* 2. Deterministic profile selection via a seeded PRNG that matches the session
|
|
13
|
+
* seed used by the rest of the fingerprint override pipeline.
|
|
14
|
+
*/
|
|
15
|
+
/** Options for fingerprint generation. */
|
|
16
|
+
export interface NonApifyFingerprintOptions {
|
|
17
|
+
/** Target OS. Defaults to 'windows' (most common real-world profile). */
|
|
18
|
+
os?: 'windows' | 'macos' | 'linux';
|
|
19
|
+
/** Proxy session key used to derive a deterministic seed. If omitted, a random seed is used. */
|
|
20
|
+
proxySeedKey?: string | null;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Generate a real-sample Chrome fingerprint.
|
|
24
|
+
*
|
|
25
|
+
* Returns an object compatible with `BrowserFingerprintWithHeaders` from the
|
|
26
|
+
* `fingerprint-generator` package so it can be used as a drop-in replacement.
|
|
27
|
+
*/
|
|
28
|
+
export declare function generateNonApifyFingerprint(options?: NonApifyFingerprintOptions): Promise<{
|
|
29
|
+
headers: Record<string, string>;
|
|
30
|
+
fingerprint: Record<string, unknown>;
|
|
31
|
+
}>;
|
|
32
|
+
//# sourceMappingURL=non-apify-fingerprint-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"non-apify-fingerprint-generator.d.ts","sourceRoot":"","sources":["../../src/fingerprinting/non-apify-fingerprint-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAoDH,0CAA0C;AAC1C,MAAM,WAAW,0BAA0B;IACvC,yEAAyE;IACzE,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;IACnC,gGAAgG;IAChG,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAwYD;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAAC,OAAO,GAAE,0BAA+B,GAAG,OAAO,CAAC;IACjG,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC,CAAC,CAyFD"}
|