@maiyunnet/kebab 8.5.3 → 8.5.4

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/doc/kebab-rag.md CHANGED
@@ -1410,7 +1410,7 @@ index/variables/VER.md
1410
1410
 
1411
1411
  # Variable: VER
1412
1412
 
1413
- > `const` **VER**: `"8.5.3"` = `'8.5.3'`
1413
+ > `const` **VER**: `"8.5.4"` = `'8.5.4'`
1414
1414
 
1415
1415
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1416
1416
 
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export declare const VER = "8.5.3";
8
+ export declare const VER = "8.5.4";
9
9
  /** --- 框架根目录,以 / 结尾 --- */
10
10
  export declare const ROOT_PATH: string;
11
11
  /** --- 框架的 LIB,以 / 结尾 --- */
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * --- 本文件用来定义每个目录实体地址的常量 ---
7
7
  */
8
8
  /** --- 当前系统版本号 --- */
9
- export const VER = '8.5.3';
9
+ export const VER = '8.5.4';
10
10
  // --- 服务端用的路径 ---
11
11
  const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
12
12
  /** --- /xxx/xxx --- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "8.5.3",
3
+ "version": "8.5.4",
4
4
  "description": "Simple, easy-to-use, and fully-featured Node.js framework that is ready-to-use out of the box.",
5
5
  "type": "module",
6
6
  "keywords": [
package/sys/child.js CHANGED
@@ -113,7 +113,12 @@ async function run() {
113
113
  cb(err);
114
114
  },
115
115
  'ciphers': 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS',
116
- 'allowHTTP1': true
116
+ 'allowHTTP1': true,
117
+ // --- 防止 CDN 回源时 HTTP/2 流异常导致 RST_STREAM ---
118
+ 'maxSessionMemory': 32,
119
+ 'settings': {
120
+ 'maxConcurrentStreams': 128,
121
+ }
117
122
  }, function (req, res) {
118
123
  const host = (req.headers[':authority'] ?? req.headers['host'] ?? '');
119
124
  if (!host) {
@@ -133,6 +138,8 @@ async function run() {
133
138
  }
134
139
  wrapWithLinkCount(host + (req.url ?? ''), () => upgradeHandler(req, socket, true, head), '[CHILD][http2][upgrade]', 'UPGRADE');
135
140
  }).listen(lCore.globalConfig.httpsPort);
141
+ // --- 增大 HTTP/2 超时,防止 CDN 预建连接被 Node.js 过早关闭 ---
142
+ http2Server.setTimeout(120_000);
136
143
  httpServer = http.createServer(function (req, res) {
137
144
  const host = (req.headers['host'] ?? '');
138
145
  if (!host) {
@@ -157,6 +164,9 @@ async function run() {
157
164
  }
158
165
  wrapWithLinkCount(host + (req.url ?? ''), () => upgradeHandler(req, socket, false, head), '[CHILD][http][upgrade]', 'UPGRADE');
159
166
  }).listen(lCore.globalConfig.httpPort);
167
+ // --- 增大超时,防止 CDN 回源 Keep-Alive 连接被 Node.js 过早关闭导致 net_exception_peer_error ---
168
+ httpServer.headersTimeout = 120_000;
169
+ httpServer.keepAliveTimeout = 65_000;
160
170
  // --- 启动性能监控 ---
161
171
  sMonitor.start();
162
172
  }