cfpilot 0.43.0 → 0.50.0
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/assets/cfpilot-kernel-VERSION +2 -2
- package/assets/control.js +25 -23
- package/assets/dataplane.js +13 -12
- package/assets/worker.js +30 -29
- package/dist/cli.js +12 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -87,7 +87,7 @@ var VERSION, NAME;
|
|
|
87
87
|
var init_version = __esm({
|
|
88
88
|
"src/shared/version.ts"() {
|
|
89
89
|
"use strict";
|
|
90
|
-
VERSION = "0.
|
|
90
|
+
VERSION = "0.50.0";
|
|
91
91
|
NAME = "cfpilot";
|
|
92
92
|
}
|
|
93
93
|
});
|
|
@@ -4327,6 +4327,17 @@ function measureThroughput(options) {
|
|
|
4327
4327
|
finish();
|
|
4328
4328
|
return;
|
|
4329
4329
|
}
|
|
4330
|
+
if (requiredHeader) {
|
|
4331
|
+
const headerLine = head.split("\r\n").find((l) => l.toLowerCase().startsWith(`${requiredHeader.toLowerCase()}:`));
|
|
4332
|
+
const declared = Number.parseInt(headerLine?.split(":")[1]?.trim() ?? "", 10);
|
|
4333
|
+
if (!Number.isFinite(declared) || declared < 1024 * 1024) {
|
|
4334
|
+
headerMismatch = true;
|
|
4335
|
+
lastError = `\u76EE\u6807\u63A2\u9488\u54CD\u5E94\u5934\u5F02\u5E38\uFF08${requiredHeader}=${headerLine?.split(":")[1]?.trim() ?? "\u7A7A"}\uFF09\uFF0C\u53EF\u6539\u7528 --speed-mode url`;
|
|
4336
|
+
socket.destroy();
|
|
4337
|
+
finish();
|
|
4338
|
+
return;
|
|
4339
|
+
}
|
|
4340
|
+
}
|
|
4330
4341
|
headerDone = true;
|
|
4331
4342
|
const body = headerBuffer.subarray(idx + 4);
|
|
4332
4343
|
meter.add(body.byteLength);
|