nlcurl 0.6.0 → 0.8.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/README.md +143 -140
- package/dist/cache/groups.d.ts +75 -0
- package/dist/cache/groups.d.ts.map +1 -0
- package/dist/cache/groups.js +118 -0
- package/dist/cache/groups.js.map +1 -0
- package/dist/cache/no-vary-search.d.ts +33 -0
- package/dist/cache/no-vary-search.d.ts.map +1 -0
- package/dist/cache/no-vary-search.js +148 -0
- package/dist/cache/no-vary-search.js.map +1 -0
- package/dist/cache/range.d.ts +120 -0
- package/dist/cache/range.d.ts.map +1 -0
- package/dist/cache/range.js +193 -0
- package/dist/cache/range.js.map +1 -0
- package/dist/cache/store.d.ts +111 -0
- package/dist/cache/store.d.ts.map +1 -0
- package/dist/cache/store.js +414 -0
- package/dist/cache/store.js.map +1 -0
- package/dist/cache/types.d.ts +69 -0
- package/dist/cache/types.d.ts.map +1 -0
- package/dist/cache/types.js +2 -0
- package/dist/cache/types.js.map +1 -0
- package/dist/cli/args.d.ts +4 -37
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +3 -4
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/index.d.ts +0 -5
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/output.d.ts +14 -20
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +14 -20
- package/dist/cli/output.js.map +1 -1
- package/dist/cookies/jar.d.ts +33 -31
- package/dist/cookies/jar.d.ts.map +1 -1
- package/dist/cookies/jar.js +69 -33
- package/dist/cookies/jar.js.map +1 -1
- package/dist/cookies/parser.d.ts +14 -16
- package/dist/cookies/parser.d.ts.map +1 -1
- package/dist/cookies/parser.js +30 -13
- package/dist/cookies/parser.js.map +1 -1
- package/dist/cookies/psl-data.d.ts +1 -1
- package/dist/cookies/psl-data.js +1 -1
- package/dist/cookies/public-suffix.d.ts +5 -27
- package/dist/cookies/public-suffix.d.ts.map +1 -1
- package/dist/cookies/public-suffix.js +5 -37
- package/dist/cookies/public-suffix.js.map +1 -1
- package/dist/core/auth.d.ts +30 -0
- package/dist/core/auth.d.ts.map +1 -0
- package/dist/core/auth.js +34 -0
- package/dist/core/auth.js.map +1 -0
- package/dist/core/client.d.ts +28 -40
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/client.js +34 -41
- package/dist/core/client.js.map +1 -1
- package/dist/core/errors.d.ts +64 -88
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +64 -88
- package/dist/core/errors.js.map +1 -1
- package/dist/core/request.d.ts +63 -85
- package/dist/core/request.d.ts.map +1 -1
- package/dist/core/response.d.ts +64 -59
- package/dist/core/response.d.ts.map +1 -1
- package/dist/core/response.js +70 -52
- package/dist/core/response.js.map +1 -1
- package/dist/core/session.d.ts +81 -70
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js +198 -71
- package/dist/core/session.js.map +1 -1
- package/dist/core/validation.d.ts +44 -42
- package/dist/core/validation.d.ts.map +1 -1
- package/dist/core/validation.js +47 -58
- package/dist/core/validation.js.map +1 -1
- package/dist/dns/cache.d.ts +59 -0
- package/dist/dns/cache.d.ts.map +1 -0
- package/dist/dns/cache.js +99 -0
- package/dist/dns/cache.js.map +1 -0
- package/dist/dns/codec.d.ts +39 -0
- package/dist/dns/codec.d.ts.map +1 -0
- package/dist/dns/codec.js +238 -0
- package/dist/dns/codec.js.map +1 -0
- package/dist/dns/doh-resolver.d.ts +38 -0
- package/dist/dns/doh-resolver.d.ts.map +1 -0
- package/dist/dns/doh-resolver.js +191 -0
- package/dist/dns/doh-resolver.js.map +1 -0
- package/dist/dns/dot-resolver.d.ts +89 -0
- package/dist/dns/dot-resolver.d.ts.map +1 -0
- package/dist/dns/dot-resolver.js +158 -0
- package/dist/dns/dot-resolver.js.map +1 -0
- package/dist/dns/https-rr.d.ts +40 -0
- package/dist/dns/https-rr.d.ts.map +1 -0
- package/dist/dns/https-rr.js +109 -0
- package/dist/dns/https-rr.js.map +1 -0
- package/dist/dns/types.d.ts +82 -0
- package/dist/dns/types.d.ts.map +1 -0
- package/dist/dns/types.js +23 -0
- package/dist/dns/types.js.map +1 -0
- package/dist/fingerprints/akamai.d.ts +3 -11
- package/dist/fingerprints/akamai.d.ts.map +1 -1
- package/dist/fingerprints/akamai.js +3 -11
- package/dist/fingerprints/akamai.js.map +1 -1
- package/dist/fingerprints/database.d.ts +6 -14
- package/dist/fingerprints/database.d.ts.map +1 -1
- package/dist/fingerprints/database.js +6 -14
- package/dist/fingerprints/database.js.map +1 -1
- package/dist/fingerprints/extensions.d.ts +56 -71
- package/dist/fingerprints/extensions.d.ts.map +1 -1
- package/dist/fingerprints/extensions.js +58 -71
- package/dist/fingerprints/extensions.js.map +1 -1
- package/dist/fingerprints/ja3.d.ts +12 -30
- package/dist/fingerprints/ja3.d.ts.map +1 -1
- package/dist/fingerprints/ja3.js +12 -30
- package/dist/fingerprints/ja3.js.map +1 -1
- package/dist/fingerprints/ja4.d.ts +18 -0
- package/dist/fingerprints/ja4.d.ts.map +1 -0
- package/dist/fingerprints/ja4.js +83 -0
- package/dist/fingerprints/ja4.js.map +1 -0
- package/dist/fingerprints/profiles/chrome.d.ts +18 -21
- package/dist/fingerprints/profiles/chrome.d.ts.map +1 -1
- package/dist/fingerprints/profiles/chrome.js +35 -31
- package/dist/fingerprints/profiles/chrome.js.map +1 -1
- package/dist/fingerprints/profiles/edge.d.ts +7 -10
- package/dist/fingerprints/profiles/edge.d.ts.map +1 -1
- package/dist/fingerprints/profiles/edge.js +7 -10
- package/dist/fingerprints/profiles/edge.js.map +1 -1
- package/dist/fingerprints/profiles/firefox.d.ts +8 -11
- package/dist/fingerprints/profiles/firefox.d.ts.map +1 -1
- package/dist/fingerprints/profiles/firefox.js +8 -11
- package/dist/fingerprints/profiles/firefox.js.map +1 -1
- package/dist/fingerprints/profiles/safari.d.ts +11 -14
- package/dist/fingerprints/profiles/safari.d.ts.map +1 -1
- package/dist/fingerprints/profiles/safari.js +11 -14
- package/dist/fingerprints/profiles/safari.js.map +1 -1
- package/dist/fingerprints/profiles/tor.d.ts +5 -8
- package/dist/fingerprints/profiles/tor.d.ts.map +1 -1
- package/dist/fingerprints/profiles/tor.js +5 -8
- package/dist/fingerprints/profiles/tor.js.map +1 -1
- package/dist/fingerprints/types.d.ts +42 -73
- package/dist/fingerprints/types.d.ts.map +1 -1
- package/dist/hsts/store.d.ts +39 -0
- package/dist/hsts/store.d.ts.map +1 -0
- package/dist/hsts/store.js +163 -0
- package/dist/hsts/store.js.map +1 -0
- package/dist/hsts/types.d.ts +24 -0
- package/dist/hsts/types.d.ts.map +1 -0
- package/dist/hsts/types.js +2 -0
- package/dist/hsts/types.js.map +1 -0
- package/dist/http/alt-svc.d.ts +67 -0
- package/dist/http/alt-svc.d.ts.map +1 -0
- package/dist/http/alt-svc.js +186 -0
- package/dist/http/alt-svc.js.map +1 -0
- package/dist/http/early-hints.d.ts +23 -0
- package/dist/http/early-hints.d.ts.map +1 -0
- package/dist/http/early-hints.js +33 -0
- package/dist/http/early-hints.js.map +1 -0
- package/dist/http/form-data.d.ts +17 -35
- package/dist/http/form-data.d.ts.map +1 -1
- package/dist/http/form-data.js +12 -34
- package/dist/http/form-data.js.map +1 -1
- package/dist/http/h1/client.d.ts +14 -26
- package/dist/http/h1/client.d.ts.map +1 -1
- package/dist/http/h1/client.js +29 -22
- package/dist/http/h1/client.js.map +1 -1
- package/dist/http/h1/encoder.d.ts +10 -17
- package/dist/http/h1/encoder.d.ts.map +1 -1
- package/dist/http/h1/encoder.js +10 -17
- package/dist/http/h1/encoder.js.map +1 -1
- package/dist/http/h1/parser.d.ts +22 -59
- package/dist/http/h1/parser.d.ts.map +1 -1
- package/dist/http/h1/parser.js +15 -47
- package/dist/http/h1/parser.js.map +1 -1
- package/dist/http/h2/client.d.ts +18 -59
- package/dist/http/h2/client.d.ts.map +1 -1
- package/dist/http/h2/client.js +29 -64
- package/dist/http/h2/client.js.map +1 -1
- package/dist/http/h2/frames.d.ts +53 -84
- package/dist/http/h2/frames.d.ts.map +1 -1
- package/dist/http/h2/frames.js +48 -76
- package/dist/http/h2/frames.js.map +1 -1
- package/dist/http/h2/hpack.d.ts +16 -35
- package/dist/http/h2/hpack.d.ts.map +1 -1
- package/dist/http/h2/hpack.js +16 -35
- package/dist/http/h2/hpack.js.map +1 -1
- package/dist/http/h3/detection.d.ts +15 -0
- package/dist/http/h3/detection.d.ts.map +1 -0
- package/dist/http/h3/detection.js +41 -0
- package/dist/http/h3/detection.js.map +1 -0
- package/dist/http/negotiator.d.ts +43 -33
- package/dist/http/negotiator.d.ts.map +1 -1
- package/dist/http/negotiator.js +99 -41
- package/dist/http/negotiator.js.map +1 -1
- package/dist/http/pool.d.ts +34 -64
- package/dist/http/pool.d.ts.map +1 -1
- package/dist/http/pool.js +22 -41
- package/dist/http/pool.js.map +1 -1
- package/dist/http/resumable-upload.d.ts +76 -0
- package/dist/http/resumable-upload.d.ts.map +1 -0
- package/dist/http/resumable-upload.js +104 -0
- package/dist/http/resumable-upload.js.map +1 -0
- package/dist/http/trailers.d.ts +29 -0
- package/dist/http/trailers.d.ts.map +1 -0
- package/dist/http/trailers.js +57 -0
- package/dist/http/trailers.js.map +1 -0
- package/dist/index.d.ts +36 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -1
- package/dist/index.js.map +1 -1
- package/dist/middleware/interceptor.d.ts +13 -32
- package/dist/middleware/interceptor.d.ts.map +1 -1
- package/dist/middleware/interceptor.js +11 -16
- package/dist/middleware/interceptor.js.map +1 -1
- package/dist/middleware/rate-limiter.d.ts +8 -17
- package/dist/middleware/rate-limiter.d.ts.map +1 -1
- package/dist/middleware/rate-limiter.js +15 -12
- package/dist/middleware/rate-limiter.js.map +1 -1
- package/dist/middleware/retry-after.d.ts +15 -0
- package/dist/middleware/retry-after.d.ts.map +1 -0
- package/dist/middleware/retry-after.js +36 -0
- package/dist/middleware/retry-after.js.map +1 -0
- package/dist/middleware/retry.d.ts +9 -18
- package/dist/middleware/retry.d.ts.map +1 -1
- package/dist/middleware/retry.js +12 -9
- package/dist/middleware/retry.js.map +1 -1
- package/dist/proxy/auth.d.ts +73 -0
- package/dist/proxy/auth.d.ts.map +1 -0
- package/dist/proxy/auth.js +128 -0
- package/dist/proxy/auth.js.map +1 -0
- package/dist/proxy/env-proxy.d.ts +11 -0
- package/dist/proxy/env-proxy.d.ts.map +1 -0
- package/dist/proxy/env-proxy.js +56 -0
- package/dist/proxy/env-proxy.js.map +1 -0
- package/dist/proxy/http-proxy.d.ts +13 -18
- package/dist/proxy/http-proxy.d.ts.map +1 -1
- package/dist/proxy/http-proxy.js +24 -14
- package/dist/proxy/http-proxy.js.map +1 -1
- package/dist/proxy/socks.d.ts +13 -20
- package/dist/proxy/socks.d.ts.map +1 -1
- package/dist/proxy/socks.js +6 -9
- package/dist/proxy/socks.js.map +1 -1
- package/dist/sse/parser.d.ts +47 -0
- package/dist/sse/parser.d.ts.map +1 -0
- package/dist/sse/parser.js +139 -0
- package/dist/sse/parser.js.map +1 -0
- package/dist/tls/constants.d.ts +15 -74
- package/dist/tls/constants.d.ts.map +1 -1
- package/dist/tls/constants.js +15 -74
- package/dist/tls/constants.js.map +1 -1
- package/dist/tls/ct.d.ts +78 -0
- package/dist/tls/ct.d.ts.map +1 -0
- package/dist/tls/ct.js +175 -0
- package/dist/tls/ct.js.map +1 -0
- package/dist/tls/early-data.d.ts +45 -0
- package/dist/tls/early-data.d.ts.map +1 -0
- package/dist/tls/early-data.js +46 -0
- package/dist/tls/early-data.js.map +1 -0
- package/dist/tls/ech.d.ts +130 -0
- package/dist/tls/ech.d.ts.map +1 -0
- package/dist/tls/ech.js +353 -0
- package/dist/tls/ech.js.map +1 -0
- package/dist/tls/keylog.d.ts +34 -0
- package/dist/tls/keylog.d.ts.map +1 -0
- package/dist/tls/keylog.js +64 -0
- package/dist/tls/keylog.js.map +1 -0
- package/dist/tls/node-engine.d.ts +15 -14
- package/dist/tls/node-engine.d.ts.map +1 -1
- package/dist/tls/node-engine.js +54 -14
- package/dist/tls/node-engine.js.map +1 -1
- package/dist/tls/ocsp.d.ts +55 -0
- package/dist/tls/ocsp.d.ts.map +1 -0
- package/dist/tls/ocsp.js +131 -0
- package/dist/tls/ocsp.js.map +1 -0
- package/dist/tls/pin-verification.d.ts +10 -0
- package/dist/tls/pin-verification.d.ts.map +1 -0
- package/dist/tls/pin-verification.js +28 -0
- package/dist/tls/pin-verification.js.map +1 -0
- package/dist/tls/session-cache.d.ts +58 -0
- package/dist/tls/session-cache.d.ts.map +1 -0
- package/dist/tls/session-cache.js +76 -0
- package/dist/tls/session-cache.js.map +1 -0
- package/dist/tls/stealth/client-hello.d.ts +34 -32
- package/dist/tls/stealth/client-hello.d.ts.map +1 -1
- package/dist/tls/stealth/client-hello.js +116 -11
- package/dist/tls/stealth/client-hello.js.map +1 -1
- package/dist/tls/stealth/engine.d.ts +5 -15
- package/dist/tls/stealth/engine.d.ts.map +1 -1
- package/dist/tls/stealth/engine.js +163 -47
- package/dist/tls/stealth/engine.js.map +1 -1
- package/dist/tls/stealth/handshake.d.ts +23 -32
- package/dist/tls/stealth/handshake.d.ts.map +1 -1
- package/dist/tls/stealth/handshake.js +112 -27
- package/dist/tls/stealth/handshake.js.map +1 -1
- package/dist/tls/stealth/key-schedule.d.ts +59 -86
- package/dist/tls/stealth/key-schedule.d.ts.map +1 -1
- package/dist/tls/stealth/key-schedule.js +46 -58
- package/dist/tls/stealth/key-schedule.js.map +1 -1
- package/dist/tls/stealth/record-layer.d.ts +52 -75
- package/dist/tls/stealth/record-layer.d.ts.map +1 -1
- package/dist/tls/stealth/record-layer.js +47 -63
- package/dist/tls/stealth/record-layer.js.map +1 -1
- package/dist/tls/stealth/tls12-handshake.d.ts +30 -0
- package/dist/tls/stealth/tls12-handshake.d.ts.map +1 -0
- package/dist/tls/stealth/tls12-handshake.js +470 -0
- package/dist/tls/stealth/tls12-handshake.js.map +1 -0
- package/dist/tls/types.d.ts +46 -48
- package/dist/tls/types.d.ts.map +1 -1
- package/dist/utils/buffer-reader.d.ts +26 -81
- package/dist/utils/buffer-reader.d.ts.map +1 -1
- package/dist/utils/buffer-reader.js +26 -81
- package/dist/utils/buffer-reader.js.map +1 -1
- package/dist/utils/buffer-writer.d.ts +30 -66
- package/dist/utils/buffer-writer.d.ts.map +1 -1
- package/dist/utils/buffer-writer.js +30 -66
- package/dist/utils/buffer-writer.js.map +1 -1
- package/dist/utils/compression.d.ts +18 -0
- package/dist/utils/compression.d.ts.map +1 -0
- package/dist/utils/compression.js +34 -0
- package/dist/utils/compression.js.map +1 -0
- package/dist/utils/dictionary-transport.d.ts +97 -0
- package/dist/utils/dictionary-transport.d.ts.map +1 -0
- package/dist/utils/dictionary-transport.js +171 -0
- package/dist/utils/dictionary-transport.js.map +1 -0
- package/dist/utils/encoding.d.ts +12 -28
- package/dist/utils/encoding.d.ts.map +1 -1
- package/dist/utils/encoding.js +77 -40
- package/dist/utils/encoding.js.map +1 -1
- package/dist/utils/happy-eyeballs.d.ts +20 -7
- package/dist/utils/happy-eyeballs.d.ts.map +1 -1
- package/dist/utils/happy-eyeballs.js +57 -25
- package/dist/utils/happy-eyeballs.js.map +1 -1
- package/dist/utils/logger.d.ts +54 -81
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +92 -64
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/tcp-fast-open.d.ts +30 -0
- package/dist/utils/tcp-fast-open.d.ts.map +1 -0
- package/dist/utils/tcp-fast-open.js +36 -0
- package/dist/utils/tcp-fast-open.js.map +1 -0
- package/dist/utils/url.d.ts +18 -25
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/url.js +18 -25
- package/dist/utils/url.js.map +1 -1
- package/dist/ws/client.d.ts +35 -52
- package/dist/ws/client.d.ts.map +1 -1
- package/dist/ws/client.js +92 -37
- package/dist/ws/client.js.map +1 -1
- package/dist/ws/frame.d.ts +27 -42
- package/dist/ws/frame.d.ts.map +1 -1
- package/dist/ws/frame.js +25 -37
- package/dist/ws/frame.js.map +1 -1
- package/dist/ws/permessage-deflate.d.ts +53 -0
- package/dist/ws/permessage-deflate.d.ts.map +1 -0
- package/dist/ws/permessage-deflate.js +140 -0
- package/dist/ws/permessage-deflate.js.map +1 -0
- package/package.json +62 -62
|
@@ -1,143 +1,128 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* hostname, encoded as a TLS `HostName` name list structure per RFC 6066.
|
|
2
|
+
* Build Server Name Indication extension data.
|
|
4
3
|
*
|
|
5
|
-
* @param {string} hostname -
|
|
6
|
-
* @returns {Buffer} Encoded SNI extension
|
|
4
|
+
* @param {string} hostname - Target server hostname.
|
|
5
|
+
* @returns {Buffer} Encoded SNI extension payload.
|
|
7
6
|
*/
|
|
8
7
|
export declare function sniData(hostname: string): Buffer;
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
11
|
-
* version codes in the order provided.
|
|
9
|
+
* Build supported_versions extension data.
|
|
12
10
|
*
|
|
13
|
-
* @param {number[]} versions -
|
|
14
|
-
* @returns {Buffer} Encoded
|
|
11
|
+
* @param {number[]} versions - TLS version code points.
|
|
12
|
+
* @returns {Buffer} Encoded extension payload.
|
|
15
13
|
*/
|
|
16
14
|
export declare function supportedVersionsData(versions: number[]): Buffer;
|
|
17
15
|
/**
|
|
18
|
-
*
|
|
19
|
-
* group codes (elliptic curves and finite-field groups).
|
|
16
|
+
* Build supported_groups (named curves) extension data.
|
|
20
17
|
*
|
|
21
|
-
* @param {number[]} groups -
|
|
22
|
-
* @returns {Buffer} Encoded
|
|
18
|
+
* @param {number[]} groups - Named group code points.
|
|
19
|
+
* @returns {Buffer} Encoded extension payload.
|
|
23
20
|
*/
|
|
24
21
|
export declare function supportedGroupsData(groups: number[]): Buffer;
|
|
25
22
|
/**
|
|
26
|
-
*
|
|
27
|
-
* EC point encoding formats.
|
|
23
|
+
* Build ec_point_formats extension data.
|
|
28
24
|
*
|
|
29
|
-
* @param {number[]} formats - EC point format
|
|
30
|
-
* @returns {Buffer} Encoded
|
|
25
|
+
* @param {number[]} formats - EC point format identifiers.
|
|
26
|
+
* @returns {Buffer} Encoded extension payload.
|
|
31
27
|
*/
|
|
32
28
|
export declare function ecPointFormatsData(formats: number[]): Buffer;
|
|
33
29
|
/**
|
|
34
|
-
*
|
|
35
|
-
* signature scheme codes in the order provided.
|
|
30
|
+
* Build signature_algorithms extension data.
|
|
36
31
|
*
|
|
37
|
-
* @param {number[]} algs -
|
|
38
|
-
* @returns {Buffer} Encoded
|
|
32
|
+
* @param {number[]} algs - Signature algorithm code points.
|
|
33
|
+
* @returns {Buffer} Encoded extension payload.
|
|
39
34
|
*/
|
|
40
35
|
export declare function signatureAlgorithmsData(algs: number[]): Buffer;
|
|
41
36
|
/**
|
|
42
|
-
*
|
|
43
|
-
* advertising the given protocol name strings in preference order.
|
|
37
|
+
* Build Application-Layer Protocol Negotiation extension data.
|
|
44
38
|
*
|
|
45
|
-
* @param {string[]} protocols -
|
|
46
|
-
* @returns {Buffer} Encoded
|
|
39
|
+
* @param {string[]} protocols - ALPN protocol identifier strings.
|
|
40
|
+
* @returns {Buffer} Encoded extension payload.
|
|
47
41
|
*/
|
|
48
42
|
export declare function alpnData(protocols: string[]): Buffer;
|
|
49
43
|
/**
|
|
50
|
-
*
|
|
51
|
-
* certificate compression algorithm codes (RFC 8879).
|
|
44
|
+
* Build compress_certificate extension data.
|
|
52
45
|
*
|
|
53
|
-
* @param {number[]} algorithms -
|
|
54
|
-
* @returns {Buffer} Encoded
|
|
46
|
+
* @param {number[]} algorithms - Certificate compression algorithm identifiers.
|
|
47
|
+
* @returns {Buffer} Encoded extension payload.
|
|
55
48
|
*/
|
|
56
49
|
export declare function compressCertData(algorithms: number[]): Buffer;
|
|
57
50
|
/**
|
|
58
|
-
*
|
|
59
|
-
* supported PSK key exchange mode codes.
|
|
51
|
+
* Build psk_key_exchange_modes extension data.
|
|
60
52
|
*
|
|
61
|
-
* @param {number[]} modes - PSK key exchange mode
|
|
62
|
-
* @returns {Buffer} Encoded
|
|
53
|
+
* @param {number[]} modes - PSK key exchange mode identifiers.
|
|
54
|
+
* @returns {Buffer} Encoded extension payload.
|
|
63
55
|
*/
|
|
64
56
|
export declare function pskKeyExchangeModesData(modes: number[]): Buffer;
|
|
65
57
|
/**
|
|
66
|
-
*
|
|
67
|
-
* The actual key share data is computed and injected at ClientHello build time
|
|
68
|
-
* by the handshake engine, which needs the private keys to complete the DH.
|
|
58
|
+
* Build a key_share extension placeholder (populated later during handshake).
|
|
69
59
|
*
|
|
70
|
-
* @param {number[]} groups - Named
|
|
71
|
-
* @returns {Buffer} Empty placeholder
|
|
60
|
+
* @param {number[]} groups - Named groups to reserve key share entries for.
|
|
61
|
+
* @returns {Buffer} Empty buffer placeholder.
|
|
72
62
|
*/
|
|
73
|
-
export declare function keySharePlaceholder(
|
|
63
|
+
export declare function keySharePlaceholder(_groups: number[]): Buffer;
|
|
74
64
|
/**
|
|
75
|
-
*
|
|
76
|
-
* from the server (RFC 6066 §8).
|
|
65
|
+
* Build status_request (OCSP stapling) extension data.
|
|
77
66
|
*
|
|
78
|
-
* @returns {Buffer} Encoded
|
|
67
|
+
* @returns {Buffer} Encoded extension payload.
|
|
79
68
|
*/
|
|
80
69
|
export declare function statusRequestData(): Buffer;
|
|
81
70
|
/**
|
|
82
|
-
*
|
|
83
|
-
* that the client supports TLS session tickets but has none to present.
|
|
71
|
+
* Build an empty session_ticket extension.
|
|
84
72
|
*
|
|
85
|
-
* @returns {Buffer} Empty
|
|
73
|
+
* @returns {Buffer} Empty buffer for session ticket extension.
|
|
86
74
|
*/
|
|
87
75
|
export declare function sessionTicketData(): Buffer;
|
|
88
76
|
/**
|
|
89
|
-
*
|
|
90
|
-
* which signals support for the extended master secret computation.
|
|
77
|
+
* Build an empty extended_master_secret extension.
|
|
91
78
|
*
|
|
92
|
-
* @returns {Buffer} Empty
|
|
79
|
+
* @returns {Buffer} Empty buffer signaling extended master secret support.
|
|
93
80
|
*/
|
|
94
81
|
export declare function extendedMasterSecretData(): Buffer;
|
|
95
82
|
/**
|
|
96
|
-
*
|
|
97
|
-
* connection field, indicating that this is an initial TLS handshake (RFC 5746).
|
|
83
|
+
* Build renegotiation_info extension data.
|
|
98
84
|
*
|
|
99
|
-
* @returns {Buffer} Encoded
|
|
85
|
+
* @returns {Buffer} Encoded renegotiation info with zero-length field.
|
|
100
86
|
*/
|
|
101
87
|
export declare function renegotiationInfoData(): Buffer;
|
|
102
88
|
/**
|
|
103
|
-
*
|
|
104
|
-
* (RFC 6962), signalling SCT support without providing any timestamps.
|
|
89
|
+
* Build an empty signed_certificate_timestamp extension.
|
|
105
90
|
*
|
|
106
|
-
* @returns {Buffer} Empty SCT
|
|
91
|
+
* @returns {Buffer} Empty buffer requesting SCT data.
|
|
107
92
|
*/
|
|
108
93
|
export declare function sctData(): Buffer;
|
|
109
94
|
/**
|
|
110
|
-
*
|
|
111
|
-
* maximum plaintext record size the client is willing to receive.
|
|
95
|
+
* Build record_size_limit extension data.
|
|
112
96
|
*
|
|
113
|
-
* @param {number} limit - Maximum record size
|
|
114
|
-
* @returns {Buffer} Encoded
|
|
97
|
+
* @param {number} limit - Maximum record fragment size.
|
|
98
|
+
* @returns {Buffer} Encoded extension payload.
|
|
115
99
|
*/
|
|
116
100
|
export declare function recordSizeLimitData(limit: number): Buffer;
|
|
117
101
|
/**
|
|
118
|
-
*
|
|
119
|
-
* the signature algorithms acceptable for use with delegated credentials.
|
|
102
|
+
* Build delegated_credentials extension data.
|
|
120
103
|
*
|
|
121
|
-
* @param {number[]} sigAlgs - Signature algorithm
|
|
122
|
-
* @returns {Buffer} Encoded
|
|
104
|
+
* @param {number[]} sigAlgs - Signature algorithm code points accepted for delegated credentials.
|
|
105
|
+
* @returns {Buffer} Encoded extension payload.
|
|
123
106
|
*/
|
|
124
107
|
export declare function delegatedCredentialsData(sigAlgs: number[]): Buffer;
|
|
125
108
|
/**
|
|
126
|
-
*
|
|
127
|
-
* protocol names, a Chrome-specific extension that negotiates application-level
|
|
128
|
-
* settings over TLS.
|
|
109
|
+
* Build application_settings (ALPS) extension data.
|
|
129
110
|
*
|
|
130
|
-
* @param {string[]} protocols -
|
|
131
|
-
* @returns {Buffer} Encoded
|
|
111
|
+
* @param {string[]} protocols - Protocol identifier strings for application settings.
|
|
112
|
+
* @returns {Buffer} Encoded extension payload.
|
|
132
113
|
*/
|
|
133
114
|
export declare function applicationSettingsData(protocols: string[]): Buffer;
|
|
134
115
|
/**
|
|
135
|
-
*
|
|
136
|
-
* (draft-ietf-tls-esni). This does not perform real ECH; it emits a
|
|
137
|
-
* deterministic fake payload that matches the extension structure browsers send
|
|
138
|
-
* when the server does not advertise real ECH support.
|
|
116
|
+
* Build an Encrypted Client Hello GREASE extension.
|
|
139
117
|
*
|
|
140
|
-
* @returns {Buffer}
|
|
118
|
+
* @returns {Buffer} Deterministic ECH GREASE payload for fingerprint consistency.
|
|
141
119
|
*/
|
|
142
120
|
export declare function echGreaseData(): Buffer;
|
|
121
|
+
/**
|
|
122
|
+
* Build a padding extension of the specified length.
|
|
123
|
+
*
|
|
124
|
+
* @param {number} paddingLength - Number of zero bytes to include.
|
|
125
|
+
* @returns {Buffer} Zero-filled buffer of the requested length.
|
|
126
|
+
*/
|
|
127
|
+
export declare function paddingData(paddingLength: number): Buffer;
|
|
143
128
|
//# sourceMappingURL=extensions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/fingerprints/extensions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/fingerprints/extensions.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAShD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE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KG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEzD"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { BufferWriter } from "../utils/buffer-writer.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* hostname, encoded as a TLS `HostName` name list structure per RFC 6066.
|
|
3
|
+
* Build Server Name Indication extension data.
|
|
5
4
|
*
|
|
6
|
-
* @param {string} hostname -
|
|
7
|
-
* @returns {Buffer} Encoded SNI extension
|
|
5
|
+
* @param {string} hostname - Target server hostname.
|
|
6
|
+
* @returns {Buffer} Encoded SNI extension payload.
|
|
8
7
|
*/
|
|
9
8
|
export function sniData(hostname) {
|
|
10
9
|
const host = Buffer.from(hostname, "ascii");
|
|
@@ -17,11 +16,10 @@ export function sniData(hostname) {
|
|
|
17
16
|
return w.toBuffer();
|
|
18
17
|
}
|
|
19
18
|
/**
|
|
20
|
-
*
|
|
21
|
-
* version codes in the order provided.
|
|
19
|
+
* Build supported_versions extension data.
|
|
22
20
|
*
|
|
23
|
-
* @param {number[]} versions -
|
|
24
|
-
* @returns {Buffer} Encoded
|
|
21
|
+
* @param {number[]} versions - TLS version code points.
|
|
22
|
+
* @returns {Buffer} Encoded extension payload.
|
|
25
23
|
*/
|
|
26
24
|
export function supportedVersionsData(versions) {
|
|
27
25
|
const w = new BufferWriter(1 + versions.length * 2);
|
|
@@ -31,11 +29,10 @@ export function supportedVersionsData(versions) {
|
|
|
31
29
|
return w.toBuffer();
|
|
32
30
|
}
|
|
33
31
|
/**
|
|
34
|
-
*
|
|
35
|
-
* group codes (elliptic curves and finite-field groups).
|
|
32
|
+
* Build supported_groups (named curves) extension data.
|
|
36
33
|
*
|
|
37
|
-
* @param {number[]} groups -
|
|
38
|
-
* @returns {Buffer} Encoded
|
|
34
|
+
* @param {number[]} groups - Named group code points.
|
|
35
|
+
* @returns {Buffer} Encoded extension payload.
|
|
39
36
|
*/
|
|
40
37
|
export function supportedGroupsData(groups) {
|
|
41
38
|
const w = new BufferWriter(2 + groups.length * 2);
|
|
@@ -45,11 +42,10 @@ export function supportedGroupsData(groups) {
|
|
|
45
42
|
return w.toBuffer();
|
|
46
43
|
}
|
|
47
44
|
/**
|
|
48
|
-
*
|
|
49
|
-
* EC point encoding formats.
|
|
45
|
+
* Build ec_point_formats extension data.
|
|
50
46
|
*
|
|
51
|
-
* @param {number[]} formats - EC point format
|
|
52
|
-
* @returns {Buffer} Encoded
|
|
47
|
+
* @param {number[]} formats - EC point format identifiers.
|
|
48
|
+
* @returns {Buffer} Encoded extension payload.
|
|
53
49
|
*/
|
|
54
50
|
export function ecPointFormatsData(formats) {
|
|
55
51
|
const w = new BufferWriter(1 + formats.length);
|
|
@@ -59,11 +55,10 @@ export function ecPointFormatsData(formats) {
|
|
|
59
55
|
return w.toBuffer();
|
|
60
56
|
}
|
|
61
57
|
/**
|
|
62
|
-
*
|
|
63
|
-
* signature scheme codes in the order provided.
|
|
58
|
+
* Build signature_algorithms extension data.
|
|
64
59
|
*
|
|
65
|
-
* @param {number[]} algs -
|
|
66
|
-
* @returns {Buffer} Encoded
|
|
60
|
+
* @param {number[]} algs - Signature algorithm code points.
|
|
61
|
+
* @returns {Buffer} Encoded extension payload.
|
|
67
62
|
*/
|
|
68
63
|
export function signatureAlgorithmsData(algs) {
|
|
69
64
|
const w = new BufferWriter(2 + algs.length * 2);
|
|
@@ -73,11 +68,10 @@ export function signatureAlgorithmsData(algs) {
|
|
|
73
68
|
return w.toBuffer();
|
|
74
69
|
}
|
|
75
70
|
/**
|
|
76
|
-
*
|
|
77
|
-
* advertising the given protocol name strings in preference order.
|
|
71
|
+
* Build Application-Layer Protocol Negotiation extension data.
|
|
78
72
|
*
|
|
79
|
-
* @param {string[]} protocols -
|
|
80
|
-
* @returns {Buffer} Encoded
|
|
73
|
+
* @param {string[]} protocols - ALPN protocol identifier strings.
|
|
74
|
+
* @returns {Buffer} Encoded extension payload.
|
|
81
75
|
*/
|
|
82
76
|
export function alpnData(protocols) {
|
|
83
77
|
let totalLen = 0;
|
|
@@ -95,11 +89,10 @@ export function alpnData(protocols) {
|
|
|
95
89
|
return w.toBuffer();
|
|
96
90
|
}
|
|
97
91
|
/**
|
|
98
|
-
*
|
|
99
|
-
* certificate compression algorithm codes (RFC 8879).
|
|
92
|
+
* Build compress_certificate extension data.
|
|
100
93
|
*
|
|
101
|
-
* @param {number[]} algorithms -
|
|
102
|
-
* @returns {Buffer} Encoded
|
|
94
|
+
* @param {number[]} algorithms - Certificate compression algorithm identifiers.
|
|
95
|
+
* @returns {Buffer} Encoded extension payload.
|
|
103
96
|
*/
|
|
104
97
|
export function compressCertData(algorithms) {
|
|
105
98
|
const w = new BufferWriter(1 + algorithms.length * 2);
|
|
@@ -109,11 +102,10 @@ export function compressCertData(algorithms) {
|
|
|
109
102
|
return w.toBuffer();
|
|
110
103
|
}
|
|
111
104
|
/**
|
|
112
|
-
*
|
|
113
|
-
* supported PSK key exchange mode codes.
|
|
105
|
+
* Build psk_key_exchange_modes extension data.
|
|
114
106
|
*
|
|
115
|
-
* @param {number[]} modes - PSK key exchange mode
|
|
116
|
-
* @returns {Buffer} Encoded
|
|
107
|
+
* @param {number[]} modes - PSK key exchange mode identifiers.
|
|
108
|
+
* @returns {Buffer} Encoded extension payload.
|
|
117
109
|
*/
|
|
118
110
|
export function pskKeyExchangeModesData(modes) {
|
|
119
111
|
const w = new BufferWriter(1 + modes.length);
|
|
@@ -123,21 +115,18 @@ export function pskKeyExchangeModesData(modes) {
|
|
|
123
115
|
return w.toBuffer();
|
|
124
116
|
}
|
|
125
117
|
/**
|
|
126
|
-
*
|
|
127
|
-
* The actual key share data is computed and injected at ClientHello build time
|
|
128
|
-
* by the handshake engine, which needs the private keys to complete the DH.
|
|
118
|
+
* Build a key_share extension placeholder (populated later during handshake).
|
|
129
119
|
*
|
|
130
|
-
* @param {number[]} groups - Named
|
|
131
|
-
* @returns {Buffer} Empty placeholder
|
|
120
|
+
* @param {number[]} groups - Named groups to reserve key share entries for.
|
|
121
|
+
* @returns {Buffer} Empty buffer placeholder.
|
|
132
122
|
*/
|
|
133
|
-
export function keySharePlaceholder(
|
|
123
|
+
export function keySharePlaceholder(_groups) {
|
|
134
124
|
return Buffer.alloc(0);
|
|
135
125
|
}
|
|
136
126
|
/**
|
|
137
|
-
*
|
|
138
|
-
* from the server (RFC 6066 §8).
|
|
127
|
+
* Build status_request (OCSP stapling) extension data.
|
|
139
128
|
*
|
|
140
|
-
* @returns {Buffer} Encoded
|
|
129
|
+
* @returns {Buffer} Encoded extension payload.
|
|
141
130
|
*/
|
|
142
131
|
export function statusRequestData() {
|
|
143
132
|
const w = new BufferWriter(5);
|
|
@@ -147,47 +136,42 @@ export function statusRequestData() {
|
|
|
147
136
|
return w.toBuffer();
|
|
148
137
|
}
|
|
149
138
|
/**
|
|
150
|
-
*
|
|
151
|
-
* that the client supports TLS session tickets but has none to present.
|
|
139
|
+
* Build an empty session_ticket extension.
|
|
152
140
|
*
|
|
153
|
-
* @returns {Buffer} Empty
|
|
141
|
+
* @returns {Buffer} Empty buffer for session ticket extension.
|
|
154
142
|
*/
|
|
155
143
|
export function sessionTicketData() {
|
|
156
144
|
return Buffer.alloc(0);
|
|
157
145
|
}
|
|
158
146
|
/**
|
|
159
|
-
*
|
|
160
|
-
* which signals support for the extended master secret computation.
|
|
147
|
+
* Build an empty extended_master_secret extension.
|
|
161
148
|
*
|
|
162
|
-
* @returns {Buffer} Empty
|
|
149
|
+
* @returns {Buffer} Empty buffer signaling extended master secret support.
|
|
163
150
|
*/
|
|
164
151
|
export function extendedMasterSecretData() {
|
|
165
152
|
return Buffer.alloc(0);
|
|
166
153
|
}
|
|
167
154
|
/**
|
|
168
|
-
*
|
|
169
|
-
* connection field, indicating that this is an initial TLS handshake (RFC 5746).
|
|
155
|
+
* Build renegotiation_info extension data.
|
|
170
156
|
*
|
|
171
|
-
* @returns {Buffer} Encoded
|
|
157
|
+
* @returns {Buffer} Encoded renegotiation info with zero-length field.
|
|
172
158
|
*/
|
|
173
159
|
export function renegotiationInfoData() {
|
|
174
160
|
return Buffer.from([0]);
|
|
175
161
|
}
|
|
176
162
|
/**
|
|
177
|
-
*
|
|
178
|
-
* (RFC 6962), signalling SCT support without providing any timestamps.
|
|
163
|
+
* Build an empty signed_certificate_timestamp extension.
|
|
179
164
|
*
|
|
180
|
-
* @returns {Buffer} Empty SCT
|
|
165
|
+
* @returns {Buffer} Empty buffer requesting SCT data.
|
|
181
166
|
*/
|
|
182
167
|
export function sctData() {
|
|
183
168
|
return Buffer.alloc(0);
|
|
184
169
|
}
|
|
185
170
|
/**
|
|
186
|
-
*
|
|
187
|
-
* maximum plaintext record size the client is willing to receive.
|
|
171
|
+
* Build record_size_limit extension data.
|
|
188
172
|
*
|
|
189
|
-
* @param {number} limit - Maximum record size
|
|
190
|
-
* @returns {Buffer} Encoded
|
|
173
|
+
* @param {number} limit - Maximum record fragment size.
|
|
174
|
+
* @returns {Buffer} Encoded extension payload.
|
|
191
175
|
*/
|
|
192
176
|
export function recordSizeLimitData(limit) {
|
|
193
177
|
const w = new BufferWriter(2);
|
|
@@ -195,11 +179,10 @@ export function recordSizeLimitData(limit) {
|
|
|
195
179
|
return w.toBuffer();
|
|
196
180
|
}
|
|
197
181
|
/**
|
|
198
|
-
*
|
|
199
|
-
* the signature algorithms acceptable for use with delegated credentials.
|
|
182
|
+
* Build delegated_credentials extension data.
|
|
200
183
|
*
|
|
201
|
-
* @param {number[]} sigAlgs - Signature algorithm
|
|
202
|
-
* @returns {Buffer} Encoded
|
|
184
|
+
* @param {number[]} sigAlgs - Signature algorithm code points accepted for delegated credentials.
|
|
185
|
+
* @returns {Buffer} Encoded extension payload.
|
|
203
186
|
*/
|
|
204
187
|
export function delegatedCredentialsData(sigAlgs) {
|
|
205
188
|
const w = new BufferWriter(2 + sigAlgs.length * 2);
|
|
@@ -209,12 +192,10 @@ export function delegatedCredentialsData(sigAlgs) {
|
|
|
209
192
|
return w.toBuffer();
|
|
210
193
|
}
|
|
211
194
|
/**
|
|
212
|
-
*
|
|
213
|
-
* protocol names, a Chrome-specific extension that negotiates application-level
|
|
214
|
-
* settings over TLS.
|
|
195
|
+
* Build application_settings (ALPS) extension data.
|
|
215
196
|
*
|
|
216
|
-
* @param {string[]} protocols -
|
|
217
|
-
* @returns {Buffer} Encoded
|
|
197
|
+
* @param {string[]} protocols - Protocol identifier strings for application settings.
|
|
198
|
+
* @returns {Buffer} Encoded extension payload.
|
|
218
199
|
*/
|
|
219
200
|
export function applicationSettingsData(protocols) {
|
|
220
201
|
let totalLen = 0;
|
|
@@ -232,12 +213,9 @@ export function applicationSettingsData(protocols) {
|
|
|
232
213
|
return w.toBuffer();
|
|
233
214
|
}
|
|
234
215
|
/**
|
|
235
|
-
*
|
|
236
|
-
* (draft-ietf-tls-esni). This does not perform real ECH; it emits a
|
|
237
|
-
* deterministic fake payload that matches the extension structure browsers send
|
|
238
|
-
* when the server does not advertise real ECH support.
|
|
216
|
+
* Build an Encrypted Client Hello GREASE extension.
|
|
239
217
|
*
|
|
240
|
-
* @returns {Buffer}
|
|
218
|
+
* @returns {Buffer} Deterministic ECH GREASE payload for fingerprint consistency.
|
|
241
219
|
*/
|
|
242
220
|
export function echGreaseData() {
|
|
243
221
|
const w = new BufferWriter(8 + 32);
|
|
@@ -258,4 +236,13 @@ export function echGreaseData() {
|
|
|
258
236
|
w.writeBytes(payload);
|
|
259
237
|
return w.toBuffer();
|
|
260
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* Build a padding extension of the specified length.
|
|
241
|
+
*
|
|
242
|
+
* @param {number} paddingLength - Number of zero bytes to include.
|
|
243
|
+
* @returns {Buffer} Zero-filled buffer of the requested length.
|
|
244
|
+
*/
|
|
245
|
+
export function paddingData(paddingLength) {
|
|
246
|
+
return Buffer.alloc(Math.max(0, paddingLength));
|
|
247
|
+
}
|
|
261
248
|
//# sourceMappingURL=extensions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.js","sourceRoot":"","sources":["../../src/fingerprints/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"extensions.js","sourceRoot":"","sources":["../../src/fingerprints/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,QAAgB;IACtC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC5C,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChB,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;AACtB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAkB;IACtD,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACpD,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAClC,KAAK,MAAM,CAAC,IAAI,QAAQ;QAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAC3C,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;AACtB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAm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,EAAE,CAAC,CAAC;IAClB,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC7B,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;IAClB,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;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,aAAqB;IAC/C,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,48 +1,30 @@
|
|
|
1
1
|
import type { TLSProfile } from "./types.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* comma-separated tuple of `version`, cipher codes, extension type codes,
|
|
5
|
-
* supported-group codes, and EC point format codes, all encoded as
|
|
6
|
-
* dash-separated decimal lists (GREASE values filtered out).
|
|
3
|
+
* Generate a JA3 fingerprint string from a TLS profile.
|
|
7
4
|
*
|
|
8
|
-
* @param {TLSProfile} profile -
|
|
9
|
-
* @returns {string}
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* const str = ja3String(chromeLatest.tls);
|
|
13
|
-
* // => "771,4865-4866-...,0-23-...,29-23-24,0"
|
|
5
|
+
* @param {TLSProfile} profile - TLS profile to fingerprint.
|
|
6
|
+
* @returns {string} Comma-separated JA3 string of version, ciphers, extensions, groups, and point formats.
|
|
14
7
|
*/
|
|
15
8
|
export declare function ja3String(profile: TLSProfile): string;
|
|
16
9
|
/**
|
|
17
|
-
*
|
|
18
|
-
* The resulting 32-character hex digest is the canonical JA3 fingerprint
|
|
19
|
-
* used in network monitoring and fingerprinting detection.
|
|
20
|
-
*
|
|
21
|
-
* @param {TLSProfile} profile - The TLS profile to fingerprint.
|
|
22
|
-
* @returns {string} The 32-character lowercase hex JA3 MD5 hash.
|
|
10
|
+
* Compute the MD5 hash of the JA3 fingerprint string.
|
|
23
11
|
*
|
|
24
|
-
* @
|
|
25
|
-
*
|
|
26
|
-
* // => "cd08e31494f9531f560d64c695473da9"
|
|
12
|
+
* @param {TLSProfile} profile - TLS profile to fingerprint.
|
|
13
|
+
* @returns {string} Hex-encoded MD5 digest.
|
|
27
14
|
*/
|
|
28
15
|
export declare function ja3Hash(profile: TLSProfile): string;
|
|
29
16
|
/**
|
|
30
|
-
*
|
|
31
|
-
* {@link ja3String}, all numeric lists are sorted before joining, which
|
|
32
|
-
* makes the fingerprint order-independent and useful for comparing profiles
|
|
33
|
-
* that advertise the same capabilities in different orders.
|
|
17
|
+
* Generate a normalized JA3 fingerprint string with sorted components.
|
|
34
18
|
*
|
|
35
|
-
* @param {TLSProfile} profile -
|
|
36
|
-
* @returns {string}
|
|
19
|
+
* @param {TLSProfile} profile - TLS profile to fingerprint.
|
|
20
|
+
* @returns {string} Comma-separated JA3n string with sorted ciphers, extensions, and groups.
|
|
37
21
|
*/
|
|
38
22
|
export declare function ja3nString(profile: TLSProfile): string;
|
|
39
23
|
/**
|
|
40
|
-
*
|
|
41
|
-
* profile. JA3N hashes are order-independent, making them suitable for
|
|
42
|
-
* grouping profiles by capability set regardless of advertisement order.
|
|
24
|
+
* Compute the MD5 hash of the normalized JA3 fingerprint string.
|
|
43
25
|
*
|
|
44
|
-
* @param {TLSProfile} profile -
|
|
45
|
-
* @returns {string}
|
|
26
|
+
* @param {TLSProfile} profile - TLS profile to fingerprint.
|
|
27
|
+
* @returns {string} Hex-encoded MD5 digest.
|
|
46
28
|
*/
|
|
47
29
|
export declare function ja3nHash(profile: TLSProfile): string;
|
|
48
30
|
//# sourceMappingURL=ja3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ja3.d.ts","sourceRoot":"","sources":["../../src/fingerprints/ja3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAY7C
|
|
1
|
+
{"version":3,"file":"ja3.d.ts","sourceRoot":"","sources":["../../src/fingerprints/ja3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAY7C;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAQrD;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEnD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CActD;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEpD"}
|
package/dist/fingerprints/ja3.js
CHANGED
|
@@ -8,17 +8,10 @@ function filterGrease(values) {
|
|
|
8
8
|
return values.filter((v) => !isGrease(v));
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* comma-separated tuple of `version`, cipher codes, extension type codes,
|
|
13
|
-
* supported-group codes, and EC point format codes, all encoded as
|
|
14
|
-
* dash-separated decimal lists (GREASE values filtered out).
|
|
11
|
+
* Generate a JA3 fingerprint string from a TLS profile.
|
|
15
12
|
*
|
|
16
|
-
* @param {TLSProfile} profile -
|
|
17
|
-
* @returns {string}
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* const str = ja3String(chromeLatest.tls);
|
|
21
|
-
* // => "771,4865-4866-...,0-23-...,29-23-24,0"
|
|
13
|
+
* @param {TLSProfile} profile - TLS profile to fingerprint.
|
|
14
|
+
* @returns {string} Comma-separated JA3 string of version, ciphers, extensions, groups, and point formats.
|
|
22
15
|
*/
|
|
23
16
|
export function ja3String(profile) {
|
|
24
17
|
const version = profile.clientVersion;
|
|
@@ -29,28 +22,19 @@ export function ja3String(profile) {
|
|
|
29
22
|
return `${version},${ciphers},${extensions},${groups},${formats}`;
|
|
30
23
|
}
|
|
31
24
|
/**
|
|
32
|
-
*
|
|
33
|
-
* The resulting 32-character hex digest is the canonical JA3 fingerprint
|
|
34
|
-
* used in network monitoring and fingerprinting detection.
|
|
35
|
-
*
|
|
36
|
-
* @param {TLSProfile} profile - The TLS profile to fingerprint.
|
|
37
|
-
* @returns {string} The 32-character lowercase hex JA3 MD5 hash.
|
|
25
|
+
* Compute the MD5 hash of the JA3 fingerprint string.
|
|
38
26
|
*
|
|
39
|
-
* @
|
|
40
|
-
*
|
|
41
|
-
* // => "cd08e31494f9531f560d64c695473da9"
|
|
27
|
+
* @param {TLSProfile} profile - TLS profile to fingerprint.
|
|
28
|
+
* @returns {string} Hex-encoded MD5 digest.
|
|
42
29
|
*/
|
|
43
30
|
export function ja3Hash(profile) {
|
|
44
31
|
return createHash("md5").update(ja3String(profile)).digest("hex");
|
|
45
32
|
}
|
|
46
33
|
/**
|
|
47
|
-
*
|
|
48
|
-
* {@link ja3String}, all numeric lists are sorted before joining, which
|
|
49
|
-
* makes the fingerprint order-independent and useful for comparing profiles
|
|
50
|
-
* that advertise the same capabilities in different orders.
|
|
34
|
+
* Generate a normalized JA3 fingerprint string with sorted components.
|
|
51
35
|
*
|
|
52
|
-
* @param {TLSProfile} profile -
|
|
53
|
-
* @returns {string}
|
|
36
|
+
* @param {TLSProfile} profile - TLS profile to fingerprint.
|
|
37
|
+
* @returns {string} Comma-separated JA3n string with sorted ciphers, extensions, and groups.
|
|
54
38
|
*/
|
|
55
39
|
export function ja3nString(profile) {
|
|
56
40
|
const version = profile.clientVersion;
|
|
@@ -67,12 +51,10 @@ export function ja3nString(profile) {
|
|
|
67
51
|
return `${version},${ciphers},${extensions},${groups},${formats}`;
|
|
68
52
|
}
|
|
69
53
|
/**
|
|
70
|
-
*
|
|
71
|
-
* profile. JA3N hashes are order-independent, making them suitable for
|
|
72
|
-
* grouping profiles by capability set regardless of advertisement order.
|
|
54
|
+
* Compute the MD5 hash of the normalized JA3 fingerprint string.
|
|
73
55
|
*
|
|
74
|
-
* @param {TLSProfile} profile -
|
|
75
|
-
* @returns {string}
|
|
56
|
+
* @param {TLSProfile} profile - TLS profile to fingerprint.
|
|
57
|
+
* @returns {string} Hex-encoded MD5 digest.
|
|
76
58
|
*/
|
|
77
59
|
export function ja3nHash(profile) {
|
|
78
60
|
return createHash("md5").update(ja3nString(profile)).digest("hex");
|