@browsercore/profiles 0.1.9 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/codes.d.ts +44 -4
- package/dist/codes.d.ts.map +1 -1
- package/dist/codes.js +44 -4
- package/dist/codes.js.map +1 -1
- package/dist/diff.d.ts +25 -1
- package/dist/diff.d.ts.map +1 -1
- package/dist/diff.js +16 -0
- package/dist/diff.js.map +1 -1
- package/dist/errors.d.ts +50 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +50 -2
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/profiles/chrome.d.ts.map +1 -1
- package/dist/profiles/chrome.js +7 -0
- package/dist/profiles/chrome.js.map +1 -1
- package/dist/profiles/edge.d.ts.map +1 -1
- package/dist/profiles/edge.js +7 -0
- package/dist/profiles/edge.js.map +1 -1
- package/dist/profiles/firefox.d.ts.map +1 -1
- package/dist/profiles/firefox.js +20 -0
- package/dist/profiles/firefox.js.map +1 -1
- package/dist/profiles/safari.d.ts.map +1 -1
- package/dist/profiles/safari.js +6 -0
- package/dist/profiles/safari.js.map +1 -1
- package/dist/registry.d.ts +57 -4
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +57 -4
- package/dist/registry.js.map +1 -1
- package/dist/types.d.ts +55 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +36 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +36 -4
- package/dist/utils.js.map +1 -1
- package/dist/validate.d.ts +62 -7
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +67 -6
- package/dist/validate.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @browsercore/profiles
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@browsercore/profiles)
|
|
4
|
-
[](https://github.com/jverneuer/browsercore-profiles/blob/main/COVERAGE.md)
|
|
5
5
|
[](https://github.com/jverneuer/browsercore-profiles/actions/workflows/ci.yml)
|
|
6
6
|
|
|
7
7
|
Browser fingerprint definitions (TLS / HTTP/2 / HTTP/1.1). Pure data — no protocol implementation lives here. Higher layers read these definitions and translate them into bytes, header order, and SETTINGS frames.
|
package/dist/codes.d.ts
CHANGED
|
@@ -4,9 +4,20 @@
|
|
|
4
4
|
* These are the canonical 2-byte codes from the IANA TLS parameter registries.
|
|
5
5
|
* Only the codes referenced by the shipped profiles are mapped here — an
|
|
6
6
|
* unknown name is a bug in a profile definition and surfaces as a
|
|
7
|
-
* {@link
|
|
7
|
+
* {@link ProfileError} at projection time, so the tables double as an
|
|
8
8
|
* allow-list that keeps profile data honest.
|
|
9
9
|
*
|
|
10
|
+
* ┌─────────────────────────────────────────────────────────────────────────┐
|
|
11
|
+
* │ DUPLICATED IN @browsercore/tls/src/iana/ │
|
|
12
|
+
* │ │
|
|
13
|
+
* │ The same IANA tables exist in @browsercore/tls (cipher-suites.ts, │
|
|
14
|
+
* │ named-groups.ts, signature-schemes.ts, versions.ts). This is │
|
|
15
|
+
* │ intentional — no dependency between the two packages. When adding a │
|
|
16
|
+
* │ new cipher suite, named group, or signature scheme, update BOTH copies. │
|
|
17
|
+
* │ The IANA TLS registries barely change (once every few years), so the │
|
|
18
|
+
* │ maintenance cost of two copies is lower than a shared package. │
|
|
19
|
+
* └─────────────────────────────────────────────────────────────────────────┘
|
|
20
|
+
*
|
|
10
21
|
* Registries:
|
|
11
22
|
* - Cipher suites: tls-parameters.xhtml#tls-parameters-4
|
|
12
23
|
* - Named groups: tls-parameters.xhtml#tls-parameters-8
|
|
@@ -16,13 +27,27 @@
|
|
|
16
27
|
* The name Chrome/Edge use in their cipher list to mark a GREASE slot (RFC 8701).
|
|
17
28
|
* The real value is randomized per-connection (0x0a0a..0xfafa); validation accepts
|
|
18
29
|
* any GREASE-pattern byte pair at a slot marked with this placeholder.
|
|
30
|
+
*
|
|
31
|
+
* @see cipherSuiteToWire which throws if an unknown name is projected.
|
|
19
32
|
*/
|
|
20
33
|
export declare const CIPHER_GREASE_PLACEHOLDER = "TLS_GREASE_RESERVED_0";
|
|
21
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Selected IANA TLS Cipher Suite codes, keyed by the canonical suite name used in profiles.
|
|
36
|
+
*
|
|
37
|
+
* Only the codes referenced by the shipped profiles are mapped here — an unknown name
|
|
38
|
+
* is a bug in a profile definition and surfaces as a {@link ProfileError} at projection
|
|
39
|
+
* time, so the table doubles as an allow-list that keeps profile data honest.
|
|
40
|
+
*
|
|
41
|
+
* @see https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4
|
|
42
|
+
*/
|
|
22
43
|
export declare const CIPHER_SUITE_CODES: Readonly<Record<string, number>>;
|
|
23
|
-
/** Selected IANA TLS Supported Groups (named groups) codes.
|
|
44
|
+
/** Selected IANA TLS Supported Groups (named groups) codes.
|
|
45
|
+
* @see https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8
|
|
46
|
+
*/
|
|
24
47
|
export declare const NAMED_GROUP_CODES: Readonly<Record<string, number>>;
|
|
25
|
-
/** Selected IANA TLS SignatureScheme codes.
|
|
48
|
+
/** Selected IANA TLS SignatureScheme codes.
|
|
49
|
+
* @see https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-16
|
|
50
|
+
*/
|
|
26
51
|
export declare const SIGNATURE_SCHEME_CODES: Readonly<Record<string, number>>;
|
|
27
52
|
/** IANA TLS ProtocolVersion codes for the supported_versions extension. */
|
|
28
53
|
export declare const VERSION_CODES: Readonly<Record<string, number>>;
|
|
@@ -35,6 +60,21 @@ export declare const VERSION_CODES: Readonly<Record<string, number>>;
|
|
|
35
60
|
* TLS_EMPTY_RENEGOTIATION_INFO_SCSV), and a silent default would hide a bug in
|
|
36
61
|
* a profile definition. An unknown name is therefore always an error here,
|
|
37
62
|
* never a 0x0000 fallback.
|
|
63
|
+
*
|
|
64
|
+
* @param name - Canonical cipher-suite name as used in a {@link TlsProfile}
|
|
65
|
+
* (e.g. `"TLS_AES_128_GCM_SHA256"`).
|
|
66
|
+
* @returns The 2-byte IANA code for the cipher suite.
|
|
67
|
+
* @throws {ProfileError} With kind `"UnknownCipherSuite"` if the name is not
|
|
68
|
+
* in {@link CIPHER_SUITE_CODES}.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* cipherSuiteToWire("TLS_AES_128_GCM_SHA256"); // 0x1301
|
|
73
|
+
* cipherSuiteToWire("TLS_GREASE_RESERVED_0"); // 0x0a0a (placeholder)
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @see CIPHER_SUITE_CODES for the full code table.
|
|
77
|
+
* @since 0.1.0
|
|
38
78
|
*/
|
|
39
79
|
export declare function cipherSuiteToWire(name: string): number;
|
|
40
80
|
//# sourceMappingURL=codes.d.ts.map
|
package/dist/codes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../src/codes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../src/codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,0BAA0B,CAAC;AAEjE;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkC/D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAY9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAanE,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK1D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMtD"}
|
package/dist/codes.js
CHANGED
|
@@ -4,9 +4,20 @@
|
|
|
4
4
|
* These are the canonical 2-byte codes from the IANA TLS parameter registries.
|
|
5
5
|
* Only the codes referenced by the shipped profiles are mapped here — an
|
|
6
6
|
* unknown name is a bug in a profile definition and surfaces as a
|
|
7
|
-
* {@link
|
|
7
|
+
* {@link ProfileError} at projection time, so the tables double as an
|
|
8
8
|
* allow-list that keeps profile data honest.
|
|
9
9
|
*
|
|
10
|
+
* ┌─────────────────────────────────────────────────────────────────────────┐
|
|
11
|
+
* │ DUPLICATED IN @browsercore/tls/src/iana/ │
|
|
12
|
+
* │ │
|
|
13
|
+
* │ The same IANA tables exist in @browsercore/tls (cipher-suites.ts, │
|
|
14
|
+
* │ named-groups.ts, signature-schemes.ts, versions.ts). This is │
|
|
15
|
+
* │ intentional — no dependency between the two packages. When adding a │
|
|
16
|
+
* │ new cipher suite, named group, or signature scheme, update BOTH copies. │
|
|
17
|
+
* │ The IANA TLS registries barely change (once every few years), so the │
|
|
18
|
+
* │ maintenance cost of two copies is lower than a shared package. │
|
|
19
|
+
* └─────────────────────────────────────────────────────────────────────────┘
|
|
20
|
+
*
|
|
10
21
|
* Registries:
|
|
11
22
|
* - Cipher suites: tls-parameters.xhtml#tls-parameters-4
|
|
12
23
|
* - Named groups: tls-parameters.xhtml#tls-parameters-8
|
|
@@ -17,9 +28,19 @@ import { ProfileError } from "./errors.js";
|
|
|
17
28
|
* The name Chrome/Edge use in their cipher list to mark a GREASE slot (RFC 8701).
|
|
18
29
|
* The real value is randomized per-connection (0x0a0a..0xfafa); validation accepts
|
|
19
30
|
* any GREASE-pattern byte pair at a slot marked with this placeholder.
|
|
31
|
+
*
|
|
32
|
+
* @see cipherSuiteToWire which throws if an unknown name is projected.
|
|
20
33
|
*/
|
|
21
34
|
export const CIPHER_GREASE_PLACEHOLDER = "TLS_GREASE_RESERVED_0";
|
|
22
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Selected IANA TLS Cipher Suite codes, keyed by the canonical suite name used in profiles.
|
|
37
|
+
*
|
|
38
|
+
* Only the codes referenced by the shipped profiles are mapped here — an unknown name
|
|
39
|
+
* is a bug in a profile definition and surfaces as a {@link ProfileError} at projection
|
|
40
|
+
* time, so the table doubles as an allow-list that keeps profile data honest.
|
|
41
|
+
*
|
|
42
|
+
* @see https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4
|
|
43
|
+
*/
|
|
23
44
|
export const CIPHER_SUITE_CODES = {
|
|
24
45
|
// GREASE: real value is randomized per-connection (0x0a0a..0xfafa). We use the
|
|
25
46
|
// first canonical GREASE code for the expected representation; validation
|
|
@@ -55,7 +76,9 @@ export const CIPHER_SUITE_CODES = {
|
|
|
55
76
|
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA: 0xc012,
|
|
56
77
|
TLS_RSA_WITH_3DES_EDE_CBC_SHA: 0x000a,
|
|
57
78
|
};
|
|
58
|
-
/** Selected IANA TLS Supported Groups (named groups) codes.
|
|
79
|
+
/** Selected IANA TLS Supported Groups (named groups) codes.
|
|
80
|
+
* @see https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8
|
|
81
|
+
*/
|
|
59
82
|
export const NAMED_GROUP_CODES = {
|
|
60
83
|
x25519: 0x001d,
|
|
61
84
|
secp256r1: 0x0017,
|
|
@@ -69,7 +92,9 @@ export const NAMED_GROUP_CODES = {
|
|
|
69
92
|
X25519Kyber768: 0x6399,
|
|
70
93
|
X25519MLKEM768: 0x11ec,
|
|
71
94
|
};
|
|
72
|
-
/** Selected IANA TLS SignatureScheme codes.
|
|
95
|
+
/** Selected IANA TLS SignatureScheme codes.
|
|
96
|
+
* @see https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-16
|
|
97
|
+
*/
|
|
73
98
|
export const SIGNATURE_SCHEME_CODES = {
|
|
74
99
|
ecdsa_secp256r1_sha256: 0x0403,
|
|
75
100
|
ecdsa_secp384r1_sha384: 0x0503,
|
|
@@ -100,6 +125,21 @@ export const VERSION_CODES = {
|
|
|
100
125
|
* TLS_EMPTY_RENEGOTIATION_INFO_SCSV), and a silent default would hide a bug in
|
|
101
126
|
* a profile definition. An unknown name is therefore always an error here,
|
|
102
127
|
* never a 0x0000 fallback.
|
|
128
|
+
*
|
|
129
|
+
* @param name - Canonical cipher-suite name as used in a {@link TlsProfile}
|
|
130
|
+
* (e.g. `"TLS_AES_128_GCM_SHA256"`).
|
|
131
|
+
* @returns The 2-byte IANA code for the cipher suite.
|
|
132
|
+
* @throws {ProfileError} With kind `"UnknownCipherSuite"` if the name is not
|
|
133
|
+
* in {@link CIPHER_SUITE_CODES}.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```ts
|
|
137
|
+
* cipherSuiteToWire("TLS_AES_128_GCM_SHA256"); // 0x1301
|
|
138
|
+
* cipherSuiteToWire("TLS_GREASE_RESERVED_0"); // 0x0a0a (placeholder)
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @see CIPHER_SUITE_CODES for the full code table.
|
|
142
|
+
* @since 0.1.0
|
|
103
143
|
*/
|
|
104
144
|
export function cipherSuiteToWire(name) {
|
|
105
145
|
const code = CIPHER_SUITE_CODES[name];
|
package/dist/codes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.js","sourceRoot":"","sources":["../src/codes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"codes.js","sourceRoot":"","sources":["../src/codes.ts"],"names":[],"mappings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IACjB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;IACjB,0EAA0E;IAC1E,2EAA2E;IAC3E,0EAA0E;IAC1E,cAAc,EAAE,MAAM;IACtB,cAAc,EAAE,MAAM;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAqC;IACpE,sBAAsB,EAAE,MAAM;IAC9B,sBAAsB,EAAE,MAAM;IAC9B,sBAAsB,EAAE,MAAM;IAC9B,UAAU,EAAE,MAAM;IAClB,mBAAmB,EAAE,MAAM;IAC3B,mBAAmB,EAAE,MAAM;IAC3B,mBAAmB,EAAE,MAAM;IAC3B,gBAAgB,EAAE,MAAM;IACxB,gBAAgB,EAAE,MAAM;IACxB,gBAAgB,EAAE,MAAM;IACxB,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,MAAM;CAClB,CAAC;AAEF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,aAAa,GAAqC;IAC3D,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC1C,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACrB,MAAM,IAAI,YAAY,CAAC,oBAAoB,EAAE,yBAAyB,IAAI,EAAE,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
package/dist/diff.d.ts
CHANGED
|
@@ -14,10 +14,18 @@ export interface DiffOptions {
|
|
|
14
14
|
/**
|
|
15
15
|
* When true (the default), arrays are compared element-by-element in order.
|
|
16
16
|
* When false, arrays are compared as multisets (order is ignored).
|
|
17
|
+
*
|
|
18
|
+
* @defaultValue true
|
|
17
19
|
*/
|
|
18
20
|
readonly compareArrayOrder?: boolean;
|
|
19
21
|
}
|
|
20
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* A single difference between two profiles, located by its dotted path.
|
|
24
|
+
*
|
|
25
|
+
* Produced by {@link diffProfiles}. `a` and `b` hold the differing values from
|
|
26
|
+
* the left- and right-hand profiles; one may be `undefined` when the path exists
|
|
27
|
+
* in only one profile.
|
|
28
|
+
*/
|
|
21
29
|
export interface ProfileDiff {
|
|
22
30
|
/** Dotted path to the differing field, e.g. "tls.cipherSuites[3]". */
|
|
23
31
|
readonly path: string;
|
|
@@ -32,6 +40,22 @@ export interface ProfileDiff {
|
|
|
32
40
|
* Returns a {@link ProfileDiff} for every differing path. The result is empty
|
|
33
41
|
* when the profiles are structurally equal. Array comparison is order-sensitive
|
|
34
42
|
* by default; pass `{ compareArrayOrder: false }` to ignore element order.
|
|
43
|
+
*
|
|
44
|
+
* @param a - The left-hand (expected/older) profile.
|
|
45
|
+
* @param b - The right-hand (actual/newer) profile.
|
|
46
|
+
* @param options - Controls array comparison behavior. Defaults to `{ compareArrayOrder: true }`.
|
|
47
|
+
* @returns An array of {@link ProfileDiff} entries, one per differing path.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const diffs = diffProfiles(chrome140, chrome141);
|
|
52
|
+
* for (const d of diffs) {
|
|
53
|
+
* console.log(`${d.path}: ${d.a} -> ${d.b}`);
|
|
54
|
+
* }
|
|
55
|
+
* // => "tls.cipherSuites[5]: TLS_OLD -> TLS_NEW"
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @since 0.1.0
|
|
35
59
|
*/
|
|
36
60
|
export declare function diffProfiles(a: BrowserProfile, b: BrowserProfile, options?: DiffOptions): ProfileDiff[];
|
|
37
61
|
//# sourceMappingURL=diff.d.ts.map
|
package/dist/diff.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../src/diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,qDAAqD;AACrD,MAAM,WAAW,WAAW;IACxB
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../src/diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,qDAAqD;AACrD,MAAM,WAAW,WAAW;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CACxC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IACxB,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;CACvB;AA+JD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CACxB,CAAC,EAAE,cAAc,EACjB,CAAC,EAAE,cAAc,EACjB,OAAO,GAAE,WAAgB,GAC1B,WAAW,EAAE,CAIf"}
|
package/dist/diff.js
CHANGED
|
@@ -134,6 +134,22 @@ function sortValue(value) {
|
|
|
134
134
|
* Returns a {@link ProfileDiff} for every differing path. The result is empty
|
|
135
135
|
* when the profiles are structurally equal. Array comparison is order-sensitive
|
|
136
136
|
* by default; pass `{ compareArrayOrder: false }` to ignore element order.
|
|
137
|
+
*
|
|
138
|
+
* @param a - The left-hand (expected/older) profile.
|
|
139
|
+
* @param b - The right-hand (actual/newer) profile.
|
|
140
|
+
* @param options - Controls array comparison behavior. Defaults to `{ compareArrayOrder: true }`.
|
|
141
|
+
* @returns An array of {@link ProfileDiff} entries, one per differing path.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```ts
|
|
145
|
+
* const diffs = diffProfiles(chrome140, chrome141);
|
|
146
|
+
* for (const d of diffs) {
|
|
147
|
+
* console.log(`${d.path}: ${d.a} -> ${d.b}`);
|
|
148
|
+
* }
|
|
149
|
+
* // => "tls.cipherSuites[5]: TLS_OLD -> TLS_NEW"
|
|
150
|
+
* ```
|
|
151
|
+
*
|
|
152
|
+
* @since 0.1.0
|
|
137
153
|
*/
|
|
138
154
|
export function diffProfiles(a, b, options = {}) {
|
|
139
155
|
const out = [];
|
package/dist/diff.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../src/diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../src/diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA4CH,oGAAoG;AACpG,SAAS,QAAQ,CAAC,CAAU;IACxB,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,CAAC;AAC/C,CAAC;AAED,8FAA8F;AAC9F,SAAS,OAAO,CAAC,CAAU;IACvB,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC;AAED,4BAA4B;AAC5B,SAAS,IAAI,CAAC,GAAkB,EAAE,IAAY,EAAE,CAAU,EAAE,CAAW;IACnE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC;AAED,qFAAqF;AACrF,SAAS,SAAS,CAAC,CAAa,EAAE,CAAa;IAC3C,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChB,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAA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;IAC1B,CAAC;AACL,CAAC;AAED,6FAA6F;AAC7F,SAAS,eAAe,CAAC,KAAc;IACnC,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC7B,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC;IACD,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAClB,MAAM,MAAM,GAA4B,EAAE,CAAC;QAC3C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YAC1C,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,YAAY,CACxB,CAAiB,EACjB,CAAiB,EACjB,OAAO,GAAgB,EAAE;IAEzB,MAAM,GAAG,GAAkB,EAAE,CAAC;IAC9B,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,GAAG,CAAC;AACf,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -3,18 +3,66 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Errors are part of the API — callers match on `kind` instead of parsing messages.
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Base class for all profile lookup / registration failures.
|
|
8
|
+
*
|
|
9
|
+
* Extends `Error` with a `kind` discriminator and an optional `cause`. All
|
|
10
|
+
* profile-package errors extend this class (directly or via {@link ValidationError}),
|
|
11
|
+
* so a single `catch` on `ProfileError` captures every failure mode the package
|
|
12
|
+
* raises, while `instanceof` against a subclass narrows to a specific case.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* try {
|
|
17
|
+
* const profile = getProfile("chrome-999" as ProfileId);
|
|
18
|
+
* } catch (e) {
|
|
19
|
+
* if (e instanceof UnknownProfileError) {
|
|
20
|
+
* // fall back to a known profile...
|
|
21
|
+
* }
|
|
22
|
+
* throw e;
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @since 0.1.0
|
|
27
|
+
*/
|
|
7
28
|
export declare class ProfileError extends Error {
|
|
8
29
|
readonly kind: string;
|
|
9
30
|
readonly cause: Error | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* @param kind - Discriminator string for `instanceof`-free matching.
|
|
33
|
+
* @param message - Human-readable description of the failure.
|
|
34
|
+
* @param options - Standard `Error` options; `cause` preserves the wrapped error.
|
|
35
|
+
*/
|
|
10
36
|
constructor(kind: string, message: string, options?: {
|
|
11
37
|
cause?: Error;
|
|
12
38
|
});
|
|
13
39
|
}
|
|
14
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* No profile exists for the requested {@link ProfileId}.
|
|
42
|
+
*
|
|
43
|
+
* Raised by {@link getProfile} when the id is not in the registry. Built-in
|
|
44
|
+
* profiles are always present; this typically indicates a typo or an
|
|
45
|
+
* uninstalled custom profile.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* try {
|
|
50
|
+
* getProfile("chrome-000" as ProfileId);
|
|
51
|
+
* } catch (e) {
|
|
52
|
+
* if (e instanceof UnknownProfileError) {
|
|
53
|
+
* console.error(`No profile for id: ${e.profileId}`);
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @since 0.1.0
|
|
59
|
+
*/
|
|
15
60
|
export declare class UnknownProfileError extends ProfileError {
|
|
16
61
|
readonly kind: "UnknownProfileError";
|
|
17
62
|
readonly profileId: string;
|
|
63
|
+
/**
|
|
64
|
+
* @param profileId - The {@link ProfileId} that was not found.
|
|
65
|
+
*/
|
|
18
66
|
constructor(profileId: string);
|
|
19
67
|
}
|
|
20
68
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACnC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAyB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IAElD;;;;OAIG;IACH,YACI,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,EAM9B;CACJ;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;IACjD,SAAyB,IAAI,EAAG,qBAAqB,CAAU;IAC/D,SAAgB,SAAS,EAAE,MAAM,CAAC;IAElC;;OAEG;IACH,YAAY,SAAS,EAAE,MAAM,EAI5B;CACJ"}
|
package/dist/errors.js
CHANGED
|
@@ -3,10 +3,36 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Errors are part of the API — callers match on `kind` instead of parsing messages.
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Base class for all profile lookup / registration failures.
|
|
8
|
+
*
|
|
9
|
+
* Extends `Error` with a `kind` discriminator and an optional `cause`. All
|
|
10
|
+
* profile-package errors extend this class (directly or via {@link ValidationError}),
|
|
11
|
+
* so a single `catch` on `ProfileError` captures every failure mode the package
|
|
12
|
+
* raises, while `instanceof` against a subclass narrows to a specific case.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* try {
|
|
17
|
+
* const profile = getProfile("chrome-999" as ProfileId);
|
|
18
|
+
* } catch (e) {
|
|
19
|
+
* if (e instanceof UnknownProfileError) {
|
|
20
|
+
* // fall back to a known profile...
|
|
21
|
+
* }
|
|
22
|
+
* throw e;
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @since 0.1.0
|
|
27
|
+
*/
|
|
7
28
|
export class ProfileError extends Error {
|
|
8
29
|
kind;
|
|
9
30
|
cause;
|
|
31
|
+
/**
|
|
32
|
+
* @param kind - Discriminator string for `instanceof`-free matching.
|
|
33
|
+
* @param message - Human-readable description of the failure.
|
|
34
|
+
* @param options - Standard `Error` options; `cause` preserves the wrapped error.
|
|
35
|
+
*/
|
|
10
36
|
constructor(kind, message, options) {
|
|
11
37
|
super(message, options);
|
|
12
38
|
this.name = new.target.name;
|
|
@@ -14,10 +40,32 @@ export class ProfileError extends Error {
|
|
|
14
40
|
this.cause = options?.cause;
|
|
15
41
|
}
|
|
16
42
|
}
|
|
17
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* No profile exists for the requested {@link ProfileId}.
|
|
45
|
+
*
|
|
46
|
+
* Raised by {@link getProfile} when the id is not in the registry. Built-in
|
|
47
|
+
* profiles are always present; this typically indicates a typo or an
|
|
48
|
+
* uninstalled custom profile.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* try {
|
|
53
|
+
* getProfile("chrome-000" as ProfileId);
|
|
54
|
+
* } catch (e) {
|
|
55
|
+
* if (e instanceof UnknownProfileError) {
|
|
56
|
+
* console.error(`No profile for id: ${e.profileId}`);
|
|
57
|
+
* }
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @since 0.1.0
|
|
62
|
+
*/
|
|
18
63
|
export class UnknownProfileError extends ProfileError {
|
|
19
64
|
kind = "UnknownProfileError";
|
|
20
65
|
profileId;
|
|
66
|
+
/**
|
|
67
|
+
* @param profileId - The {@link ProfileId} that was not found.
|
|
68
|
+
*/
|
|
21
69
|
constructor(profileId) {
|
|
22
70
|
super("UnknownProfileError", `Unknown browser profile: ${profileId}`);
|
|
23
71
|
this.name = "UnknownProfileError";
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACnB,IAAI,CAAS;IACJ,KAAK,CAAoB;IAElD;;;;OAIG;IACH,YACI,IAAY,EACZ,OAAe,EACf,OAA2B;QAE3B,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,OAAO,EAAE,KAAK,CAAC;IAChC,CAAC;CACJ;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,mBAAoB,SAAQ,YAAY;IACxB,IAAI,GAAG,qBAA8B,CAAC;IAC/C,SAAS,CAAS;IAElC;;OAEG;IACH,YAAY,SAAiB;QACzB,KAAK,CAAC,qBAAqB,EAAE,4BAA4B,SAAS,EAAE,CAAC,CAAC;QACtE,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;CACJ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
* Pure data package: browser fingerprint definitions across TLS, HTTP/2, and
|
|
5
5
|
* HTTP/1.1. No protocol implementation lives here — higher layers read these
|
|
6
6
|
* definitions and translate them into bytes / header order / settings frames.
|
|
7
|
+
*
|
|
8
|
+
* The package provides:
|
|
9
|
+
* - {@link getProfile}, {@link listProfiles}, {@link registerProfile} — the registry
|
|
10
|
+
* - {@link diffProfiles} — field-by-field profile comparison
|
|
11
|
+
* - {@link buildExpectedClientHello}, {@link validateProfileAgainstCapture} — capture validation
|
|
12
|
+
* - {@link cipherSuiteToWire} + IANA code tables — name → wire-code projection
|
|
13
|
+
* - A typed error hierarchy ({@link ProfileError}, {@link UnknownProfileError}, {@link ValidationError})
|
|
14
|
+
*
|
|
15
|
+
* @module
|
|
7
16
|
*/
|
|
8
17
|
export { getProfile, listProfiles, registerProfile, } from "./registry.js";
|
|
9
18
|
export { diffProfiles, } from "./diff.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACH,UAAU,EACV,YAAY,EACZ,eAAe,GAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,YAAY,GACf,MAAM,WAAW,CAAC;AAEnB,YAAY,EACR,WAAW,EACX,WAAW,GACd,MAAM,WAAW,CAAC;AAEnB,OAAO,EACH,wBAAwB,EACxB,6BAA6B,EAC7B,eAAe,GAClB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACR,UAAU,EACV,mBAAmB,EACnB,gBAAgB,GACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,iBAAiB,EACjB,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,cAAc,EACd,eAAe,EACf,cAAc,EACd,YAAY,GACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACH,YAAY,EACZ,mBAAmB,GACtB,MAAM,aAAa,CAAC;AAErB,YAAY,EACR,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,SAAS,EACT,WAAW,EACX,UAAU,GACb,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
* Pure data package: browser fingerprint definitions across TLS, HTTP/2, and
|
|
5
5
|
* HTTP/1.1. No protocol implementation lives here — higher layers read these
|
|
6
6
|
* definitions and translate them into bytes / header order / settings frames.
|
|
7
|
+
*
|
|
8
|
+
* The package provides:
|
|
9
|
+
* - {@link getProfile}, {@link listProfiles}, {@link registerProfile} — the registry
|
|
10
|
+
* - {@link diffProfiles} — field-by-field profile comparison
|
|
11
|
+
* - {@link buildExpectedClientHello}, {@link validateProfileAgainstCapture} — capture validation
|
|
12
|
+
* - {@link cipherSuiteToWire} + IANA code tables — name → wire-code projection
|
|
13
|
+
* - A typed error hierarchy ({@link ProfileError}, {@link UnknownProfileError}, {@link ValidationError})
|
|
14
|
+
*
|
|
15
|
+
* @module
|
|
7
16
|
*/
|
|
8
17
|
export { getProfile, listProfiles, registerProfile, } from "./registry.js";
|
|
9
18
|
export { diffProfiles, } from "./diff.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACH,UAAU,EACV,YAAY,EACZ,eAAe,GAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,YAAY,GACf,MAAM,WAAW,CAAC;AAOnB,OAAO,EACH,wBAAwB,EACxB,6BAA6B,EAC7B,eAAe,GAClB,MAAM,eAAe,CAAC;AAQvB,OAAO,EACH,iBAAiB,EACjB,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,cAAc,EACd,eAAe,EACf,cAAc,EACd,YAAY,GACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACH,YAAY,EACZ,mBAAmB,GACtB,MAAM,aAAa,CAAC;AAarB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../src/profiles/chrome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../src/profiles/chrome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,aAAa,CAAC;AA+F7D,eAAO,MAAM,SAAS,EAAE,cA+BvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,cA+BvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,cA+BvB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;CAIjB,CAAC"}
|
package/dist/profiles/chrome.js
CHANGED
|
@@ -45,12 +45,19 @@ const chromeTlsBase = {
|
|
|
45
45
|
"rsa_pkcs1_sha512",
|
|
46
46
|
],
|
|
47
47
|
grease: true,
|
|
48
|
+
ecPointFormats: [0x00],
|
|
49
|
+
compressCertificateAlgorithms: [0x02],
|
|
50
|
+
recordPadding: 512,
|
|
48
51
|
};
|
|
49
52
|
const chromeHttp2Base = {
|
|
50
53
|
initialWindowSize: 6291456,
|
|
51
54
|
maxFrameSize: 16384,
|
|
52
55
|
headerTableSize: 65536,
|
|
53
56
|
weight: 256,
|
|
57
|
+
settingsOrder: [1, 2, 4, 6],
|
|
58
|
+
grease: true,
|
|
59
|
+
connectionWindowUpdate: 15663105,
|
|
60
|
+
pseudoHeaderOrder: ["method", "authority", "scheme", "path"],
|
|
54
61
|
};
|
|
55
62
|
const chromeHttp2Settings = {
|
|
56
63
|
headerTableSize: 65536,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../src/profiles/chrome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,wFAAwF;AACxF,MAAM,MAAM,GAAG,uBAAuB,CAAC;AAEvC;;;;;;;GAOG;AACH,MAAM,oBAAoB,GAAG,CAAC,WAAmB,EAAqB,EAAE,CAAC;IACrE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK;CAC9E,CAAC;AAEF,MAAM,aAAa,GAAG;IAClB,iBAAiB,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IACzC,mBAAmB,EAAE;QACjB,wBAAwB;QACxB,qBAAqB;QACrB,kBAAkB;QAClB,wBAAwB;QACxB,qBAAqB;QACrB,kBAAkB;QAClB,qBAAqB;QACrB,kBAAkB;KACrB;IACD,MAAM,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../src/profiles/chrome.ts"],"names":[],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G,eAAe;QAClB,cAAc,EAAE;YACZ,WAAW,EAAE,mEAAmE;YAChF,kBAAkB,EAAE,IAAI;YACxB,oBAAoB,EAAE,SAAS;YAC/B,2BAA2B,EAAE,GAAG;YAChC,YAAY,EACR,uHAAuH;YAC3H,MAAM,EAAE,uFAAuF;YAC/F,gBAAgB,EAAE,MAAM;YACxB,gBAAgB,EAAE,UAAU;YAC5B,gBAAgB,EAAE,IAAI;YACtB,gBAAgB,EAAE,UAAU;YAC5B,iBAAiB,EAAE,gBAAgB;SACtC;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,SAAS;IACT,SAAS;IACT,SAAS;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/profiles/edge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/profiles/edge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,aAAa,CAAC;AAyF7D,eAAO,MAAM,OAAO,EAAE,cAmCrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,cAmCrB,CAAC;AAEF,eAAO,MAAM,YAAY;;;CAGf,CAAC"}
|
package/dist/profiles/edge.js
CHANGED
|
@@ -33,12 +33,19 @@ const edgeTlsBase = {
|
|
|
33
33
|
"rsa_pkcs1_sha512",
|
|
34
34
|
],
|
|
35
35
|
grease: true,
|
|
36
|
+
ecPointFormats: [0x00],
|
|
37
|
+
compressCertificateAlgorithms: [0x02],
|
|
38
|
+
recordPadding: 512,
|
|
36
39
|
};
|
|
37
40
|
const edgeHttp2Base = {
|
|
38
41
|
initialWindowSize: 6291456,
|
|
39
42
|
maxFrameSize: 16384,
|
|
40
43
|
headerTableSize: 65536,
|
|
41
44
|
weight: 256,
|
|
45
|
+
settingsOrder: [1, 2, 4, 6],
|
|
46
|
+
grease: true,
|
|
47
|
+
connectionWindowUpdate: 15663105,
|
|
48
|
+
pseudoHeaderOrder: ["method", "authority", "scheme", "path"],
|
|
42
49
|
};
|
|
43
50
|
const edgeHttp1Base = {
|
|
44
51
|
connection: "keep-alive",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../src/profiles/edge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,sFAAsF;AACtF,MAAM,MAAM,GAAG,uBAAuB,CAAC;AAEvC;;;;GAIG;AACH,MAAM,oBAAoB,GAAsB;IAC5C,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;CACrE,CAAC;AAEF,MAAM,WAAW,GAAG;IAChB,cAAc,EAAE,oBAAoB;IACpC,iBAAiB,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IACzC,cAAc,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC;IACpD,mBAAmB,EAAE;QACjB,wBAAwB;QACxB,qBAAqB;QACrB,kBAAkB;QAClB,wBAAwB;QACxB,qBAAqB;QACrB,kBAAkB;QAClB,qBAAqB;QACrB,kBAAkB;KACrB;IACD,MAAM,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../src/profiles/edge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,sFAAsF;AACtF,MAAM,MAAM,GAAG,uBAAuB,CAAC;AAEvC;;;;GAIG;AACH,MAAM,oBAAoB,GAAsB;IAC5C,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,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AQ,EAAE;YACN,eAAe,EAAE,KAAK;YACtB,UAAU,EAAE,KAAK;YACjB,oBAAoB,EAAE,GAAG;YACzB,iBAAiB,EAAE,OAAO;YAC1B,YAAY,EAAE,KAAK;SACtB;KACJ;IACD,KAAK,EAAE;QACH,GAAG,aAAa;QAChB,cAAc,EAAE;YACZ,WAAW,EAAE,oEAAoE;YACjF,kBAAkB,EAAE,IAAI;YACxB,oBAAoB,EAAE,SAAS;YAC/B,2BAA2B,EAAE,GAAG;YAChC,YAAY,EACR,qIAAqI;YACzI,MAAM,EAAE,uFAAuF;YAC/F,gBAAgB,EAAE,MAAM;YACxB,gBAAgB,EAAE,UAAU;YAC5B,gBAAgB,EAAE,IAAI;YACtB,gBAAgB,EAAE,UAAU;YAC5B,iBAAiB,EAAE,gBAAgB;SACtC;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,OAAO;IACP,OAAO;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firefox.d.ts","sourceRoot":"","sources":["../../src/profiles/firefox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"firefox.d.ts","sourceRoot":"","sources":["../../src/profiles/firefox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,aAAa,CAAC;AA8F7D,eAAO,MAAM,UAAU,EAAE,cAgCxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,cAkCxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,cAkCxB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;CAIlB,CAAC"}
|
package/dist/profiles/firefox.js
CHANGED
|
@@ -68,6 +68,22 @@ const firefoxHttp2Base = {
|
|
|
68
68
|
headerTableSize: 65536,
|
|
69
69
|
weight: 256,
|
|
70
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* Impersonation fields shared by firefox-128 and firefox-135 (but not
|
|
73
|
+
* firefox-120, which predates the impersonation data). Firefox differs from
|
|
74
|
+
* Chrome: no HTTP/2 GREASE, a distinct connection WINDOW_UPDATE, and
|
|
75
|
+
* compress_certificate offers brotli + zlib (not just brotli).
|
|
76
|
+
*/
|
|
77
|
+
const firefoxTlsImpersonation = {
|
|
78
|
+
ecPointFormats: [0x00],
|
|
79
|
+
compressCertificateAlgorithms: [0x02, 0x01],
|
|
80
|
+
};
|
|
81
|
+
const firefoxHttp2Impersonation = {
|
|
82
|
+
settingsOrder: [1, 2, 4, 6],
|
|
83
|
+
grease: false,
|
|
84
|
+
connectionWindowUpdate: 12517377,
|
|
85
|
+
pseudoHeaderOrder: ["method", "authority", "scheme", "path"],
|
|
86
|
+
};
|
|
71
87
|
const firefoxHttp1Base = {
|
|
72
88
|
connection: "keep-alive",
|
|
73
89
|
acceptEncoding: "gzip, deflate, br",
|
|
@@ -123,10 +139,12 @@ export const firefox128 = {
|
|
|
123
139
|
version: "128.0",
|
|
124
140
|
tls: {
|
|
125
141
|
...firefoxTlsBase,
|
|
142
|
+
...firefoxTlsImpersonation,
|
|
126
143
|
cipherSuites: firefoxTlsCiphers,
|
|
127
144
|
},
|
|
128
145
|
http2: {
|
|
129
146
|
...firefoxHttp2Base,
|
|
147
|
+
...firefoxHttp2Impersonation,
|
|
130
148
|
settings: {
|
|
131
149
|
headerTableSize: 65536,
|
|
132
150
|
enablePush: false,
|
|
@@ -155,10 +173,12 @@ export const firefox135 = {
|
|
|
155
173
|
version: "135.0",
|
|
156
174
|
tls: {
|
|
157
175
|
...firefoxTlsBase,
|
|
176
|
+
...firefoxTlsImpersonation,
|
|
158
177
|
cipherSuites: firefoxTlsCiphers,
|
|
159
178
|
},
|
|
160
179
|
http2: {
|
|
161
180
|
...firefoxHttp2Base,
|
|
181
|
+
...firefoxHttp2Impersonation,
|
|
162
182
|
settings: {
|
|
163
183
|
headerTableSize: 65536,
|
|
164
184
|
enablePush: false,
|