nlcurl 0.1.0
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/LICENSE +21 -0
- package/README.md +162 -0
- package/dist/cli/args.d.ts +42 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +262 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +114 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/output.d.ts +22 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +105 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cookies/jar.d.ts +41 -0
- package/dist/cookies/jar.d.ts.map +1 -0
- package/dist/cookies/jar.js +148 -0
- package/dist/cookies/jar.js.map +1 -0
- package/dist/cookies/parser.d.ts +24 -0
- package/dist/cookies/parser.d.ts.map +1 -0
- package/dist/cookies/parser.js +93 -0
- package/dist/cookies/parser.js.map +1 -0
- package/dist/core/client.d.ts +79 -0
- package/dist/core/client.d.ts.map +1 -0
- package/dist/core/client.js +106 -0
- package/dist/core/client.js.map +1 -0
- package/dist/core/errors.d.ts +36 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +65 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/request.d.ts +96 -0
- package/dist/core/request.d.ts.map +1 -0
- package/dist/core/request.js +5 -0
- package/dist/core/request.js.map +1 -0
- package/dist/core/response.d.ts +48 -0
- package/dist/core/response.d.ts.map +1 -0
- package/dist/core/response.js +65 -0
- package/dist/core/response.js.map +1 -0
- package/dist/core/session.d.ts +60 -0
- package/dist/core/session.d.ts.map +1 -0
- package/dist/core/session.js +305 -0
- package/dist/core/session.js.map +1 -0
- package/dist/fingerprints/akamai.d.ts +17 -0
- package/dist/fingerprints/akamai.d.ts.map +1 -0
- package/dist/fingerprints/akamai.js +30 -0
- package/dist/fingerprints/akamai.js.map +1 -0
- package/dist/fingerprints/database.d.ts +33 -0
- package/dist/fingerprints/database.d.ts.map +1 -0
- package/dist/fingerprints/database.js +68 -0
- package/dist/fingerprints/database.js.map +1 -0
- package/dist/fingerprints/extensions.d.ts +49 -0
- package/dist/fingerprints/extensions.d.ts.map +1 -0
- package/dist/fingerprints/extensions.js +178 -0
- package/dist/fingerprints/extensions.js.map +1 -0
- package/dist/fingerprints/ja3.d.ts +32 -0
- package/dist/fingerprints/ja3.d.ts.map +1 -0
- package/dist/fingerprints/ja3.js +64 -0
- package/dist/fingerprints/ja3.js.map +1 -0
- package/dist/fingerprints/profiles/chrome.d.ts +30 -0
- package/dist/fingerprints/profiles/chrome.d.ts.map +1 -0
- package/dist/fingerprints/profiles/chrome.js +202 -0
- package/dist/fingerprints/profiles/chrome.js.map +1 -0
- package/dist/fingerprints/profiles/edge.d.ts +16 -0
- package/dist/fingerprints/profiles/edge.d.ts.map +1 -0
- package/dist/fingerprints/profiles/edge.js +61 -0
- package/dist/fingerprints/profiles/edge.js.map +1 -0
- package/dist/fingerprints/profiles/firefox.d.ts +13 -0
- package/dist/fingerprints/profiles/firefox.d.ts.map +1 -0
- package/dist/fingerprints/profiles/firefox.js +160 -0
- package/dist/fingerprints/profiles/firefox.js.map +1 -0
- package/dist/fingerprints/profiles/safari.d.ts +16 -0
- package/dist/fingerprints/profiles/safari.d.ts.map +1 -0
- package/dist/fingerprints/profiles/safari.js +140 -0
- package/dist/fingerprints/profiles/safari.js.map +1 -0
- package/dist/fingerprints/profiles/tor.d.ts +14 -0
- package/dist/fingerprints/profiles/tor.d.ts.map +1 -0
- package/dist/fingerprints/profiles/tor.js +136 -0
- package/dist/fingerprints/profiles/tor.js.map +1 -0
- package/dist/fingerprints/types.d.ts +104 -0
- package/dist/fingerprints/types.d.ts.map +1 -0
- package/dist/fingerprints/types.js +9 -0
- package/dist/fingerprints/types.js.map +1 -0
- package/dist/http/h1/client.d.ts +21 -0
- package/dist/http/h1/client.d.ts.map +1 -0
- package/dist/http/h1/client.js +136 -0
- package/dist/http/h1/client.js.map +1 -0
- package/dist/http/h1/encoder.d.ts +11 -0
- package/dist/http/h1/encoder.d.ts.map +1 -0
- package/dist/http/h1/encoder.js +75 -0
- package/dist/http/h1/encoder.js.map +1 -0
- package/dist/http/h1/parser.d.ts +61 -0
- package/dist/http/h1/parser.d.ts.map +1 -0
- package/dist/http/h1/parser.js +258 -0
- package/dist/http/h1/parser.js.map +1 -0
- package/dist/http/h2/client.d.ts +48 -0
- package/dist/http/h2/client.d.ts.map +1 -0
- package/dist/http/h2/client.js +376 -0
- package/dist/http/h2/client.js.map +1 -0
- package/dist/http/h2/frames.d.ts +65 -0
- package/dist/http/h2/frames.d.ts.map +1 -0
- package/dist/http/h2/frames.js +184 -0
- package/dist/http/h2/frames.js.map +1 -0
- package/dist/http/h2/hpack.d.ts +27 -0
- package/dist/http/h2/hpack.d.ts.map +1 -0
- package/dist/http/h2/hpack.js +423 -0
- package/dist/http/h2/hpack.js.map +1 -0
- package/dist/http/negotiator.d.ts +36 -0
- package/dist/http/negotiator.d.ts.map +1 -0
- package/dist/http/negotiator.js +101 -0
- package/dist/http/negotiator.js.map +1 -0
- package/dist/http/pool.d.ts +63 -0
- package/dist/http/pool.d.ts.map +1 -0
- package/dist/http/pool.js +177 -0
- package/dist/http/pool.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware/interceptor.d.ts +27 -0
- package/dist/middleware/interceptor.d.ts.map +1 -0
- package/dist/middleware/interceptor.js +35 -0
- package/dist/middleware/interceptor.js.map +1 -0
- package/dist/middleware/rate-limiter.d.ts +26 -0
- package/dist/middleware/rate-limiter.d.ts.map +1 -0
- package/dist/middleware/rate-limiter.js +59 -0
- package/dist/middleware/rate-limiter.js.map +1 -0
- package/dist/middleware/retry.d.ts +17 -0
- package/dist/middleware/retry.d.ts.map +1 -0
- package/dist/middleware/retry.js +64 -0
- package/dist/middleware/retry.js.map +1 -0
- package/dist/proxy/http-proxy.d.ts +23 -0
- package/dist/proxy/http-proxy.d.ts.map +1 -0
- package/dist/proxy/http-proxy.js +93 -0
- package/dist/proxy/http-proxy.js.map +1 -0
- package/dist/proxy/socks.d.ts +24 -0
- package/dist/proxy/socks.d.ts.map +1 -0
- package/dist/proxy/socks.js +196 -0
- package/dist/proxy/socks.js.map +1 -0
- package/dist/tls/constants.d.ts +142 -0
- package/dist/tls/constants.d.ts.map +1 -0
- package/dist/tls/constants.js +163 -0
- package/dist/tls/constants.js.map +1 -0
- package/dist/tls/node-engine.d.ts +22 -0
- package/dist/tls/node-engine.d.ts.map +1 -0
- package/dist/tls/node-engine.js +190 -0
- package/dist/tls/node-engine.js.map +1 -0
- package/dist/tls/stealth/client-hello.d.ts +38 -0
- package/dist/tls/stealth/client-hello.d.ts.map +1 -0
- package/dist/tls/stealth/client-hello.js +197 -0
- package/dist/tls/stealth/client-hello.js.map +1 -0
- package/dist/tls/stealth/engine.d.ts +16 -0
- package/dist/tls/stealth/engine.d.ts.map +1 -0
- package/dist/tls/stealth/engine.js +196 -0
- package/dist/tls/stealth/engine.js.map +1 -0
- package/dist/tls/stealth/handshake.d.ts +45 -0
- package/dist/tls/stealth/handshake.d.ts.map +1 -0
- package/dist/tls/stealth/handshake.js +403 -0
- package/dist/tls/stealth/handshake.js.map +1 -0
- package/dist/tls/stealth/key-schedule.d.ts +85 -0
- package/dist/tls/stealth/key-schedule.d.ts.map +1 -0
- package/dist/tls/stealth/key-schedule.js +141 -0
- package/dist/tls/stealth/key-schedule.js.map +1 -0
- package/dist/tls/stealth/record-layer.d.ts +74 -0
- package/dist/tls/stealth/record-layer.d.ts.map +1 -0
- package/dist/tls/stealth/record-layer.js +167 -0
- package/dist/tls/stealth/record-layer.js.map +1 -0
- package/dist/tls/types.d.ts +58 -0
- package/dist/tls/types.d.ts.map +1 -0
- package/dist/tls/types.js +6 -0
- package/dist/tls/types.js.map +1 -0
- package/dist/utils/buffer-reader.d.ts +32 -0
- package/dist/utils/buffer-reader.d.ts.map +1 -0
- package/dist/utils/buffer-reader.js +99 -0
- package/dist/utils/buffer-reader.js.map +1 -0
- package/dist/utils/buffer-writer.d.ts +35 -0
- package/dist/utils/buffer-writer.d.ts.map +1 -0
- package/dist/utils/buffer-writer.js +121 -0
- package/dist/utils/buffer-writer.js.map +1 -0
- package/dist/utils/encoding.d.ts +19 -0
- package/dist/utils/encoding.d.ts.map +1 -0
- package/dist/utils/encoding.js +63 -0
- package/dist/utils/encoding.js.map +1 -0
- package/dist/utils/logger.d.ts +24 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +56 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/url.d.ts +22 -0
- package/dist/utils/url.d.ts.map +1 -0
- package/dist/utils/url.js +56 -0
- package/dist/utils/url.js.map +1 -0
- package/dist/ws/client.d.ts +63 -0
- package/dist/ws/client.d.ts.map +1 -0
- package/dist/ws/client.js +273 -0
- package/dist/ws/client.js.map +1 -0
- package/dist/ws/frame.d.ts +44 -0
- package/dist/ws/frame.d.ts.map +1 -0
- package/dist/ws/frame.js +146 -0
- package/dist/ws/frame.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extension data builders.
|
|
3
|
+
*
|
|
4
|
+
* These helpers produce raw extension_data bytes for various TLS
|
|
5
|
+
* extensions. They are used by browser profiles to populate the
|
|
6
|
+
* extensions array in a declarative manner.
|
|
7
|
+
*/
|
|
8
|
+
import { BufferWriter } from '../utils/buffer-writer.js';
|
|
9
|
+
// ---- helpers ----
|
|
10
|
+
/** Build SNI extension data. RFC 6066 section 3. */
|
|
11
|
+
export function sniData(hostname) {
|
|
12
|
+
const host = Buffer.from(hostname, 'ascii');
|
|
13
|
+
const w = new BufferWriter(host.length + 16);
|
|
14
|
+
// ServerNameList length (2 bytes)
|
|
15
|
+
w.writeUInt16(host.length + 3 + 2);
|
|
16
|
+
// list length
|
|
17
|
+
w.writeUInt16(host.length + 3);
|
|
18
|
+
// name_type = host_name (0)
|
|
19
|
+
w.writeUInt8(0);
|
|
20
|
+
// host name length + data
|
|
21
|
+
w.writeUInt16(host.length);
|
|
22
|
+
w.writeBytes(host);
|
|
23
|
+
return w.toBuffer();
|
|
24
|
+
}
|
|
25
|
+
/** Build supported_versions extension data (for ClientHello). */
|
|
26
|
+
export function supportedVersionsData(versions) {
|
|
27
|
+
const w = new BufferWriter(1 + versions.length * 2);
|
|
28
|
+
w.writeUInt8(versions.length * 2);
|
|
29
|
+
for (const v of versions)
|
|
30
|
+
w.writeUInt16(v);
|
|
31
|
+
return w.toBuffer();
|
|
32
|
+
}
|
|
33
|
+
/** Build supported_groups extension data. */
|
|
34
|
+
export function supportedGroupsData(groups) {
|
|
35
|
+
const w = new BufferWriter(2 + groups.length * 2);
|
|
36
|
+
w.writeUInt16(groups.length * 2);
|
|
37
|
+
for (const g of groups)
|
|
38
|
+
w.writeUInt16(g);
|
|
39
|
+
return w.toBuffer();
|
|
40
|
+
}
|
|
41
|
+
/** Build ec_point_formats extension data. */
|
|
42
|
+
export function ecPointFormatsData(formats) {
|
|
43
|
+
const w = new BufferWriter(1 + formats.length);
|
|
44
|
+
w.writeUInt8(formats.length);
|
|
45
|
+
for (const f of formats)
|
|
46
|
+
w.writeUInt8(f);
|
|
47
|
+
return w.toBuffer();
|
|
48
|
+
}
|
|
49
|
+
/** Build signature_algorithms extension data. */
|
|
50
|
+
export function signatureAlgorithmsData(algs) {
|
|
51
|
+
const w = new BufferWriter(2 + algs.length * 2);
|
|
52
|
+
w.writeUInt16(algs.length * 2);
|
|
53
|
+
for (const a of algs)
|
|
54
|
+
w.writeUInt16(a);
|
|
55
|
+
return w.toBuffer();
|
|
56
|
+
}
|
|
57
|
+
/** Build ALPN extension data. */
|
|
58
|
+
export function alpnData(protocols) {
|
|
59
|
+
let totalLen = 0;
|
|
60
|
+
const bufs = protocols.map((p) => {
|
|
61
|
+
const b = Buffer.from(p, 'ascii');
|
|
62
|
+
totalLen += 1 + b.length;
|
|
63
|
+
return b;
|
|
64
|
+
});
|
|
65
|
+
const w = new BufferWriter(2 + totalLen);
|
|
66
|
+
w.writeUInt16(totalLen);
|
|
67
|
+
for (const b of bufs) {
|
|
68
|
+
w.writeUInt8(b.length);
|
|
69
|
+
w.writeBytes(b);
|
|
70
|
+
}
|
|
71
|
+
return w.toBuffer();
|
|
72
|
+
}
|
|
73
|
+
/** Build compress_certificate extension data. */
|
|
74
|
+
export function compressCertData(algorithms) {
|
|
75
|
+
const w = new BufferWriter(1 + algorithms.length * 2);
|
|
76
|
+
w.writeUInt8(algorithms.length * 2);
|
|
77
|
+
for (const a of algorithms)
|
|
78
|
+
w.writeUInt16(a);
|
|
79
|
+
return w.toBuffer();
|
|
80
|
+
}
|
|
81
|
+
/** Build psk_key_exchange_modes extension data. */
|
|
82
|
+
export function pskKeyExchangeModesData(modes) {
|
|
83
|
+
const w = new BufferWriter(1 + modes.length);
|
|
84
|
+
w.writeUInt8(modes.length);
|
|
85
|
+
for (const m of modes)
|
|
86
|
+
w.writeUInt8(m);
|
|
87
|
+
return w.toBuffer();
|
|
88
|
+
}
|
|
89
|
+
/** Build key_share extension data. Actual key material is filled at
|
|
90
|
+
* handshake time; this returns a placeholder structure with the
|
|
91
|
+
* correct groups. */
|
|
92
|
+
export function keySharePlaceholder(groups) {
|
|
93
|
+
// We will compute real key shares at handshake time.
|
|
94
|
+
// For fingerprinting purposes this is not hashed into JA3.
|
|
95
|
+
return Buffer.alloc(0);
|
|
96
|
+
}
|
|
97
|
+
/** Status request (OCSP) extension data -- single responder, no IDs,
|
|
98
|
+
* no extensions (the common case). */
|
|
99
|
+
export function statusRequestData() {
|
|
100
|
+
const w = new BufferWriter(5);
|
|
101
|
+
w.writeUInt8(1); // status_type = ocsp
|
|
102
|
+
w.writeUInt16(0); // responder_id_list length
|
|
103
|
+
w.writeUInt16(0); // request_extensions length
|
|
104
|
+
return w.toBuffer();
|
|
105
|
+
}
|
|
106
|
+
/** Session ticket extension data (empty, requests new ticket). */
|
|
107
|
+
export function sessionTicketData() {
|
|
108
|
+
return Buffer.alloc(0);
|
|
109
|
+
}
|
|
110
|
+
/** Extended master secret extension (empty data). */
|
|
111
|
+
export function extendedMasterSecretData() {
|
|
112
|
+
return Buffer.alloc(0);
|
|
113
|
+
}
|
|
114
|
+
/** Renegotiation info extension (initial handshake -- single 0 byte). */
|
|
115
|
+
export function renegotiationInfoData() {
|
|
116
|
+
return Buffer.from([0]);
|
|
117
|
+
}
|
|
118
|
+
/** Signed certificate timestamp extension (empty request). */
|
|
119
|
+
export function sctData() {
|
|
120
|
+
return Buffer.alloc(0);
|
|
121
|
+
}
|
|
122
|
+
/** Record size limit extension data. */
|
|
123
|
+
export function recordSizeLimitData(limit) {
|
|
124
|
+
const w = new BufferWriter(2);
|
|
125
|
+
w.writeUInt16(limit);
|
|
126
|
+
return w.toBuffer();
|
|
127
|
+
}
|
|
128
|
+
/** Delegated credentials extension data. */
|
|
129
|
+
export function delegatedCredentialsData(sigAlgs) {
|
|
130
|
+
const w = new BufferWriter(2 + sigAlgs.length * 2);
|
|
131
|
+
w.writeUInt16(sigAlgs.length * 2);
|
|
132
|
+
for (const a of sigAlgs)
|
|
133
|
+
w.writeUInt16(a);
|
|
134
|
+
return w.toBuffer();
|
|
135
|
+
}
|
|
136
|
+
/** Application settings (ALPS) extension data. */
|
|
137
|
+
export function applicationSettingsData(protocols) {
|
|
138
|
+
let totalLen = 0;
|
|
139
|
+
const bufs = protocols.map((p) => {
|
|
140
|
+
const b = Buffer.from(p, 'ascii');
|
|
141
|
+
totalLen += 2 + b.length;
|
|
142
|
+
return b;
|
|
143
|
+
});
|
|
144
|
+
const w = new BufferWriter(2 + totalLen);
|
|
145
|
+
w.writeUInt16(totalLen);
|
|
146
|
+
for (const b of bufs) {
|
|
147
|
+
w.writeUInt16(b.length);
|
|
148
|
+
w.writeBytes(b);
|
|
149
|
+
}
|
|
150
|
+
return w.toBuffer();
|
|
151
|
+
}
|
|
152
|
+
/** Encrypted client hello (ECH) -- outer extension with a GREASE
|
|
153
|
+
* payload so the extension shows in the fingerprint but does not
|
|
154
|
+
* require real ECH config. */
|
|
155
|
+
export function echGreaseData() {
|
|
156
|
+
// Type = outer (0), followed by a random GREASE cipher suite and
|
|
157
|
+
// dummy payload. This mirrors Chrome's GREASE ECH behavior.
|
|
158
|
+
const w = new BufferWriter(8 + 32);
|
|
159
|
+
w.writeUInt8(0); // ECHClientHelloType = outer
|
|
160
|
+
// HpkeCipherSuite
|
|
161
|
+
w.writeUInt16(0x0020); // KEM: DHKEM(X25519, HKDF-SHA256)
|
|
162
|
+
w.writeUInt16(0x0001); // KDF: HKDF-SHA256
|
|
163
|
+
w.writeUInt16(0x0001); // AEAD: AES-128-GCM
|
|
164
|
+
w.writeUInt8(0); // config_id
|
|
165
|
+
w.writeUInt16(32); // enc length
|
|
166
|
+
const enc = Buffer.alloc(32);
|
|
167
|
+
// Fill with random-looking but deterministic bytes for GREASE
|
|
168
|
+
for (let i = 0; i < 32; i++)
|
|
169
|
+
enc[i] = (i * 37 + 7) & 0xff;
|
|
170
|
+
w.writeBytes(enc);
|
|
171
|
+
w.writeUInt16(16); // payload length
|
|
172
|
+
const payload = Buffer.alloc(16);
|
|
173
|
+
for (let i = 0; i < 16; i++)
|
|
174
|
+
payload[i] = (i * 53 + 13) & 0xff;
|
|
175
|
+
w.writeBytes(payload);
|
|
176
|
+
return w.toBuffer();
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=extensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.js","sourceRoot":"","sources":["../../src/fingerprints/extensions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAYzD,oBAAoB;AAEpB,qDAAqD;AACrD,MAAM,UAAU,OAAO,CAAC,QAAgB;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AAG,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC7B,8DAA8D;IAC9D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE;QAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;IAC1D,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB;IACpC,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE;QAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC;IAC/D,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACtB,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JA3 and JA3N fingerprint computation.
|
|
3
|
+
*
|
|
4
|
+
* JA3 hashes the TLS ClientHello parameters into a stable identifier
|
|
5
|
+
* that fingerprint detection systems use to identify client software.
|
|
6
|
+
*
|
|
7
|
+
* JA3 format: SSLVersion,Ciphers,Extensions,EllipticCurves,EllipticCurvePointFormats
|
|
8
|
+
* Each field is a dash-separated list of decimal values.
|
|
9
|
+
*
|
|
10
|
+
* GREASE values (RFC 8701) are excluded from the hash, matching the
|
|
11
|
+
* canonical JA3 specification.
|
|
12
|
+
*/
|
|
13
|
+
import type { TLSProfile } from './types.js';
|
|
14
|
+
/**
|
|
15
|
+
* Build the raw JA3 string from TLS profile parameters.
|
|
16
|
+
*
|
|
17
|
+
* The string is not hashed -- call `ja3Hash` for the MD5 digest.
|
|
18
|
+
*/
|
|
19
|
+
export declare function ja3String(profile: TLSProfile): string;
|
|
20
|
+
/**
|
|
21
|
+
* Compute the JA3 hash (MD5 of the JA3 string).
|
|
22
|
+
*/
|
|
23
|
+
export declare function ja3Hash(profile: TLSProfile): string;
|
|
24
|
+
/**
|
|
25
|
+
* Compute JA3N (normalized) hash.
|
|
26
|
+
*
|
|
27
|
+
* JA3N sorts the cipher suites and extensions before hashing,
|
|
28
|
+
* reducing sensitivity to ordering differences.
|
|
29
|
+
*/
|
|
30
|
+
export declare function ja3nString(profile: TLSProfile): string;
|
|
31
|
+
export declare function ja3nHash(profile: TLSProfile): string;
|
|
32
|
+
//# sourceMappingURL=ja3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ja3.d.ts","sourceRoot":"","sources":["../../src/fingerprints/ja3.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAY7C;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAUrD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEnD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAgBtD;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEpD"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JA3 and JA3N fingerprint computation.
|
|
3
|
+
*
|
|
4
|
+
* JA3 hashes the TLS ClientHello parameters into a stable identifier
|
|
5
|
+
* that fingerprint detection systems use to identify client software.
|
|
6
|
+
*
|
|
7
|
+
* JA3 format: SSLVersion,Ciphers,Extensions,EllipticCurves,EllipticCurvePointFormats
|
|
8
|
+
* Each field is a dash-separated list of decimal values.
|
|
9
|
+
*
|
|
10
|
+
* GREASE values (RFC 8701) are excluded from the hash, matching the
|
|
11
|
+
* canonical JA3 specification.
|
|
12
|
+
*/
|
|
13
|
+
import { createHash } from 'node:crypto';
|
|
14
|
+
import { GREASE_VALUES } from '../tls/constants.js';
|
|
15
|
+
const GREASE_SET = new Set(GREASE_VALUES);
|
|
16
|
+
function isGrease(value) {
|
|
17
|
+
return GREASE_SET.has(value);
|
|
18
|
+
}
|
|
19
|
+
function filterGrease(values) {
|
|
20
|
+
return values.filter((v) => !isGrease(v));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Build the raw JA3 string from TLS profile parameters.
|
|
24
|
+
*
|
|
25
|
+
* The string is not hashed -- call `ja3Hash` for the MD5 digest.
|
|
26
|
+
*/
|
|
27
|
+
export function ja3String(profile) {
|
|
28
|
+
const version = profile.clientVersion;
|
|
29
|
+
const ciphers = filterGrease(profile.cipherSuites).join('-');
|
|
30
|
+
const extensions = filterGrease(profile.extensions.map((e) => e.type)).join('-');
|
|
31
|
+
const groups = filterGrease(profile.supportedGroups).join('-');
|
|
32
|
+
const formats = (profile.ecPointFormats ?? []).join('-');
|
|
33
|
+
return `${version},${ciphers},${extensions},${groups},${formats}`;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Compute the JA3 hash (MD5 of the JA3 string).
|
|
37
|
+
*/
|
|
38
|
+
export function ja3Hash(profile) {
|
|
39
|
+
return createHash('md5').update(ja3String(profile)).digest('hex');
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Compute JA3N (normalized) hash.
|
|
43
|
+
*
|
|
44
|
+
* JA3N sorts the cipher suites and extensions before hashing,
|
|
45
|
+
* reducing sensitivity to ordering differences.
|
|
46
|
+
*/
|
|
47
|
+
export function ja3nString(profile) {
|
|
48
|
+
const version = profile.clientVersion;
|
|
49
|
+
const ciphers = filterGrease(profile.cipherSuites)
|
|
50
|
+
.sort((a, b) => a - b)
|
|
51
|
+
.join('-');
|
|
52
|
+
const extensions = filterGrease(profile.extensions.map((e) => e.type))
|
|
53
|
+
.sort((a, b) => a - b)
|
|
54
|
+
.join('-');
|
|
55
|
+
const groups = filterGrease(profile.supportedGroups)
|
|
56
|
+
.sort((a, b) => a - b)
|
|
57
|
+
.join('-');
|
|
58
|
+
const formats = (profile.ecPointFormats ?? []).sort((a, b) => a - b).join('-');
|
|
59
|
+
return `${version},${ciphers},${extensions},${groups},${formats}`;
|
|
60
|
+
}
|
|
61
|
+
export function ja3nHash(profile) {
|
|
62
|
+
return createHash('md5').update(ja3nString(profile)).digest('hex');
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=ja3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ja3.js","sourceRoot":"","sources":["../../src/fingerprints/ja3.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,MAAM,UAAU,GAAwB,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC;AAE/D,SAAS,QAAQ,CAAC,KAAa;IAC7B,OAAO,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,YAAY,CAAC,MAAgB;IACpC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAmB;IAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;IACtC,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7D,MAAM,UAAU,GAAG,YAAY,CAC7B,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAA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AG,CAAC,CAAC;SACrB,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE/E,OAAO,GAAG,OAAO,IAAI,OAAO,IAAI,UAAU,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,OAAmB;IAC1C,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chrome browser fingerprint profiles.
|
|
3
|
+
*
|
|
4
|
+
* Each profile captures the exact TLS ClientHello extension order,
|
|
5
|
+
* cipher suite list, HTTP/2 settings, and default header set produced
|
|
6
|
+
* by that Chrome version. Values were derived from real browser
|
|
7
|
+
* captures and the curl-impersonate project.
|
|
8
|
+
*/
|
|
9
|
+
import type { BrowserProfile } from '../types.js';
|
|
10
|
+
export declare const chrome99: BrowserProfile;
|
|
11
|
+
export declare const chrome100: BrowserProfile;
|
|
12
|
+
export declare const chrome101: BrowserProfile;
|
|
13
|
+
export declare const chrome104: BrowserProfile;
|
|
14
|
+
export declare const chrome107: BrowserProfile;
|
|
15
|
+
export declare const chrome110: BrowserProfile;
|
|
16
|
+
export declare const chrome116: BrowserProfile;
|
|
17
|
+
export declare const chrome119: BrowserProfile;
|
|
18
|
+
export declare const chrome120: BrowserProfile;
|
|
19
|
+
export declare const chrome123: BrowserProfile;
|
|
20
|
+
export declare const chrome124: BrowserProfile;
|
|
21
|
+
export declare const chrome126: BrowserProfile;
|
|
22
|
+
export declare const chrome127: BrowserProfile;
|
|
23
|
+
export declare const chrome131: BrowserProfile;
|
|
24
|
+
export declare const chrome133: BrowserProfile;
|
|
25
|
+
export declare const chrome136: BrowserProfile;
|
|
26
|
+
/** Default (latest) Chrome profile. */
|
|
27
|
+
export declare const chromeLatest: BrowserProfile;
|
|
28
|
+
/** All Chrome profiles in a map keyed by canonical name. */
|
|
29
|
+
export declare const chromeProfiles: ReadonlyMap<string, BrowserProfile>;
|
|
30
|
+
//# sourceMappingURL=chrome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/fingerprints/profiles/chrome.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,cAAc,EAMf,MAAM,aAAa,CAAC;AAiMrB,eAAO,MAAM,QAAQ,gBAA4C,CAAC;AAClE,eAAO,MAAM,SAAS,gBAA8C,CAAC;AACrE,eAAO,MAAM,SAAS,gBAA8C,CAAC;AACrE,eAAO,MAAM,SAAS,gBAA8C,CAAC;AACrE,eAAO,MAAM,SAAS,gBAA+C,CAAC;AACtE,eAAO,MAAM,SAAS,gBAA+C,CAAC;AACtE,eAAO,MAAM,SAAS,gBAA8D,CAAC;AACrF,eAAO,MAAM,SAAS,gBAA+D,CAAC;AACtF,eAAO,MAAM,SAAS,gBAA0E,CAAC;AACjG,eAAO,MAAM,SAAS,gBAAyE,CAAC;AAChG,eAAO,MAAM,SAAS,gBAAyE,CAAC;AAChG,eAAO,MAAM,SAAS,gBAAyE,CAAC;AAChG,eAAO,MAAM,SAAS,gBAAyE,CAAC;AAChG,eAAO,MAAM,SAAS,gBAAyE,CAAC;AAChG,eAAO,MAAM,SAAS,gBAAyE,CAAC;AAChG,eAAO,MAAM,SAAS,gBAAyE,CAAC;AAEhG,uCAAuC;AACvC,eAAO,MAAM,YAAY,gBAAY,CAAC;AAEtC,4DAA4D;AAC5D,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAkB7D,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chrome browser fingerprint profiles.
|
|
3
|
+
*
|
|
4
|
+
* Each profile captures the exact TLS ClientHello extension order,
|
|
5
|
+
* cipher suite list, HTTP/2 settings, and default header set produced
|
|
6
|
+
* by that Chrome version. Values were derived from real browser
|
|
7
|
+
* captures and the curl-impersonate project.
|
|
8
|
+
*/
|
|
9
|
+
import { CipherSuite, ExtensionType, NamedGroup, SignatureScheme, ECPointFormat, PskKeyExchangeMode, CertCompressAlg, ProtocolVersion, } from '../../tls/constants.js';
|
|
10
|
+
import * as ext from '../extensions.js';
|
|
11
|
+
// ---- Shared constants ----
|
|
12
|
+
const CHROME_CIPHER_SUITES = [
|
|
13
|
+
CipherSuite.TLS_AES_128_GCM_SHA256,
|
|
14
|
+
CipherSuite.TLS_AES_256_GCM_SHA384,
|
|
15
|
+
CipherSuite.TLS_CHACHA20_POLY1305_SHA256,
|
|
16
|
+
CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
|
|
17
|
+
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
|
|
18
|
+
CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
|
|
19
|
+
CipherSuite.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
|
|
20
|
+
CipherSuite.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
21
|
+
CipherSuite.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
22
|
+
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
|
|
23
|
+
CipherSuite.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
|
|
24
|
+
CipherSuite.TLS_RSA_WITH_AES_128_GCM_SHA256,
|
|
25
|
+
CipherSuite.TLS_RSA_WITH_AES_256_GCM_SHA384,
|
|
26
|
+
CipherSuite.TLS_RSA_WITH_AES_128_CBC_SHA,
|
|
27
|
+
CipherSuite.TLS_RSA_WITH_AES_256_CBC_SHA,
|
|
28
|
+
];
|
|
29
|
+
const CHROME_GROUPS = [
|
|
30
|
+
NamedGroup.X25519,
|
|
31
|
+
NamedGroup.SECP256R1,
|
|
32
|
+
NamedGroup.SECP384R1,
|
|
33
|
+
];
|
|
34
|
+
const CHROME_SIGALGS = [
|
|
35
|
+
SignatureScheme.ECDSA_SECP256R1_SHA256,
|
|
36
|
+
SignatureScheme.RSA_PSS_RSAE_SHA256,
|
|
37
|
+
SignatureScheme.RSA_PKCS1_SHA256,
|
|
38
|
+
SignatureScheme.ECDSA_SECP384R1_SHA384,
|
|
39
|
+
SignatureScheme.RSA_PSS_RSAE_SHA384,
|
|
40
|
+
SignatureScheme.RSA_PKCS1_SHA384,
|
|
41
|
+
SignatureScheme.RSA_PSS_RSAE_SHA512,
|
|
42
|
+
SignatureScheme.RSA_PKCS1_SHA512,
|
|
43
|
+
];
|
|
44
|
+
const CHROME_SUPPORTED_VERSIONS = [
|
|
45
|
+
ProtocolVersion.TLS_1_3,
|
|
46
|
+
ProtocolVersion.TLS_1_2,
|
|
47
|
+
];
|
|
48
|
+
const CHROME_KEY_SHARE_GROUPS = [
|
|
49
|
+
NamedGroup.X25519,
|
|
50
|
+
];
|
|
51
|
+
const CHROME_CERT_COMPRESS = [
|
|
52
|
+
CertCompressAlg.BROTLI,
|
|
53
|
+
];
|
|
54
|
+
const CHROME_DELEGATED_CREDS = [
|
|
55
|
+
SignatureScheme.ECDSA_SECP256R1_SHA256,
|
|
56
|
+
SignatureScheme.RSA_PSS_RSAE_SHA256,
|
|
57
|
+
SignatureScheme.RSA_PSS_RSAE_SHA384,
|
|
58
|
+
SignatureScheme.RSA_PSS_RSAE_SHA512,
|
|
59
|
+
];
|
|
60
|
+
// ---- Extension ordering (Chrome 120+) ----
|
|
61
|
+
function chromeExtensions(opts) {
|
|
62
|
+
const list = [
|
|
63
|
+
{ type: ExtensionType.SERVER_NAME, data: ext.sniData },
|
|
64
|
+
{ type: ExtensionType.EXTENDED_MASTER_SECRET, data: () => ext.extendedMasterSecretData() },
|
|
65
|
+
{ type: ExtensionType.RENEGOTIATION_INFO, data: () => ext.renegotiationInfoData() },
|
|
66
|
+
{ type: ExtensionType.SUPPORTED_GROUPS, data: () => ext.supportedGroupsData(CHROME_GROUPS) },
|
|
67
|
+
{ type: ExtensionType.EC_POINT_FORMATS, data: () => ext.ecPointFormatsData([ECPointFormat.UNCOMPRESSED]) },
|
|
68
|
+
{ type: ExtensionType.SESSION_TICKET, data: () => ext.sessionTicketData() },
|
|
69
|
+
{ type: ExtensionType.APPLICATION_LAYER_PROTOCOL_NEGOTIATION, data: () => ext.alpnData(['h2', 'http/1.1']) },
|
|
70
|
+
{ type: ExtensionType.STATUS_REQUEST, data: () => ext.statusRequestData() },
|
|
71
|
+
{ type: ExtensionType.SIGNATURE_ALGORITHMS, data: () => ext.signatureAlgorithmsData(CHROME_SIGALGS) },
|
|
72
|
+
{ type: ExtensionType.SIGNED_CERTIFICATE_TIMESTAMP },
|
|
73
|
+
{ type: ExtensionType.KEY_SHARE, data: () => ext.keySharePlaceholder(CHROME_KEY_SHARE_GROUPS) },
|
|
74
|
+
{ type: ExtensionType.PSK_KEY_EXCHANGE_MODES, data: () => ext.pskKeyExchangeModesData([PskKeyExchangeMode.PSK_DHE_KE]) },
|
|
75
|
+
{ type: ExtensionType.SUPPORTED_VERSIONS, data: () => ext.supportedVersionsData(CHROME_SUPPORTED_VERSIONS) },
|
|
76
|
+
{ type: ExtensionType.COMPRESS_CERTIFICATE, data: () => ext.compressCertData(CHROME_CERT_COMPRESS) },
|
|
77
|
+
];
|
|
78
|
+
if (opts.alps) {
|
|
79
|
+
list.push({
|
|
80
|
+
type: ExtensionType.APPLICATION_SETTINGS,
|
|
81
|
+
data: () => ext.applicationSettingsData(['h2']),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
if (opts.ech) {
|
|
85
|
+
list.push({
|
|
86
|
+
type: ExtensionType.ENCRYPTED_CLIENT_HELLO,
|
|
87
|
+
data: () => ext.echGreaseData(),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
// delegated_credentials is placed near the end
|
|
91
|
+
list.push({
|
|
92
|
+
type: ExtensionType.DELEGATED_CREDENTIALS,
|
|
93
|
+
data: () => ext.delegatedCredentialsData(CHROME_DELEGATED_CREDS),
|
|
94
|
+
});
|
|
95
|
+
return list;
|
|
96
|
+
}
|
|
97
|
+
// ---- HTTP/2 settings (Chrome) ----
|
|
98
|
+
const CHROME_H2_SETTINGS = [
|
|
99
|
+
{ id: 1, value: 65536 }, // HEADER_TABLE_SIZE
|
|
100
|
+
{ id: 2, value: 0 }, // ENABLE_PUSH (disabled)
|
|
101
|
+
{ id: 4, value: 6291456 }, // INITIAL_WINDOW_SIZE
|
|
102
|
+
{ id: 6, value: 262144 }, // MAX_HEADER_LIST_SIZE
|
|
103
|
+
];
|
|
104
|
+
const CHROME_H2 = {
|
|
105
|
+
settings: CHROME_H2_SETTINGS,
|
|
106
|
+
windowUpdate: 15663105,
|
|
107
|
+
pseudoHeaderOrder: [':method', ':authority', ':scheme', ':path'],
|
|
108
|
+
priorityFrames: [],
|
|
109
|
+
};
|
|
110
|
+
// ---- Shared header template ----
|
|
111
|
+
function chromeHeaders(version) {
|
|
112
|
+
const ua = `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${version} Safari/537.36`;
|
|
113
|
+
return {
|
|
114
|
+
userAgent: ua,
|
|
115
|
+
headers: [
|
|
116
|
+
['sec-ch-ua-platform', '"Windows"'],
|
|
117
|
+
['user-agent', ua],
|
|
118
|
+
['sec-ch-ua', `"Chromium";v="${version.split('.')[0]}", "Not=A?Brand";v="8", "Google Chrome";v="${version.split('.')[0]}"`],
|
|
119
|
+
['sec-ch-ua-mobile', '?0'],
|
|
120
|
+
['accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7'],
|
|
121
|
+
['sec-fetch-site', 'none'],
|
|
122
|
+
['sec-fetch-mode', 'navigate'],
|
|
123
|
+
['sec-fetch-user', '?1'],
|
|
124
|
+
['sec-fetch-dest', 'document'],
|
|
125
|
+
['accept-encoding', 'gzip, deflate, br, zstd'],
|
|
126
|
+
['accept-language', 'en-US,en;q=0.9'],
|
|
127
|
+
],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
// ---- Shared TLS template ----
|
|
131
|
+
function chromeTLS(opts = {}) {
|
|
132
|
+
return {
|
|
133
|
+
recordVersion: ProtocolVersion.TLS_1_0,
|
|
134
|
+
clientVersion: ProtocolVersion.TLS_1_2,
|
|
135
|
+
cipherSuites: CHROME_CIPHER_SUITES,
|
|
136
|
+
compressionMethods: [0],
|
|
137
|
+
extensions: chromeExtensions(opts),
|
|
138
|
+
supportedGroups: CHROME_GROUPS,
|
|
139
|
+
signatureAlgorithms: CHROME_SIGALGS,
|
|
140
|
+
alpnProtocols: ['h2', 'http/1.1'],
|
|
141
|
+
grease: true,
|
|
142
|
+
randomSessionId: true,
|
|
143
|
+
certCompressAlgorithms: CHROME_CERT_COMPRESS,
|
|
144
|
+
keyShareGroups: CHROME_KEY_SHARE_GROUPS,
|
|
145
|
+
pskKeyExchangeModes: [PskKeyExchangeMode.PSK_DHE_KE],
|
|
146
|
+
supportedVersions: CHROME_SUPPORTED_VERSIONS,
|
|
147
|
+
ecPointFormats: [ECPointFormat.UNCOMPRESSED],
|
|
148
|
+
delegatedCredentials: CHROME_DELEGATED_CREDS,
|
|
149
|
+
applicationSettings: opts.alps ? ['h2'] : undefined,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
// ---- Profile factory ----
|
|
153
|
+
function chromeProfile(name, version, opts = {}) {
|
|
154
|
+
return {
|
|
155
|
+
name,
|
|
156
|
+
browser: 'chrome',
|
|
157
|
+
version,
|
|
158
|
+
tls: chromeTLS(opts),
|
|
159
|
+
h2: CHROME_H2,
|
|
160
|
+
headers: chromeHeaders(version),
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
// ---- Exported profiles ----
|
|
164
|
+
export const chrome99 = chromeProfile('chrome99', '99.0.4844.51');
|
|
165
|
+
export const chrome100 = chromeProfile('chrome100', '100.0.4896.75');
|
|
166
|
+
export const chrome101 = chromeProfile('chrome101', '101.0.4951.67');
|
|
167
|
+
export const chrome104 = chromeProfile('chrome104', '104.0.5112.81');
|
|
168
|
+
export const chrome107 = chromeProfile('chrome107', '107.0.5304.107');
|
|
169
|
+
export const chrome110 = chromeProfile('chrome110', '110.0.5481.177');
|
|
170
|
+
export const chrome116 = chromeProfile('chrome116', '116.0.5845.96', { alps: true });
|
|
171
|
+
export const chrome119 = chromeProfile('chrome119', '119.0.6045.105', { alps: true });
|
|
172
|
+
export const chrome120 = chromeProfile('chrome120', '120.0.6099.109', { alps: true, ech: true });
|
|
173
|
+
export const chrome123 = chromeProfile('chrome123', '123.0.6312.86', { alps: true, ech: true });
|
|
174
|
+
export const chrome124 = chromeProfile('chrome124', '124.0.6367.60', { alps: true, ech: true });
|
|
175
|
+
export const chrome126 = chromeProfile('chrome126', '126.0.6478.55', { alps: true, ech: true });
|
|
176
|
+
export const chrome127 = chromeProfile('chrome127', '127.0.6533.72', { alps: true, ech: true });
|
|
177
|
+
export const chrome131 = chromeProfile('chrome131', '131.0.6778.86', { alps: true, ech: true });
|
|
178
|
+
export const chrome133 = chromeProfile('chrome133', '133.0.6943.53', { alps: true, ech: true });
|
|
179
|
+
export const chrome136 = chromeProfile('chrome136', '136.0.7103.92', { alps: true, ech: true });
|
|
180
|
+
/** Default (latest) Chrome profile. */
|
|
181
|
+
export const chromeLatest = chrome136;
|
|
182
|
+
/** All Chrome profiles in a map keyed by canonical name. */
|
|
183
|
+
export const chromeProfiles = new Map([
|
|
184
|
+
['chrome99', chrome99],
|
|
185
|
+
['chrome100', chrome100],
|
|
186
|
+
['chrome101', chrome101],
|
|
187
|
+
['chrome104', chrome104],
|
|
188
|
+
['chrome107', chrome107],
|
|
189
|
+
['chrome110', chrome110],
|
|
190
|
+
['chrome116', chrome116],
|
|
191
|
+
['chrome119', chrome119],
|
|
192
|
+
['chrome120', chrome120],
|
|
193
|
+
['chrome123', chrome123],
|
|
194
|
+
['chrome124', chrome124],
|
|
195
|
+
['chrome126', chrome126],
|
|
196
|
+
['chrome127', chrome127],
|
|
197
|
+
['chrome131', chrome131],
|
|
198
|
+
['chrome133', chrome133],
|
|
199
|
+
['chrome136', chrome136],
|
|
200
|
+
['chrome_latest', chrome136],
|
|
201
|
+
]);
|
|
202
|
+
//# sourceMappingURL=chrome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../../src/fingerprints/profiles/chrome.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,OAAO,EACL,WAAW,EACX,aAAa,EACb,UAAU,EACV,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AAExC,6BAA6B;AAE7B,MAAM,oBAAoB,GAAa;IACrC,WAAW,CAAC,sBAAsB;IAClC,WAAW,CAAC,sBAAsB;IAClC,WAAW,CAAC,4BAA4B;IACxC,WAAW,CAAC,uCAAuC;IACnD,WAAW,CAAC,qCAAqC;IACjD,WAAW,CAAC,uCAAuC;IACnD,WAAW,CAAC,qCAAqC;IACjD,WAAW,CAAC,6CAA6C;IACzD,WAAW,CAAC,2CAA2C;IACvD,WAAW,CAAC,kCAAkC;IAC9C,WAAW,CAAC,kCAAkC;IAC9C,WAAW,CAAC,+BAA+B;IAC3C,WAAW,CAAC,+BAA+B;IAC3C,WAAW,CAAC,4BAA4B;IACxC,WAAW,CAAC,4BAA4B;CACzC,CAAC;AAEF,MAAM,aAAa,GAA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,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,eAAe,EAAE,SAAS,CAAC;CAC7B,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge browser fingerprint profiles.
|
|
3
|
+
*
|
|
4
|
+
* Edge is Chromium-based, so it shares most TLS characteristics with
|
|
5
|
+
* Chrome. The primary differences are in HTTP headers (User-Agent,
|
|
6
|
+
* sec-ch-ua brand list).
|
|
7
|
+
*/
|
|
8
|
+
import type { BrowserProfile } from '../types.js';
|
|
9
|
+
export declare const edge99: BrowserProfile;
|
|
10
|
+
export declare const edge101: BrowserProfile;
|
|
11
|
+
export declare const edge126: BrowserProfile;
|
|
12
|
+
export declare const edge131: BrowserProfile;
|
|
13
|
+
export declare const edge136: BrowserProfile;
|
|
14
|
+
export declare const edgeLatest: BrowserProfile;
|
|
15
|
+
export declare const edgeProfiles: ReadonlyMap<string, BrowserProfile>;
|
|
16
|
+
//# sourceMappingURL=edge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../../src/fingerprints/profiles/edge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAA4B,MAAM,aAAa,CAAC;AA0D5E,eAAO,MAAM,MAAM,gBAAoE,CAAC;AACxF,eAAO,MAAM,OAAO,gBAAwE,CAAC;AAC7F,eAAO,MAAM,OAAO,gBAAwE,CAAC;AAC7F,eAAO,MAAM,OAAO,gBAAwE,CAAC;AAC7F,eAAO,MAAM,OAAO,gBAAwE,CAAC;AAE7F,eAAO,MAAM,UAAU,gBAAU,CAAC;AAElC,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAO3D,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge browser fingerprint profiles.
|
|
3
|
+
*
|
|
4
|
+
* Edge is Chromium-based, so it shares most TLS characteristics with
|
|
5
|
+
* Chrome. The primary differences are in HTTP headers (User-Agent,
|
|
6
|
+
* sec-ch-ua brand list).
|
|
7
|
+
*/
|
|
8
|
+
import { chromeProfiles } from './chrome.js';
|
|
9
|
+
// Edge reuses Chrome's TLS and H2 profile identically.
|
|
10
|
+
// We clone and override only the headers.
|
|
11
|
+
function edgeHeaders(edgeVersion, chromiumVersion) {
|
|
12
|
+
const ua = `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${chromiumVersion} Safari/537.36 Edg/${edgeVersion}`;
|
|
13
|
+
const major = edgeVersion.split('.')[0];
|
|
14
|
+
const chromeMajor = chromiumVersion.split('.')[0];
|
|
15
|
+
return {
|
|
16
|
+
userAgent: ua,
|
|
17
|
+
headers: [
|
|
18
|
+
['sec-ch-ua-platform', '"Windows"'],
|
|
19
|
+
['user-agent', ua],
|
|
20
|
+
['sec-ch-ua', `"Chromium";v="${chromeMajor}", "Not=A?Brand";v="8", "Microsoft Edge";v="${major}"`],
|
|
21
|
+
['sec-ch-ua-mobile', '?0'],
|
|
22
|
+
['accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7'],
|
|
23
|
+
['sec-fetch-site', 'none'],
|
|
24
|
+
['sec-fetch-mode', 'navigate'],
|
|
25
|
+
['sec-fetch-user', '?1'],
|
|
26
|
+
['sec-fetch-dest', 'document'],
|
|
27
|
+
['accept-encoding', 'gzip, deflate, br, zstd'],
|
|
28
|
+
['accept-language', 'en-US,en;q=0.9'],
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function edgeProfile(name, edgeVersion, chromiumVersion, baseChromeName) {
|
|
33
|
+
const base = chromeProfiles.get(baseChromeName);
|
|
34
|
+
if (!base) {
|
|
35
|
+
throw new Error(`Base Chrome profile "${baseChromeName}" not found for Edge profile "${name}".`);
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
name,
|
|
39
|
+
browser: 'edge',
|
|
40
|
+
version: edgeVersion,
|
|
41
|
+
tls: base.tls,
|
|
42
|
+
h2: base.h2,
|
|
43
|
+
headers: edgeHeaders(edgeVersion, chromiumVersion),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
// ---- Exported profiles ----
|
|
47
|
+
export const edge99 = edgeProfile('edge99', '99.0.1150.30', '99.0.4844.51', 'chrome99');
|
|
48
|
+
export const edge101 = edgeProfile('edge101', '101.0.1210.39', '101.0.4951.67', 'chrome101');
|
|
49
|
+
export const edge126 = edgeProfile('edge126', '126.0.2592.56', '126.0.6478.55', 'chrome126');
|
|
50
|
+
export const edge131 = edgeProfile('edge131', '131.0.2903.63', '131.0.6778.86', 'chrome131');
|
|
51
|
+
export const edge136 = edgeProfile('edge136', '136.0.3240.50', '136.0.7103.92', 'chrome136');
|
|
52
|
+
export const edgeLatest = edge136;
|
|
53
|
+
export const edgeProfiles = new Map([
|
|
54
|
+
['edge99', edge99],
|
|
55
|
+
['edge101', edge101],
|
|
56
|
+
['edge126', edge126],
|
|
57
|
+
['edge131', edge131],
|
|
58
|
+
['edge136', edge136],
|
|
59
|
+
['edge_latest', edge136],
|
|
60
|
+
]);
|
|
61
|
+
//# sourceMappingURL=edge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../../src/fingerprints/profiles/edge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAWH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,uDAAuD;AACvD,0CAA0C;AAE1C,SAAS,WAAW,CAAC,WAAmB,EAAE,eAAuB;IAC/D,MAAM,EAAE,GAAG,2FAA2F,eAAe,sBAAsB,WAAW,EAAE,CAAC;IACzJ,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,OAAO;QACL,SAAS,EAAE,EAAE;QACb,OAAO,EAAE;YACP,CAAC,oBAAoB,EAAE,WAAW,CAAC;YACnC,CAAC,YAAY,EAAE,EAAE,CAAC;YAClB,CAAC,WAAW,EAAE,iBAAiB,WAAW,+CAA+C,KAAK,GAAG,CAAC;YAClG,CAAC,kBAAkB,EAAE,IAAI,CAAC;YAC1B,CAAC,QAAQ,EAAE,yIAAyI,CAAC;YACrJ,CAAC,gBAAgB,EAAE,MAAM,CAAC;YAC1B,CAAC,gBAAgB,EAAE,UAAU,CAAC;YAC9B,CAAC,gBAAgB,EAAE,IAAI,CAAC;YACxB,CAAC,gBAAgB,EAAE,UAAU,CAAC;YAC9B,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;YAC9C,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;SACtC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAClB,IAAY,EACZ,WAAmB,EACnB,eAAuB,EACvB,cAAsB;IAEtB,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG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AAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Firefox browser fingerprint profiles.
|
|
3
|
+
*/
|
|
4
|
+
import type { BrowserProfile } from '../types.js';
|
|
5
|
+
export declare const firefox133: BrowserProfile;
|
|
6
|
+
export declare const firefox134: BrowserProfile;
|
|
7
|
+
export declare const firefox135: BrowserProfile;
|
|
8
|
+
export declare const firefox136: BrowserProfile;
|
|
9
|
+
export declare const firefox137: BrowserProfile;
|
|
10
|
+
export declare const firefox138: BrowserProfile;
|
|
11
|
+
export declare const firefoxLatest: BrowserProfile;
|
|
12
|
+
export declare const firefoxProfiles: ReadonlyMap<string, BrowserProfile>;
|
|
13
|
+
//# sourceMappingURL=firefox.d.ts.map
|