cloakbrowser 0.3.13 → 0.3.14
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 +11 -0
- package/dist/cli.d.ts +12 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +89 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.js +2 -2
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -133,6 +133,17 @@ const browser = await launch({ proxy: 'http://proxy:8080', geoip: true, timezone
|
|
|
133
133
|
|
|
134
134
|
> **Note:** For rotating residential proxies, the DNS-resolved IP may differ from the exit IP. Pass explicit `timezone`/`locale` in those cases.
|
|
135
135
|
|
|
136
|
+
### CLI
|
|
137
|
+
|
|
138
|
+
Pre-download the binary or check installation status from the command line:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npx cloakbrowser install # Download binary with progress output
|
|
142
|
+
npx cloakbrowser info # Show version, path, platform
|
|
143
|
+
npx cloakbrowser update # Check for and download newer binary
|
|
144
|
+
npx cloakbrowser clear-cache # Remove cached binaries
|
|
145
|
+
```
|
|
146
|
+
|
|
136
147
|
### Utilities
|
|
137
148
|
|
|
138
149
|
```javascript
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* CLI for cloakbrowser — download and manage the stealth Chromium binary.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* npx cloakbrowser install # Download binary (with progress)
|
|
7
|
+
* npx cloakbrowser info # Show binary version, path, platform
|
|
8
|
+
* npx cloakbrowser update # Check for and download newer binary
|
|
9
|
+
* npx cloakbrowser clear-cache # Remove cached binaries
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG"}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* CLI for cloakbrowser — download and manage the stealth Chromium binary.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* npx cloakbrowser install # Download binary (with progress)
|
|
7
|
+
* npx cloakbrowser info # Show binary version, path, platform
|
|
8
|
+
* npx cloakbrowser update # Check for and download newer binary
|
|
9
|
+
* npx cloakbrowser clear-cache # Remove cached binaries
|
|
10
|
+
*/
|
|
11
|
+
import { ensureBinary, binaryInfo, checkForUpdate, clearCache } from "./download.js";
|
|
12
|
+
import { getLocalBinaryOverride, getCacheDir } from "./config.js";
|
|
13
|
+
import fs from "node:fs";
|
|
14
|
+
const USAGE = `Usage: cloakbrowser <command>
|
|
15
|
+
|
|
16
|
+
Commands:
|
|
17
|
+
install Download the Chromium binary
|
|
18
|
+
info Show binary version, path, and platform
|
|
19
|
+
update Check for and download a newer binary
|
|
20
|
+
clear-cache Remove all cached binaries`;
|
|
21
|
+
async function cmdInstall() {
|
|
22
|
+
const binaryPath = await ensureBinary();
|
|
23
|
+
console.log(binaryPath);
|
|
24
|
+
}
|
|
25
|
+
function cmdInfo() {
|
|
26
|
+
const info = binaryInfo();
|
|
27
|
+
const override = getLocalBinaryOverride();
|
|
28
|
+
console.log(`Version: ${info.version}`);
|
|
29
|
+
console.log(`Platform: ${info.platform}`);
|
|
30
|
+
console.log(`Binary: ${info.binaryPath}`);
|
|
31
|
+
console.log(`Installed: ${info.installed}`);
|
|
32
|
+
console.log(`Cache: ${info.cacheDir}`);
|
|
33
|
+
if (override) {
|
|
34
|
+
console.log(`Override: ${override} (CLOAKBROWSER_BINARY_PATH)`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function cmdUpdate() {
|
|
38
|
+
console.error("Checking for updates...");
|
|
39
|
+
const newVersion = await checkForUpdate();
|
|
40
|
+
if (newVersion) {
|
|
41
|
+
console.log(`Updated to Chromium ${newVersion}`);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
console.log("Already up to date.");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function cmdClearCache() {
|
|
48
|
+
const cacheDir = getCacheDir();
|
|
49
|
+
if (!fs.existsSync(cacheDir)) {
|
|
50
|
+
console.log("No cache to clear.");
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
clearCache();
|
|
54
|
+
console.log("Cache cleared.");
|
|
55
|
+
}
|
|
56
|
+
async function main() {
|
|
57
|
+
const command = process.argv[2];
|
|
58
|
+
if (!command || command === "--help" || command === "-h") {
|
|
59
|
+
console.log(USAGE);
|
|
60
|
+
process.exit(command ? 0 : 2);
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
switch (command) {
|
|
64
|
+
case "install":
|
|
65
|
+
await cmdInstall();
|
|
66
|
+
break;
|
|
67
|
+
case "info":
|
|
68
|
+
cmdInfo();
|
|
69
|
+
break;
|
|
70
|
+
case "update":
|
|
71
|
+
await cmdUpdate();
|
|
72
|
+
break;
|
|
73
|
+
case "clear-cache":
|
|
74
|
+
cmdClearCache();
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
console.error(`Unknown command: ${command}\n`);
|
|
78
|
+
console.log(USAGE);
|
|
79
|
+
process.exit(2);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
84
|
+
console.error(`Error: ${message}`);
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
main();
|
|
89
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAC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G,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,OAAO,CAAC,KAAK,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
declare let WRAPPER_VERSION: string;
|
|
6
6
|
export { WRAPPER_VERSION };
|
|
7
|
-
export declare const CHROMIUM_VERSION = "145.0.7632.159.
|
|
7
|
+
export declare const CHROMIUM_VERSION = "145.0.7632.159.6";
|
|
8
8
|
export declare const PLATFORM_CHROMIUM_VERSIONS: Record<string, string>;
|
|
9
9
|
export declare function getChromiumVersion(): string;
|
|
10
10
|
export declare function getPlatformTag(): string;
|
package/dist/config.js
CHANGED
|
@@ -25,9 +25,9 @@ export { WRAPPER_VERSION };
|
|
|
25
25
|
// CHROMIUM_VERSION is the latest across all platforms (for display/reference).
|
|
26
26
|
// Use getChromiumVersion() for the current platform's actual version.
|
|
27
27
|
// ---------------------------------------------------------------------------
|
|
28
|
-
export const CHROMIUM_VERSION = "145.0.7632.159.
|
|
28
|
+
export const CHROMIUM_VERSION = "145.0.7632.159.6";
|
|
29
29
|
export const PLATFORM_CHROMIUM_VERSIONS = {
|
|
30
|
-
"linux-x64": "145.0.7632.159.
|
|
30
|
+
"linux-x64": "145.0.7632.159.6",
|
|
31
31
|
"darwin-arm64": "145.0.7632.109.2",
|
|
32
32
|
"darwin-x64": "145.0.7632.109.2",
|
|
33
33
|
"windows-x64": "145.0.7632.109.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloakbrowser",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"description": "Stealth Chromium that passes every bot detection test. Drop-in Playwright/Puppeteer replacement with source-level fingerprint patches.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
"import": "./dist/puppeteer.js"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"cloakbrowser": "./dist/cli.js"
|
|
20
|
+
},
|
|
18
21
|
"files": [
|
|
19
22
|
"dist"
|
|
20
23
|
],
|