@browsercore/profiles 0.2.0 → 0.2.2
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 +16 -1
- package/dist/profiles/chrome.d.ts.map +1 -1
- package/dist/profiles/chrome.js +21 -8
- package/dist/profiles/chrome.js.map +1 -1
- package/dist/profiles/edge.d.ts +7 -6
- package/dist/profiles/edge.d.ts.map +1 -1
- package/dist/profiles/edge.js +19 -13
- 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/dist/validate.d.ts
CHANGED
|
@@ -29,6 +29,10 @@ export interface TlsCapture {
|
|
|
29
29
|
readonly keyShareGroups: readonly number[];
|
|
30
30
|
/** Signature algorithm codes offered. */
|
|
31
31
|
readonly signatureAlgorithms: readonly number[];
|
|
32
|
+
/** EC point formats observed (wire codes). Absent when the capture tool doesn't record them. */
|
|
33
|
+
readonly ecPointFormats?: readonly number[];
|
|
34
|
+
/** compress_certificate algorithms observed (wire codes). Absent when not recorded. */
|
|
35
|
+
readonly compressCertificateAlgorithms?: readonly number[];
|
|
32
36
|
/** Whether the ClientHello used GREASE randomization. */
|
|
33
37
|
readonly grease: boolean;
|
|
34
38
|
/** Optional JA3 / JA4 strings, when the capture tool computed them. */
|
|
@@ -47,6 +51,10 @@ export interface ClientHelloExpected {
|
|
|
47
51
|
readonly keyShareGroups: readonly number[];
|
|
48
52
|
/** Signature algorithm codes. */
|
|
49
53
|
readonly signatureAlgorithms: readonly number[];
|
|
54
|
+
/** EC point formats offered (wire codes). Undefined when the profile doesn't specify them. */
|
|
55
|
+
readonly ecPointFormats?: readonly number[];
|
|
56
|
+
/** compress_certificate algorithms offered (wire codes). Undefined when unspecified. */
|
|
57
|
+
readonly compressCertificateAlgorithms?: readonly number[];
|
|
50
58
|
/** Whether GREASE randomization is expected. */
|
|
51
59
|
readonly grease: boolean;
|
|
52
60
|
/** SNI hostname the client would send, derived from the connection target. */
|
|
@@ -55,11 +63,19 @@ export interface ClientHelloExpected {
|
|
|
55
63
|
/** Validation / projection failure (unknown profile value, bad capture, etc.). */
|
|
56
64
|
export declare class ValidationError extends ProfileError {
|
|
57
65
|
readonly kind: "ValidationError";
|
|
66
|
+
/**
|
|
67
|
+
* @param message - Description of what failed to validate or project.
|
|
68
|
+
* @param options - `cause` wraps the underlying error.
|
|
69
|
+
*/
|
|
58
70
|
constructor(message: string, options?: {
|
|
59
71
|
cause?: Error;
|
|
60
72
|
});
|
|
61
73
|
}
|
|
62
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Outcome of validating a profile against a captured ClientHello.
|
|
76
|
+
*
|
|
77
|
+
* Produced by {@link validateProfileAgainstCapture}.
|
|
78
|
+
*/
|
|
63
79
|
export interface ValidationResult {
|
|
64
80
|
/** True when every field matches (respecting GREASE randomization for cipher suites). */
|
|
65
81
|
readonly ok: boolean;
|
|
@@ -68,17 +84,56 @@ export interface ValidationResult {
|
|
|
68
84
|
}
|
|
69
85
|
/**
|
|
70
86
|
* Project a profile's TLS fields onto the wire values its ClientHello should
|
|
71
|
-
* carry for a connection to `serverName`.
|
|
72
|
-
*
|
|
73
|
-
*
|
|
87
|
+
* carry for a connection to `serverName`.
|
|
88
|
+
*
|
|
89
|
+
* Extension order is taken verbatim from the profile (already stored as wire
|
|
90
|
+
* codes), since extension order is a fingerprint signal. Cipher suites, named
|
|
91
|
+
* groups, signature schemes, and TLS versions are projected through the IANA
|
|
92
|
+
* code tables in {@link codes.ts}.
|
|
93
|
+
*
|
|
94
|
+
* @param profile - The {@link BrowserProfile} to project.
|
|
95
|
+
* @param serverName - The SNI server name the connection targets.
|
|
96
|
+
* @returns The {@link ClientHelloExpected} wire values.
|
|
97
|
+
* @throws {ValidationError} If the profile references an unknown cipher suite,
|
|
98
|
+
* named group, signature scheme, or TLS version.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```ts
|
|
102
|
+
* const expected = buildExpectedClientHello(chrome140, "example.com");
|
|
103
|
+
* // expected.cipherSuites = [0x1301, 0x1302, ...]
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* @since 0.1.0
|
|
74
107
|
*/
|
|
75
108
|
export declare function buildExpectedClientHello(profile: BrowserProfile, serverName: string): ClientHelloExpected;
|
|
76
109
|
/**
|
|
77
110
|
* Validate a profile against a captured ClientHello.
|
|
78
111
|
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
112
|
+
* Projects the profile to expected wire values (via {@link buildExpectedClientHello})
|
|
113
|
+
* and compares them field-by-field against the capture. Returns `ok: true` when
|
|
114
|
+
* every field matches (respecting GREASE randomization for cipher suites), and
|
|
115
|
+
* the list of diffs otherwise.
|
|
116
|
+
*
|
|
117
|
+
* SNI is not compared because captures do not record the destination hostname.
|
|
118
|
+
*
|
|
119
|
+
* @param profile - The {@link BrowserProfile} to validate.
|
|
120
|
+
* @param capture - A {@link TlsCapture} parsed from a packet capture.
|
|
121
|
+
* @returns A {@link ValidationResult} indicating match/mismatch.
|
|
122
|
+
* @throws {ValidationError} If the profile references an unknown cipher suite,
|
|
123
|
+
* named group, signature scheme, or TLS version.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```ts
|
|
127
|
+
* const result = validateProfileAgainstCapture(chrome140, capture);
|
|
128
|
+
* if (!result.ok) {
|
|
129
|
+
* for (const d of result.diffs) {
|
|
130
|
+
* console.log(`${d.path}: expected ${d.a}, got ${d.b}`);
|
|
131
|
+
* }
|
|
132
|
+
* }
|
|
133
|
+
* ```
|
|
134
|
+
*
|
|
135
|
+
* @see buildExpectedClientHello for the projection step.
|
|
136
|
+
* @since 0.1.0
|
|
82
137
|
*/
|
|
83
138
|
export declare function validateProfileAgainstCapture(profile: BrowserProfile, capture: TlsCapture): ValidationResult;
|
|
84
139
|
//# sourceMappingURL=validate.d.ts.map
|
package/dist/validate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAS3C,wFAAwF;AACxF,MAAM,WAAW,UAAU;IACvB,iEAAiE;IACjE,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,mDAAmD;IACnD,QAAQ,CAAC,cAAc,EAAE,S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,iCAAiC;IACjC,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD,8FAA8F;IAC9F,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,wFAAwF;IACxF,QAAQ,CAAC,6BAA6B,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3D,gDAAgD;IAChD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,8EAA8E;IAC9E,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACxB;AAED,kFAAkF;AAClF,qBAAa,eAAgB,SAAQ,YAAY;IAC7C,SAAyB,IAAI,EAAG,iBAAiB,CAAU;IAE3D;;;OAGG;IACH,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,EAGvD;CACJ;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B,yFAAyF;IACzF,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,uFAAuF;IACvF,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC;CACjC;AAkCD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,wBAAwB,CACpC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM,GACnB,mBAAmB,CAkBrB;AA2DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,6BAA6B,CACzC,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,UAAU,GACpB,gBAAgB,CAsClB"}
|
package/dist/validate.js
CHANGED
|
@@ -19,6 +19,10 @@ import { CIPHER_GREASE_PLACEHOLDER, CIPHER_SUITE_CODES, NAMED_GROUP_CODES, SIGNA
|
|
|
19
19
|
/** Validation / projection failure (unknown profile value, bad capture, etc.). */
|
|
20
20
|
export class ValidationError extends ProfileError {
|
|
21
21
|
kind = "ValidationError";
|
|
22
|
+
/**
|
|
23
|
+
* @param message - Description of what failed to validate or project.
|
|
24
|
+
* @param options - `cause` wraps the underlying error.
|
|
25
|
+
*/
|
|
22
26
|
constructor(message, options) {
|
|
23
27
|
super("ValidationError", message, options);
|
|
24
28
|
this.name = "ValidationError";
|
|
@@ -49,9 +53,26 @@ function mapVersion(name) {
|
|
|
49
53
|
}
|
|
50
54
|
/**
|
|
51
55
|
* Project a profile's TLS fields onto the wire values its ClientHello should
|
|
52
|
-
* carry for a connection to `serverName`.
|
|
53
|
-
*
|
|
54
|
-
*
|
|
56
|
+
* carry for a connection to `serverName`.
|
|
57
|
+
*
|
|
58
|
+
* Extension order is taken verbatim from the profile (already stored as wire
|
|
59
|
+
* codes), since extension order is a fingerprint signal. Cipher suites, named
|
|
60
|
+
* groups, signature schemes, and TLS versions are projected through the IANA
|
|
61
|
+
* code tables in {@link codes.ts}.
|
|
62
|
+
*
|
|
63
|
+
* @param profile - The {@link BrowserProfile} to project.
|
|
64
|
+
* @param serverName - The SNI server name the connection targets.
|
|
65
|
+
* @returns The {@link ClientHelloExpected} wire values.
|
|
66
|
+
* @throws {ValidationError} If the profile references an unknown cipher suite,
|
|
67
|
+
* named group, signature scheme, or TLS version.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const expected = buildExpectedClientHello(chrome140, "example.com");
|
|
72
|
+
* // expected.cipherSuites = [0x1301, 0x1302, ...]
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @since 0.1.0
|
|
55
76
|
*/
|
|
56
77
|
export function buildExpectedClientHello(profile, serverName) {
|
|
57
78
|
return {
|
|
@@ -61,6 +82,14 @@ export function buildExpectedClientHello(profile, serverName) {
|
|
|
61
82
|
keyShareGroups: profile.tls.keyShareGroups.map(mapNamedGroup),
|
|
62
83
|
signatureAlgorithms: profile.tls.signatureAlgorithms.map(mapSignatureScheme),
|
|
63
84
|
grease: profile.tls.grease,
|
|
85
|
+
// Conditionally spread optional fields so absent properties are truly
|
|
86
|
+
// absent (exactOptionalPropertyTypes forbids assigning undefined).
|
|
87
|
+
...(profile.tls.ecPointFormats
|
|
88
|
+
? { ecPointFormats: Array.from(profile.tls.ecPointFormats) }
|
|
89
|
+
: {}),
|
|
90
|
+
...(profile.tls.compressCertificateAlgorithms
|
|
91
|
+
? { compressCertificateAlgorithms: Array.from(profile.tls.compressCertificateAlgorithms) }
|
|
92
|
+
: {}),
|
|
64
93
|
sni: serverName,
|
|
65
94
|
};
|
|
66
95
|
}
|
|
@@ -111,9 +140,31 @@ function diffCipherSuites(profile, expected, capture, out) {
|
|
|
111
140
|
/**
|
|
112
141
|
* Validate a profile against a captured ClientHello.
|
|
113
142
|
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
143
|
+
* Projects the profile to expected wire values (via {@link buildExpectedClientHello})
|
|
144
|
+
* and compares them field-by-field against the capture. Returns `ok: true` when
|
|
145
|
+
* every field matches (respecting GREASE randomization for cipher suites), and
|
|
146
|
+
* the list of diffs otherwise.
|
|
147
|
+
*
|
|
148
|
+
* SNI is not compared because captures do not record the destination hostname.
|
|
149
|
+
*
|
|
150
|
+
* @param profile - The {@link BrowserProfile} to validate.
|
|
151
|
+
* @param capture - A {@link TlsCapture} parsed from a packet capture.
|
|
152
|
+
* @returns A {@link ValidationResult} indicating match/mismatch.
|
|
153
|
+
* @throws {ValidationError} If the profile references an unknown cipher suite,
|
|
154
|
+
* named group, signature scheme, or TLS version.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```ts
|
|
158
|
+
* const result = validateProfileAgainstCapture(chrome140, capture);
|
|
159
|
+
* if (!result.ok) {
|
|
160
|
+
* for (const d of result.diffs) {
|
|
161
|
+
* console.log(`${d.path}: expected ${d.a}, got ${d.b}`);
|
|
162
|
+
* }
|
|
163
|
+
* }
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
* @see buildExpectedClientHello for the projection step.
|
|
167
|
+
* @since 0.1.0
|
|
117
168
|
*/
|
|
118
169
|
export function validateProfileAgainstCapture(profile, capture) {
|
|
119
170
|
const expected = buildExpectedClientHello(profile, "");
|
|
@@ -123,6 +174,16 @@ export function validateProfileAgainstCapture(profile, capture) {
|
|
|
123
174
|
diffNumberArray("tls.supportedVersions", expected.supportedVersions, capture.supportedVersions, diffs);
|
|
124
175
|
diffNumberArray("tls.keyShareGroups", expected.keyShareGroups, capture.keyShareGroups, diffs);
|
|
125
176
|
diffNumberArray("tls.signatureAlgorithms", expected.signatureAlgorithms, capture.signatureAlgorithms, diffs);
|
|
177
|
+
// Optional impersonation fields: only diff when both the profile and the
|
|
178
|
+
// capture record them. Older captures may not include ecPointFormats or
|
|
179
|
+
// compressCertificateAlgorithms, so absence from the capture is not a mismatch.
|
|
180
|
+
if (expected.ecPointFormats !== undefined && capture.ecPointFormats !== undefined) {
|
|
181
|
+
diffNumberArray("tls.ecPointFormats", expected.ecPointFormats, capture.ecPointFormats, diffs);
|
|
182
|
+
}
|
|
183
|
+
if (expected.compressCertificateAlgorithms !== undefined &&
|
|
184
|
+
capture.compressCertificateAlgorithms !== undefined) {
|
|
185
|
+
diffNumberArray("tls.compressCertificateAlgorithms", expected.compressCertificateAlgorithms, capture.compressCertificateAlgorithms, diffs);
|
|
186
|
+
}
|
|
126
187
|
if (expected.grease !== capture.grease) {
|
|
127
188
|
diffs.push({ path: "tls.grease", a: expected.grease, b: capture.grease });
|
|
128
189
|
}
|
package/dist/validate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EACH,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,GAChB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"validate.js","sour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c,EAAE,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAClG,CAAC;IACD,IACI,QAAQ,CAAC,6BAA6B,KAAK,SAAS;QACpD,OAAO,CAAC,6BAA6B,KAAK,SAAS,EACrD,CAAC;QACC,eAAe,CACX,mCAAmC,EACnC,QAAQ,CAAC,6BAA6B,EACtC,OAAO,CAAC,6BAA6B,EACrC,KAAK,CACR,CAAC;IACN,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;AAC7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browsercore/profiles",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Browser fingerprint definitions (TLS / HTTP/2 / HTTP/1.1). Pure data — no protocol implementation.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"dist",
|
|
25
|
+
"bin",
|
|
25
26
|
"LICENSE",
|
|
26
27
|
"README.md"
|
|
27
28
|
],
|
|
@@ -31,14 +32,13 @@
|
|
|
31
32
|
},
|
|
32
33
|
"scripts": {
|
|
33
34
|
"clean": "rm -rf dist",
|
|
34
|
-
"build": "tsc -p tsconfig.
|
|
35
|
+
"build": "tsc -p tsconfig.json",
|
|
35
36
|
"prepublishOnly": "npm run clean && npm run build",
|
|
36
37
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
37
38
|
"test": "vitest run",
|
|
38
39
|
"lint": "oxlint --type-aware src/"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"@browsercore/dev": "latest",
|
|
42
42
|
"@types/node": "^26.1.2",
|
|
43
43
|
"@vitest/coverage-v8": "^4.1.10",
|
|
44
44
|
"typescript": "^7.0.0",
|