httpcloak 1.5.8 → 1.5.9
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 +44 -2
- package/npm/darwin-arm64/package.json +1 -1
- package/npm/darwin-x64/package.json +1 -1
- package/npm/linux-arm64/package.json +1 -1
- package/npm/linux-x64/package.json +1 -1
- package/npm/win32-arm64/package.json +1 -1
- package/npm/win32-x64/package.json +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -508,7 +508,11 @@ async function downloadLargeFile(): Promise<void> {
|
|
|
508
508
|
|
|
509
509
|
## Local Proxy
|
|
510
510
|
|
|
511
|
-
Use `LocalProxy` to apply TLS fingerprinting to any HTTP client (axios, node-fetch, etc.)
|
|
511
|
+
Use `LocalProxy` to apply TLS fingerprinting to any HTTP client (axios, node-fetch, etc.).
|
|
512
|
+
|
|
513
|
+
### HTTPS with True Streaming (Recommended)
|
|
514
|
+
|
|
515
|
+
For HTTPS requests with full fingerprinting AND true streaming (request/response bodies not materialized into memory), use the `X-HTTPCloak-Scheme` header:
|
|
512
516
|
|
|
513
517
|
```javascript
|
|
514
518
|
const { LocalProxy } = require("httpcloak");
|
|
@@ -518,7 +522,45 @@ const axios = require("axios");
|
|
|
518
522
|
const proxy = new LocalProxy({ preset: "chrome-143" });
|
|
519
523
|
console.log(`Proxy running on ${proxy.proxyUrl}`);
|
|
520
524
|
|
|
521
|
-
// Use with
|
|
525
|
+
// Use X-HTTPCloak-Scheme header for HTTPS with fingerprinting + streaming
|
|
526
|
+
const response = await axios.get("http://example.com/api", {
|
|
527
|
+
// Note: http:// URL
|
|
528
|
+
proxy: {
|
|
529
|
+
host: "127.0.0.1",
|
|
530
|
+
port: proxy.port,
|
|
531
|
+
},
|
|
532
|
+
headers: {
|
|
533
|
+
"X-HTTPCloak-Scheme": "https", // Upgrades to HTTPS with fingerprinting
|
|
534
|
+
},
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
// This provides:
|
|
538
|
+
// - Full TLS fingerprinting (Chrome/Firefox JA3/JA4)
|
|
539
|
+
// - HTTP/3 support
|
|
540
|
+
// - True streaming (request body NOT materialized into memory)
|
|
541
|
+
// - Header modification capabilities
|
|
542
|
+
|
|
543
|
+
proxy.close();
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
**Why use `X-HTTPCloak-Scheme`?**
|
|
547
|
+
|
|
548
|
+
Standard HTTP proxy clients use CONNECT tunneling for HTTPS, which means the proxy can't inspect or modify the request. The `X-HTTPCloak-Scheme: https` header tells LocalProxy to:
|
|
549
|
+
1. Accept the request as plain HTTP
|
|
550
|
+
2. Upgrade it to HTTPS internally
|
|
551
|
+
3. Apply full TLS fingerprinting
|
|
552
|
+
4. Stream request/response bodies without memory materialization
|
|
553
|
+
|
|
554
|
+
### Basic Usage
|
|
555
|
+
|
|
556
|
+
```javascript
|
|
557
|
+
const { LocalProxy } = require("httpcloak");
|
|
558
|
+
const axios = require("axios");
|
|
559
|
+
|
|
560
|
+
// Start local proxy with Chrome fingerprint
|
|
561
|
+
const proxy = new LocalProxy({ preset: "chrome-143" });
|
|
562
|
+
|
|
563
|
+
// Standard HTTPS (uses CONNECT tunnel - fingerprinting via upstream proxy only)
|
|
522
564
|
const response = await axios.get("https://example.com", {
|
|
523
565
|
proxy: {
|
|
524
566
|
host: "127.0.0.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "httpcloak",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.9",
|
|
4
4
|
"description": "Browser fingerprint emulation HTTP client with HTTP/1.1, HTTP/2, and HTTP/3 support",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"koffi": "^2.9.0"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@httpcloak/linux-x64": "1.5.
|
|
53
|
-
"@httpcloak/linux-arm64": "1.5.
|
|
54
|
-
"@httpcloak/darwin-x64": "1.5.
|
|
55
|
-
"@httpcloak/darwin-arm64": "1.5.
|
|
56
|
-
"@httpcloak/win32-x64": "1.5.
|
|
57
|
-
"@httpcloak/win32-arm64": "1.5.
|
|
52
|
+
"@httpcloak/linux-x64": "1.5.9",
|
|
53
|
+
"@httpcloak/linux-arm64": "1.5.9",
|
|
54
|
+
"@httpcloak/darwin-x64": "1.5.9",
|
|
55
|
+
"@httpcloak/darwin-arm64": "1.5.9",
|
|
56
|
+
"@httpcloak/win32-x64": "1.5.9",
|
|
57
|
+
"@httpcloak/win32-arm64": "1.5.9"
|
|
58
58
|
}
|
|
59
59
|
}
|