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/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.43.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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfpilot",
3
- "version": "0.43.0",
3
+ "version": "0.50.0",
4
4
  "description": "CFPilot —— Cloudflare Pages 代理部署与优选工具(交互菜单 + 子命令)",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",