clearcote 0.10.1 → 0.10.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 +31 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/release.js +4 -4
- package/dist/widevine.d.ts +40 -0
- package/dist/widevine.d.ts.map +1 -0
- package/dist/widevine.js +181 -0
- package/dist/widevine.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,6 +81,37 @@ const context = await launchPersistentContext("./profile-7423", {
|
|
|
81
81
|
});
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
+
### Widevine / DRM (`widevine: true`)
|
|
85
|
+
|
|
86
|
+
clearcote ships the **EME/Widevine plumbing** compiled in, but — being 100% open source — it does
|
|
87
|
+
**not** bundle Google's proprietary CDM. Pass `widevine: true` on a **persistent** context and the SDK
|
|
88
|
+
fetches that CDM once from Google's own component server (same as a real Chrome receives it), seeds it
|
|
89
|
+
into the profile, and enables it — so `navigator.requestMediaKeySystemAccess('com.widevine.alpha')`
|
|
90
|
+
resolves and DRM streams play, instead of EME being a "no-Widevine" tell.
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
import { launchPersistentContext } from "clearcote";
|
|
94
|
+
|
|
95
|
+
const ctx = await launchPersistentContext("./profile-drm", { widevine: true }); // fetch + seed + enable
|
|
96
|
+
const page = ctx.pages()[0] ?? (await ctx.newPage());
|
|
97
|
+
await page.goto("https://example.com");
|
|
98
|
+
const ok = await page.evaluate(async () => {
|
|
99
|
+
const a = await navigator.requestMediaKeySystemAccess("com.widevine.alpha", [
|
|
100
|
+
{ initDataTypes: ["cenc"], videoCapabilities: [
|
|
101
|
+
{ contentType: 'video/mp4;codecs="avc1.42E01E"', robustness: "SW_SECURE_DECODE" }] },
|
|
102
|
+
]);
|
|
103
|
+
await a.createMediaKeys();
|
|
104
|
+
return true;
|
|
105
|
+
});
|
|
106
|
+
console.log("Widevine:", ok); // true
|
|
107
|
+
await ctx.close();
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- Requires a **persistent** context (the CDM lives in `userDataDir`) — not the incognito `launch()`.
|
|
111
|
+
- The CDM is cached under `~/.clearcote/WidevineCdm`; fetch it ahead of time with `fetchWidevine()`.
|
|
112
|
+
- It's **opt-in**: the clearcote package never distributes Google's CDM — *you* trigger the download.
|
|
113
|
+
- Software-secure (L3) playback. Hardware-secure (L1) paths are out of scope.
|
|
114
|
+
|
|
84
115
|
### AI agent (OpenRouter)
|
|
85
116
|
|
|
86
117
|
Drive a page with an **in-browser AI agent** — it perceives the live page, asks an LLM what to do,
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { type FingerprintOptions } from "./fingerprint.js";
|
|
|
4
4
|
import { type HumanizeOptions } from "./humanize.js";
|
|
5
5
|
import { type AgentOptions } from "./agent.js";
|
|
6
6
|
import { Profile } from "./profile.js";
|
|
7
|
+
import { fetchWidevine, seedWidevine } from "./widevine.js";
|
|
7
8
|
export type { FingerprintOptions } from "./fingerprint.js";
|
|
8
9
|
export type { DownloadOptions } from "./download.js";
|
|
9
10
|
export { resolveGeo, type Geo } from "./geoip.js";
|
|
@@ -11,6 +12,7 @@ export type { HumanizeOptions } from "./humanize.js";
|
|
|
11
12
|
export { Profile, listProfiles, loadProfile, PROFILE_DIR, type ProfileOptions } from "./profile.js";
|
|
12
13
|
export { runAgentTask, agentArgs, OPENROUTER_BASE_URL, type AgentOptions, type AgentTaskOptions, type AgentTaskResult, type AgentStep, } from "./agent.js";
|
|
13
14
|
export { RELEASE } from "./release.js";
|
|
15
|
+
export { fetchWidevine, seedWidevine } from "./widevine.js";
|
|
14
16
|
/** When true (and a proxy is set), resolve the proxy's exit-IP geo and auto-fill any unset
|
|
15
17
|
* `timezone` + `acceptLanguage` (+ `location`) so they match the proxy region. */
|
|
16
18
|
interface GeoipOption {
|
|
@@ -35,6 +37,13 @@ export interface LaunchOptions extends PlaywrightLaunchOptions, FingerprintOptio
|
|
|
35
37
|
}
|
|
36
38
|
/** Options for {@link launchPersistentContext}. */
|
|
37
39
|
export interface PersistentContextOptions extends PlaywrightLaunchOptions, BrowserContextOptions, FingerprintOptions, AgentOptions, GeoipOption, ProfileOption, ExtensionsOption, HumanizeOptions, DownloadOptions {
|
|
40
|
+
/**
|
|
41
|
+
* Seed + enable the opt-in Widevine CDM in this profile so DRM/EME works
|
|
42
|
+
* (`requestMediaKeySystemAccess('com.widevine.alpha')` resolves) and the EME surface matches a
|
|
43
|
+
* real Chrome instead of being a no-Widevine tell. The CDM is fetched once from Google's
|
|
44
|
+
* component server (see {@link fetchWidevine}); clearcote never bundles Google's blob.
|
|
45
|
+
*/
|
|
46
|
+
widevine?: boolean;
|
|
38
47
|
}
|
|
39
48
|
/**
|
|
40
49
|
* Resolve the Clearcote chrome.exe path, downloading + verifying it if needed.
|
|
@@ -87,6 +96,8 @@ declare const _default: {
|
|
|
87
96
|
Profile: typeof Profile;
|
|
88
97
|
listProfiles: typeof listProfiles;
|
|
89
98
|
loadProfile: typeof loadProfile;
|
|
99
|
+
fetchWidevine: typeof fetchWidevine;
|
|
100
|
+
seedWidevine: typeof seedWidevine;
|
|
90
101
|
RELEASE: import("./release.js").ReleaseInfo;
|
|
91
102
|
};
|
|
92
103
|
export default _default;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,qBAAqB,EACrB,aAAa,IAAI,uBAAuB,EACzC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAA4C,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAErG,OAAO,EAA6C,KAAK,eAAe,EAAE,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CAAC;CACtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,cAAc,CAAC,CAI3F;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;AACzD,wBAaE"}
|
package/dist/index.js
CHANGED
|
@@ -21,10 +21,12 @@ import { agentArgs, splitAgentOptions } from "./agent.js";
|
|
|
21
21
|
import { resolveProfileOptions, Profile } from "./profile.js";
|
|
22
22
|
import { extensionArgs, resolveProxy, mergeFeatureFlags, privacySandboxArgs, webrtcDefaultDenyArgs, } from "./launchopts.js";
|
|
23
23
|
import { RELEASE } from "./release.js";
|
|
24
|
+
import { fetchWidevine, seedWidevine, widevineArgs } from "./widevine.js";
|
|
24
25
|
export { resolveGeo } from "./geoip.js";
|
|
25
26
|
export { Profile, listProfiles, loadProfile, PROFILE_DIR } from "./profile.js";
|
|
26
27
|
export { runAgentTask, agentArgs, OPENROUTER_BASE_URL, } from "./agent.js";
|
|
27
28
|
export { RELEASE } from "./release.js";
|
|
29
|
+
export { fetchWidevine, seedWidevine } from "./widevine.js";
|
|
28
30
|
/** Fill unset timezone/acceptLanguage/location/webrtcIp on `fp` from the proxy's exit-IP geo. */
|
|
29
31
|
async function applyGeoip(fp, proxy) {
|
|
30
32
|
const geo = await resolveGeo(proxy);
|
|
@@ -116,7 +118,7 @@ export async function launch(options = {}) {
|
|
|
116
118
|
*/
|
|
117
119
|
export async function launchPersistentContext(userDataDir, options = {}) {
|
|
118
120
|
const merged = options.profile ? { ...resolveProfileOptions(options.profile), ...options } : options;
|
|
119
|
-
const { profile: _profile, extensions, disablePrivacySandbox, executablePath: exeOption, args, geoip, humanize, showCursor, autoUpdate, cacheDir, quiet, ...rest } = merged;
|
|
121
|
+
const { profile: _profile, extensions, disablePrivacySandbox, executablePath: exeOption, args, geoip, humanize, showCursor, autoUpdate, cacheDir, quiet, widevine, ...rest } = merged;
|
|
120
122
|
const { fingerprint, rest: afterFp } = splitFingerprintOptions(rest);
|
|
121
123
|
const { agent, rest: pwOptions } = splitAgentOptions(afterFp);
|
|
122
124
|
if (geoip)
|
|
@@ -128,12 +130,32 @@ export async function launchPersistentContext(userDataDir, options = {}) {
|
|
|
128
130
|
// headed + no explicit viewport -> disable the emulated viewport (impossible-window tell)
|
|
129
131
|
if (opts.headless === false && opts.viewport === undefined)
|
|
130
132
|
opts.viewport = null;
|
|
133
|
+
// widevine=true: seed the CDM into the profile + un-suppress the component updater (Playwright
|
|
134
|
+
// disables it by default) so the engine registers it. Failure -> DRM gracefully off, launch proceeds.
|
|
135
|
+
let userArgs = args ?? [];
|
|
136
|
+
if (widevine) {
|
|
137
|
+
try {
|
|
138
|
+
await seedWidevine(userDataDir, { quiet });
|
|
139
|
+
// a user-supplied non-fast-update --component-updater mode wins but may not register the CDM
|
|
140
|
+
const cu = userArgs.filter((a) => a.includes("component-updater"));
|
|
141
|
+
if (cu.length && !cu.some((a) => a.includes("fast-update")) && !quiet) {
|
|
142
|
+
process.stderr.write("[clearcote] [widevine] note: your --component-updater mode may not register the CDM; --component-updater=fast-update is needed to scan the pre-installed component\n");
|
|
143
|
+
}
|
|
144
|
+
const tweak = widevineArgs(opts.ignoreDefaultArgs, userArgs);
|
|
145
|
+
opts.ignoreDefaultArgs = tweak.ignoreDefaultArgs;
|
|
146
|
+
userArgs = tweak.args;
|
|
147
|
+
}
|
|
148
|
+
catch (e) {
|
|
149
|
+
if (!quiet)
|
|
150
|
+
process.stderr.write(`[clearcote] [widevine] setup failed (continuing without DRM): ${String(e)}\n`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
131
153
|
const exe = await executablePath({ executablePath: exeOption, autoUpdate, cacheDir, quiet });
|
|
132
154
|
ensureRunnableHere(exe);
|
|
133
155
|
const context = await chromium.launchPersistentContext(userDataDir, {
|
|
134
156
|
...opts,
|
|
135
157
|
executablePath: exe,
|
|
136
|
-
args: assembleArgs(fingerprintArgs(fingerprint), agentArgs(agent), extensionArgs(extensions), proxyArgs, disablePrivacySandbox, fingerprint.webrtcIp,
|
|
158
|
+
args: assembleArgs(fingerprintArgs(fingerprint), agentArgs(agent), extensionArgs(extensions), proxyArgs, disablePrivacySandbox, fingerprint.webrtcIp, userArgs),
|
|
137
159
|
});
|
|
138
160
|
installHumanizeOnContext(context, { humanize, showCursor });
|
|
139
161
|
return context;
|
|
@@ -172,6 +194,8 @@ export default {
|
|
|
172
194
|
Profile,
|
|
173
195
|
listProfiles,
|
|
174
196
|
loadProfile,
|
|
197
|
+
fetchWidevine,
|
|
198
|
+
seedWidevine,
|
|
175
199
|
RELEASE,
|
|
176
200
|
};
|
|
177
201
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,EAAE;AACF,wCAAwC;AACxC,oFAAoF;AACpF,0CAA0C;AAC1C,iEAAiE;AACjE,EAAE;AACF,4FAA4F;AAC5F,gGAAgG;AAChG,gGAAgG;AAChG,sBAAsB;AAEtB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAOjC,OAAO,EAAE,YAAY,EAAwB,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAA2B,MAAM,kBAAkB,CAAC;AACrG,OAAO,EAAE,UAAU,EAAY,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAwB,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE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AM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IACzC,MAAM,GAAG,GAAG,WAAW,IAAI,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC3E,OAAO,uBAAuB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACzD,eAAe;IACb,MAAM;IACN,uBAAuB;IACvB,WAAW;IACX,cAAc;IACd,QAAQ;IACR,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;IACZ,OAAO;CACR,CAAC"}
|
package/dist/release.js
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
// this package, the hash check guarantees you run exactly the published, signed binary.
|
|
5
5
|
// Published checksums + GPG signatures live on the release page.
|
|
6
6
|
export const RELEASE = {
|
|
7
|
-
tag: "v0.1.0-pre.
|
|
7
|
+
tag: "v0.1.0-pre.15",
|
|
8
8
|
version: "149.0.7827.114",
|
|
9
9
|
asset: "clearcote-149.0.7827.114-windows-x64.zip",
|
|
10
|
-
url: "https://github.com/clearcotelabs/clearcote-browser/releases/download/v0.1.0-pre.
|
|
11
|
-
sha256: "
|
|
10
|
+
url: "https://github.com/clearcotelabs/clearcote-browser/releases/download/v0.1.0-pre.15/clearcote-149.0.7827.114-windows-x64.zip",
|
|
11
|
+
sha256: "8fc279533a928c8c8614788000afa7ef95895859df9ea5438dee5a32a1a6e58a",
|
|
12
12
|
exeSha256: "5743595256c89c6874804bf3315acce592fc7f1883760c8d380c010151a73b23",
|
|
13
|
-
size:
|
|
13
|
+
size: 242646871,
|
|
14
14
|
os: "win32",
|
|
15
15
|
};
|
|
16
16
|
/** GitHub repo (owner/name) the releases come from — used by the opt-in auto-update resolver. */
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** Chrome's component-updater app id for the Widevine CDM + Google's Omaha JSON endpoint. */
|
|
2
|
+
export declare const WIDEVINE_APP_ID = "oimompecagnajdejgnnjijobebaeigek";
|
|
3
|
+
export declare const OMAHA_URL = "https://update.googleapis.com/service/update2/json";
|
|
4
|
+
export declare const HINT_FILE = "latest-component-updated-widevine-cdm";
|
|
5
|
+
export interface WidevineOptions {
|
|
6
|
+
/** Destination root (default ~/.clearcote/WidevineCdm). */
|
|
7
|
+
dest?: string;
|
|
8
|
+
/** Suppress progress logging. */
|
|
9
|
+
quiet?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Minimal Omaha v3.1 update check for the Windows x64 Widevine CDM (version 0.0.0.0 -> latest). */
|
|
12
|
+
export declare function omahaRequestBody(): unknown;
|
|
13
|
+
/** Pull [downloadUrl, sha256, version] from an Omaha JSON response (pipelines or classic shape). */
|
|
14
|
+
export declare function parseUpdate(resp: any): [string, string, string];
|
|
15
|
+
/** A CRX3 file is 'Cr24' + u32 version + u32 headerLen + header + zip. Return the zip bytes. */
|
|
16
|
+
export declare function crx3ToZip(buf: Buffer): Buffer;
|
|
17
|
+
/**
|
|
18
|
+
* Download + verify the Windows x64 Widevine CDM into `dest` (default ~/.clearcote/WidevineCdm/
|
|
19
|
+
* <version>). Returns the versioned CDM directory (manifest.json + _platform_specific/win_x64/
|
|
20
|
+
* widevinecdm.dll). Re-fetch is skipped if already present.
|
|
21
|
+
*/
|
|
22
|
+
export declare function fetchWidevine(opts?: WidevineOptions): Promise<string>;
|
|
23
|
+
/**
|
|
24
|
+
* Make a persistent profile load the fetched CDM: copy it under <userDataDir>/WidevineCdm/<version>/
|
|
25
|
+
* and write the component hint file the engine reads. Fetches the CDM first if needed.
|
|
26
|
+
*/
|
|
27
|
+
export declare function seedWidevine(userDataDir: string, opts?: WidevineOptions): Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Adjust launch args so the engine actually registers the seeded CDM: un-suppress the component
|
|
30
|
+
* updater (Playwright disables it by default) and force the startup scan. Pure — returns the new
|
|
31
|
+
* values. `ignoreDefaultArgs` may be a list, `undefined`, or the boolean form Playwright accepts
|
|
32
|
+
* (`true` = ignore ALL defaults, so the updater is already un-suppressed); only the list/undefined
|
|
33
|
+
* forms need `--disable-component-update` added. Verified: with these, requestMediaKeySystemAccess
|
|
34
|
+
* + createMediaKeys succeed.
|
|
35
|
+
*/
|
|
36
|
+
export declare function widevineArgs(ignoreDefaultArgs: string[] | boolean | undefined, userArgs: string[]): {
|
|
37
|
+
ignoreDefaultArgs: string[] | boolean | undefined;
|
|
38
|
+
args: string[];
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=widevine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widevine.d.ts","sourceRoot":"","sources":["../src/widevine.ts"],"names":[],"mappings":"AAmBA,6FAA6F;AAC7F,eAAO,MAAM,eAAe,qCAAqC,CAAC;AAClE,eAAO,MAAM,SAAS,uDAAuD,CAAC;AAC9E,eAAO,MAAM,SAAS,0CAA0C,CAAC;AAKjE,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAUD,oGAAoG;AACpG,wBAAgB,gBAAgB,IAAI,OAAO,CAgB1C;AAgBD,oGAAoG;AACpG,wBAAgB,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAe/D;AAED,gGAAgG;AAChG,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM7C;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CA+B/E;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBnG;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,iBAAiB,EAAE,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,EACjD,QAAQ,EAAE,MAAM,EAAE,GACjB;IAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAavE"}
|
package/dist/widevine.js
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// Opt-in Widevine CDM fetch + persistent-profile seeding (Windows).
|
|
2
|
+
//
|
|
3
|
+
// clearcote is a 100%-open-source build: it ships the EME/Widevine *plumbing* (enable_widevine=true)
|
|
4
|
+
// but NOT Google's proprietary CDM binary (that blob can't live in a FOSS package). This module lets
|
|
5
|
+
// a user *opt in* to fetching the CDM from Google's component server at runtime — exactly how a real
|
|
6
|
+
// Chrome receives it via the component updater — so requestMediaKeySystemAccess('com.widevine.alpha')
|
|
7
|
+
// resolves (DRM plays, and the EME surface matches a real Chrome instead of a no-Widevine tell).
|
|
8
|
+
//
|
|
9
|
+
// import { fetchWidevine, launchPersistentContext } from "clearcote";
|
|
10
|
+
// await fetchWidevine(); // download + verify into ~/.clearcote
|
|
11
|
+
// const ctx = await launchPersistentContext("profile", { widevine: true }); // seeds + enables it
|
|
12
|
+
import { createHash } from "node:crypto";
|
|
13
|
+
import { cpSync, existsSync, mkdirSync, mkdtempSync, writeFileSync } from "node:fs";
|
|
14
|
+
import { rm } from "node:fs/promises";
|
|
15
|
+
import os from "node:os";
|
|
16
|
+
import path from "node:path";
|
|
17
|
+
import extract from "extract-zip";
|
|
18
|
+
/** Chrome's component-updater app id for the Widevine CDM + Google's Omaha JSON endpoint. */
|
|
19
|
+
export const WIDEVINE_APP_ID = "oimompecagnajdejgnnjijobebaeigek";
|
|
20
|
+
export const OMAHA_URL = "https://update.googleapis.com/service/update2/json";
|
|
21
|
+
export const HINT_FILE = "latest-component-updated-widevine-cdm";
|
|
22
|
+
// update.googleapis.com sits behind Google's edge; a bare fetch UA can 403 — send a browser-ish one.
|
|
23
|
+
const UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36";
|
|
24
|
+
function log(quiet, msg) {
|
|
25
|
+
if (!quiet)
|
|
26
|
+
process.stderr.write(`[clearcote] [widevine] ${msg}\n`);
|
|
27
|
+
}
|
|
28
|
+
function cacheRoot() {
|
|
29
|
+
return process.env.CLEARCOTE_WIDEVINE_DIR || path.join(os.homedir(), ".clearcote", "WidevineCdm");
|
|
30
|
+
}
|
|
31
|
+
/** Minimal Omaha v3.1 update check for the Windows x64 Widevine CDM (version 0.0.0.0 -> latest). */
|
|
32
|
+
export function omahaRequestBody() {
|
|
33
|
+
return {
|
|
34
|
+
request: {
|
|
35
|
+
"@os": "win",
|
|
36
|
+
"@updater": "clearcote",
|
|
37
|
+
acceptformat: "crx3",
|
|
38
|
+
protocol: "3.1",
|
|
39
|
+
arch: "x64",
|
|
40
|
+
nacl_arch: "x86-64",
|
|
41
|
+
prodversion: "149.0.0.0",
|
|
42
|
+
updaterversion: "149.0.0.0",
|
|
43
|
+
dedup: "cr",
|
|
44
|
+
os: { arch: "x86_64", platform: "Windows", version: "10.0.19045.0" },
|
|
45
|
+
app: [{ appid: WIDEVINE_APP_ID, version: "0.0.0.0", updatecheck: {}, ping: { r: -2 } }],
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
async function postJson(url, body) {
|
|
50
|
+
const res = await fetch(url, {
|
|
51
|
+
method: "POST",
|
|
52
|
+
headers: { "Content-Type": "application/json", "User-Agent": UA },
|
|
53
|
+
body: JSON.stringify(body),
|
|
54
|
+
redirect: "follow",
|
|
55
|
+
signal: AbortSignal.timeout(60_000),
|
|
56
|
+
});
|
|
57
|
+
if (!res.ok)
|
|
58
|
+
throw new Error(`Widevine update check HTTP ${res.status}`);
|
|
59
|
+
let raw = await res.text();
|
|
60
|
+
if (raw.startsWith(")]}'"))
|
|
61
|
+
raw = raw.includes("\n") ? raw.slice(raw.indexOf("\n") + 1) : raw.slice(4); // strip XSSI guard
|
|
62
|
+
return JSON.parse(raw);
|
|
63
|
+
}
|
|
64
|
+
/** Pull [downloadUrl, sha256, version] from an Omaha JSON response (pipelines or classic shape). */
|
|
65
|
+
export function parseUpdate(resp) {
|
|
66
|
+
const app = resp?.response?.app?.[0];
|
|
67
|
+
const uc = app?.updatecheck;
|
|
68
|
+
if (!uc || uc.status !== "ok")
|
|
69
|
+
throw new Error(`Widevine update check status: ${uc?.status}`);
|
|
70
|
+
for (const pl of uc.pipelines || []) {
|
|
71
|
+
for (const op of pl.operations || []) {
|
|
72
|
+
const urls = op.urls || [];
|
|
73
|
+
const out = op.out || {};
|
|
74
|
+
if (urls.length && out.sha256)
|
|
75
|
+
return [urls[0].url, out.sha256, app.nextversion || uc.nextversion || ""];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const base = uc.urls?.url?.[0]?.codebase;
|
|
79
|
+
const pkg = uc.manifest?.packages?.package?.[0];
|
|
80
|
+
if (base && pkg?.name)
|
|
81
|
+
return [base.replace(/\/+$/, "") + "/" + pkg.name, pkg.hash_sha256 || "", uc.manifest?.version || ""];
|
|
82
|
+
throw new Error("could not find a CDM download URL in the update response");
|
|
83
|
+
}
|
|
84
|
+
/** A CRX3 file is 'Cr24' + u32 version + u32 headerLen + header + zip. Return the zip bytes. */
|
|
85
|
+
export function crx3ToZip(buf) {
|
|
86
|
+
if (buf.subarray(0, 4).toString("latin1") !== "Cr24")
|
|
87
|
+
return buf; // already a plain zip
|
|
88
|
+
if (buf.length < 12)
|
|
89
|
+
throw new Error("malformed CRX3 (truncated header)");
|
|
90
|
+
const headerLen = buf.readUInt32LE(8);
|
|
91
|
+
if (12 + headerLen > buf.length)
|
|
92
|
+
throw new Error("malformed CRX3 (header overruns buffer)");
|
|
93
|
+
return buf.subarray(12 + headerLen);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Download + verify the Windows x64 Widevine CDM into `dest` (default ~/.clearcote/WidevineCdm/
|
|
97
|
+
* <version>). Returns the versioned CDM directory (manifest.json + _platform_specific/win_x64/
|
|
98
|
+
* widevinecdm.dll). Re-fetch is skipped if already present.
|
|
99
|
+
*/
|
|
100
|
+
export async function fetchWidevine(opts = {}) {
|
|
101
|
+
const [url, sha256, version] = parseUpdate(await postJson(OMAHA_URL, omahaRequestBody()));
|
|
102
|
+
const root = opts.dest || cacheRoot();
|
|
103
|
+
const verDir = path.join(root, version || "current");
|
|
104
|
+
const dll = path.join(verDir, "_platform_specific", "win_x64", "widevinecdm.dll");
|
|
105
|
+
if (existsSync(dll) && existsSync(path.join(verDir, "manifest.json"))) {
|
|
106
|
+
log(opts.quiet, `already present: ${verDir}`);
|
|
107
|
+
return verDir;
|
|
108
|
+
}
|
|
109
|
+
log(opts.quiet, `fetching CDM ${version || "(latest)"}`);
|
|
110
|
+
const res = await fetch(url, { headers: { "User-Agent": UA }, redirect: "follow", signal: AbortSignal.timeout(120_000) });
|
|
111
|
+
if (!res.ok)
|
|
112
|
+
throw new Error(`Widevine CDM download HTTP ${res.status}`);
|
|
113
|
+
const blob = Buffer.from(await res.arrayBuffer());
|
|
114
|
+
// The CDM is a NATIVE DLL loaded into the browser process — never install it unverified. A
|
|
115
|
+
// missing hash in the update response is a hard failure, not a skip.
|
|
116
|
+
if (!sha256)
|
|
117
|
+
throw new Error("Widevine update response had no sha256 — refusing to install an unverified CDM");
|
|
118
|
+
if (createHash("sha256").update(blob).digest("hex") !== sha256.toLowerCase()) {
|
|
119
|
+
throw new Error("Widevine CDM sha256 mismatch — refusing to install");
|
|
120
|
+
}
|
|
121
|
+
mkdirSync(verDir, { recursive: true });
|
|
122
|
+
const tmp = mkdtempSync(path.join(os.tmpdir(), "cc-wv-"));
|
|
123
|
+
const zipPath = path.join(tmp, "cdm.zip");
|
|
124
|
+
try {
|
|
125
|
+
writeFileSync(zipPath, crx3ToZip(blob));
|
|
126
|
+
await extract(zipPath, { dir: verDir });
|
|
127
|
+
}
|
|
128
|
+
finally {
|
|
129
|
+
await rm(tmp, { recursive: true, force: true });
|
|
130
|
+
}
|
|
131
|
+
if (!existsSync(dll))
|
|
132
|
+
throw new Error(`extracted CDM but widevinecdm.dll not at ${dll}`);
|
|
133
|
+
log(opts.quiet, `installed: ${verDir}`);
|
|
134
|
+
return verDir;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Make a persistent profile load the fetched CDM: copy it under <userDataDir>/WidevineCdm/<version>/
|
|
138
|
+
* and write the component hint file the engine reads. Fetches the CDM first if needed.
|
|
139
|
+
*/
|
|
140
|
+
export async function seedWidevine(userDataDir, opts = {}) {
|
|
141
|
+
const src = await fetchWidevine(opts);
|
|
142
|
+
const version = path.basename(src);
|
|
143
|
+
const wvRoot = path.join(userDataDir, "WidevineCdm");
|
|
144
|
+
const target = path.join(wvRoot, version);
|
|
145
|
+
if (!existsSync(path.join(target, "_platform_specific", "win_x64", "widevinecdm.dll"))) {
|
|
146
|
+
mkdirSync(wvRoot, { recursive: true });
|
|
147
|
+
cpSync(src, target, { recursive: true });
|
|
148
|
+
}
|
|
149
|
+
try {
|
|
150
|
+
writeFileSync(path.join(wvRoot, HINT_FILE), JSON.stringify({ Path: target }));
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
/* hint file is Linux-only; harmless if it can't be written */
|
|
154
|
+
}
|
|
155
|
+
log(opts.quiet, `seeded into ${wvRoot}`);
|
|
156
|
+
return target;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Adjust launch args so the engine actually registers the seeded CDM: un-suppress the component
|
|
160
|
+
* updater (Playwright disables it by default) and force the startup scan. Pure — returns the new
|
|
161
|
+
* values. `ignoreDefaultArgs` may be a list, `undefined`, or the boolean form Playwright accepts
|
|
162
|
+
* (`true` = ignore ALL defaults, so the updater is already un-suppressed); only the list/undefined
|
|
163
|
+
* forms need `--disable-component-update` added. Verified: with these, requestMediaKeySystemAccess
|
|
164
|
+
* + createMediaKeys succeed.
|
|
165
|
+
*/
|
|
166
|
+
export function widevineArgs(ignoreDefaultArgs, userArgs) {
|
|
167
|
+
let ida = ignoreDefaultArgs;
|
|
168
|
+
if (Array.isArray(ignoreDefaultArgs)) {
|
|
169
|
+
ida = ignoreDefaultArgs.includes("--disable-component-update")
|
|
170
|
+
? ignoreDefaultArgs
|
|
171
|
+
: [...ignoreDefaultArgs, "--disable-component-update"];
|
|
172
|
+
}
|
|
173
|
+
else if (ignoreDefaultArgs === undefined) {
|
|
174
|
+
ida = ["--disable-component-update"];
|
|
175
|
+
}
|
|
176
|
+
const args = userArgs.some((a) => a.includes("component-updater"))
|
|
177
|
+
? userArgs
|
|
178
|
+
: [...userArgs, "--component-updater=fast-update"];
|
|
179
|
+
return { ignoreDefaultArgs: ida, args };
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=widevine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widevine.js","sourceRoot":"","sources":["../src/widevine.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAAE;AACF,qGAAqG;AACrG,qGAAqG;AACrG,qGAAqG;AACrG,sGAAsG;AACtG,iGAAiG;AACjG,EAAE;AACF,wEAAwE;AACxE,mGAAmG;AACnG,qGAAqG;AAErG,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACpF,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,aAAa,CAAC;AAElC,6FAA6F;AAC7F,MAAM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CAAC;IAC3D,CAAC;SAAM,IAAI,iBAAiB,KAAK,SAAS,EAAE,CAAC;QAC3C,GAAG,GAAG,CAAC,4BAA4B,CAAC,CAAC;IACvC,CAAC;IACD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QAChE,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,CAAC,GAAG,QAAQ,EAAE,iCAAiC,CAAC,CAAC;IACrD,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAC1C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clearcote",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Playwright drop-in for the Clearcote anti-fingerprint Chromium build. launch() returns a standard Playwright Browser backed by the verified Clearcote binary, which is auto-downloaded and SHA-256 checked.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|