@maiyunnet/kebab 9.2.3 → 9.2.5
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 +35 -35
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/undici/response.d.ts +1 -1
- package/lib/undici/response.js +1 -6
- package/lib/undici.js +6 -5
- package/package.json +1 -1
package/doc/kebab-rag.md
CHANGED
|
@@ -1360,7 +1360,7 @@ index/variables/VER.md
|
|
|
1360
1360
|
|
|
1361
1361
|
# Variable: VER
|
|
1362
1362
|
|
|
1363
|
-
> `const` **VER**: `"9.2.
|
|
1363
|
+
> `const` **VER**: `"9.2.5"` = `'9.2.5'`
|
|
1364
1364
|
|
|
1365
1365
|
Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
|
|
1366
1366
|
|
|
@@ -17962,7 +17962,7 @@ lib/undici/functions/mproxyData.md
|
|
|
17962
17962
|
|
|
17963
17963
|
> **mproxyData**(`ctr`): `any`
|
|
17964
17964
|
|
|
17965
|
-
Defined in: [lib/undici.ts:
|
|
17965
|
+
Defined in: [lib/undici.ts:602](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L602)
|
|
17966
17966
|
|
|
17967
17967
|
获取 mproxy 的附加数据
|
|
17968
17968
|
|
|
@@ -18222,7 +18222,7 @@ lib/undici/functions/rproxy.md
|
|
|
18222
18222
|
|
|
18223
18223
|
> **rproxy**(`ctr`, `route`, `opt?`): `Promise`\<`boolean`\>
|
|
18224
18224
|
|
|
18225
|
-
Defined in: [lib/undici.ts:
|
|
18225
|
+
Defined in: [lib/undici.ts:620](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L620)
|
|
18226
18226
|
|
|
18227
18227
|
反向代理,注意提前处理不要自动处理 post 数据,将本服务器的某个路由反代到其他网址
|
|
18228
18228
|
|
|
@@ -18299,7 +18299,7 @@ lib/undici/interfaces/IMproxyOptions.md
|
|
|
18299
18299
|
|
|
18300
18300
|
# Interface: IMproxyOptions
|
|
18301
18301
|
|
|
18302
|
-
Defined in: [lib/undici.ts:
|
|
18302
|
+
Defined in: [lib/undici.ts:704](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L704)
|
|
18303
18303
|
|
|
18304
18304
|
正向代理请求的传入参数选项
|
|
18305
18305
|
|
|
@@ -18309,7 +18309,7 @@ Defined in: [lib/undici.ts:703](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18309
18309
|
|
|
18310
18310
|
> `optional` **filter?**: (`h`) => `boolean`
|
|
18311
18311
|
|
|
18312
|
-
Defined in: [lib/undici.ts:
|
|
18312
|
+
Defined in: [lib/undici.ts:713](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L713)
|
|
18313
18313
|
|
|
18314
18314
|
过滤 header,返回 true 则留下
|
|
18315
18315
|
|
|
@@ -18329,7 +18329,7 @@ Defined in: [lib/undici.ts:712](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18329
18329
|
|
|
18330
18330
|
> `optional` **follow?**: `number`
|
|
18331
18331
|
|
|
18332
|
-
Defined in: [lib/undici.ts:
|
|
18332
|
+
Defined in: [lib/undici.ts:707](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L707)
|
|
18333
18333
|
|
|
18334
18334
|
***
|
|
18335
18335
|
|
|
@@ -18337,7 +18337,7 @@ Defined in: [lib/undici.ts:706](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18337
18337
|
|
|
18338
18338
|
> `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
|
|
18339
18339
|
|
|
18340
|
-
Defined in: [lib/undici.ts:
|
|
18340
|
+
Defined in: [lib/undici.ts:711](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L711)
|
|
18341
18341
|
|
|
18342
18342
|
***
|
|
18343
18343
|
|
|
@@ -18345,7 +18345,7 @@ Defined in: [lib/undici.ts:710](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18345
18345
|
|
|
18346
18346
|
> `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
|
|
18347
18347
|
|
|
18348
|
-
Defined in: [lib/undici.ts:
|
|
18348
|
+
Defined in: [lib/undici.ts:709](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L709)
|
|
18349
18349
|
|
|
18350
18350
|
自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
|
|
18351
18351
|
|
|
@@ -18355,7 +18355,7 @@ Defined in: [lib/undici.ts:708](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18355
18355
|
|
|
18356
18356
|
> `optional` **local?**: `string`
|
|
18357
18357
|
|
|
18358
|
-
Defined in: [lib/undici.ts:
|
|
18358
|
+
Defined in: [lib/undici.ts:710](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L710)
|
|
18359
18359
|
|
|
18360
18360
|
***
|
|
18361
18361
|
|
|
@@ -18363,7 +18363,7 @@ Defined in: [lib/undici.ts:709](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18363
18363
|
|
|
18364
18364
|
> `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
|
|
18365
18365
|
|
|
18366
|
-
Defined in: [lib/undici.ts:
|
|
18366
|
+
Defined in: [lib/undici.ts:715](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L715)
|
|
18367
18367
|
|
|
18368
18368
|
默认为 default
|
|
18369
18369
|
|
|
@@ -18373,7 +18373,7 @@ Defined in: [lib/undici.ts:714](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18373
18373
|
|
|
18374
18374
|
> `optional` **timeout?**: `number`
|
|
18375
18375
|
|
|
18376
|
-
Defined in: [lib/undici.ts:
|
|
18376
|
+
Defined in: [lib/undici.ts:706](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L706)
|
|
18377
18377
|
|
|
18378
18378
|
秒数
|
|
18379
18379
|
|
|
@@ -18388,7 +18388,7 @@ lib/undici/interfaces/IRequestOptions.md
|
|
|
18388
18388
|
|
|
18389
18389
|
# Interface: IRequestOptions
|
|
18390
18390
|
|
|
18391
|
-
Defined in: [lib/undici.ts:
|
|
18391
|
+
Defined in: [lib/undici.ts:673](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L673)
|
|
18392
18392
|
|
|
18393
18393
|
请求的传入参数选项
|
|
18394
18394
|
|
|
@@ -18398,7 +18398,7 @@ Defined in: [lib/undici.ts:672](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18398
18398
|
|
|
18399
18399
|
> `optional` **cookie?**: `Record`\<`string`, [`ICookie`](../../cookie/interfaces/ICookie.md)\>
|
|
18400
18400
|
|
|
18401
|
-
Defined in: [lib/undici.ts:
|
|
18401
|
+
Defined in: [lib/undici.ts:698](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L698)
|
|
18402
18402
|
|
|
18403
18403
|
cookie 托管对象
|
|
18404
18404
|
|
|
@@ -18408,7 +18408,7 @@ cookie 托管对象
|
|
|
18408
18408
|
|
|
18409
18409
|
> `optional` **follow?**: `number`
|
|
18410
18410
|
|
|
18411
|
-
Defined in: [lib/undici.ts:
|
|
18411
|
+
Defined in: [lib/undici.ts:679](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L679)
|
|
18412
18412
|
|
|
18413
18413
|
追踪 location 次数,0 为不追踪,默认为 0
|
|
18414
18414
|
|
|
@@ -18418,7 +18418,7 @@ Defined in: [lib/undici.ts:678](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18418
18418
|
|
|
18419
18419
|
> `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
|
|
18420
18420
|
|
|
18421
|
-
Defined in: [lib/undici.ts:
|
|
18421
|
+
Defined in: [lib/undici.ts:684](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L684)
|
|
18422
18422
|
|
|
18423
18423
|
***
|
|
18424
18424
|
|
|
@@ -18426,7 +18426,7 @@ Defined in: [lib/undici.ts:683](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18426
18426
|
|
|
18427
18427
|
> `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
|
|
18428
18428
|
|
|
18429
|
-
Defined in: [lib/undici.ts:
|
|
18429
|
+
Defined in: [lib/undici.ts:681](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L681)
|
|
18430
18430
|
|
|
18431
18431
|
自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
|
|
18432
18432
|
|
|
@@ -18436,7 +18436,7 @@ Defined in: [lib/undici.ts:680](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18436
18436
|
|
|
18437
18437
|
> `optional` **keep?**: `boolean`
|
|
18438
18438
|
|
|
18439
|
-
Defined in: [lib/undici.ts:
|
|
18439
|
+
Defined in: [lib/undici.ts:694](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L694)
|
|
18440
18440
|
|
|
18441
18441
|
连接是否保持长连接(即是否允许复用),默认为 true
|
|
18442
18442
|
|
|
@@ -18446,7 +18446,7 @@ Defined in: [lib/undici.ts:693](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18446
18446
|
|
|
18447
18447
|
> `optional` **local?**: `string`
|
|
18448
18448
|
|
|
18449
|
-
Defined in: [lib/undici.ts:
|
|
18449
|
+
Defined in: [lib/undici.ts:683](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L683)
|
|
18450
18450
|
|
|
18451
18451
|
***
|
|
18452
18452
|
|
|
@@ -18454,7 +18454,7 @@ Defined in: [lib/undici.ts:682](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18454
18454
|
|
|
18455
18455
|
> `optional` **log?**: `boolean`
|
|
18456
18456
|
|
|
18457
|
-
Defined in: [lib/undici.ts:
|
|
18457
|
+
Defined in: [lib/undici.ts:700](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L700)
|
|
18458
18458
|
|
|
18459
18459
|
若有异常写入文件日志,默认为 true
|
|
18460
18460
|
|
|
@@ -18464,7 +18464,7 @@ Defined in: [lib/undici.ts:699](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18464
18464
|
|
|
18465
18465
|
> `optional` **method?**: `"GET"` \| `"POST"` \| `"PUT"` \| `"DELETE"` \| `"OPTIONS"`
|
|
18466
18466
|
|
|
18467
|
-
Defined in: [lib/undici.ts:
|
|
18467
|
+
Defined in: [lib/undici.ts:674](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L674)
|
|
18468
18468
|
|
|
18469
18469
|
***
|
|
18470
18470
|
|
|
@@ -18472,7 +18472,7 @@ Defined in: [lib/undici.ts:673](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18472
18472
|
|
|
18473
18473
|
> `optional` **mproxy?**: `object`
|
|
18474
18474
|
|
|
18475
|
-
Defined in: [lib/undici.ts:
|
|
18475
|
+
Defined in: [lib/undici.ts:686](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L686)
|
|
18476
18476
|
|
|
18477
18477
|
正向 mproxy 代理,url 如 https://xxx/abc
|
|
18478
18478
|
|
|
@@ -18500,7 +18500,7 @@ Defined in: [lib/undici.ts:685](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18500
18500
|
|
|
18501
18501
|
> `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
|
|
18502
18502
|
|
|
18503
|
-
Defined in: [lib/undici.ts:
|
|
18503
|
+
Defined in: [lib/undici.ts:696](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L696)
|
|
18504
18504
|
|
|
18505
18505
|
复用池名/Agent,默认为 default
|
|
18506
18506
|
|
|
@@ -18510,7 +18510,7 @@ Defined in: [lib/undici.ts:695](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18510
18510
|
|
|
18511
18511
|
> `optional` **save?**: `string`
|
|
18512
18512
|
|
|
18513
|
-
Defined in: [lib/undici.ts:
|
|
18513
|
+
Defined in: [lib/undici.ts:682](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L682)
|
|
18514
18514
|
|
|
18515
18515
|
***
|
|
18516
18516
|
|
|
@@ -18518,7 +18518,7 @@ Defined in: [lib/undici.ts:681](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18518
18518
|
|
|
18519
18519
|
> `optional` **timeout?**: `number`
|
|
18520
18520
|
|
|
18521
|
-
Defined in: [lib/undici.ts:
|
|
18521
|
+
Defined in: [lib/undici.ts:677](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L677)
|
|
18522
18522
|
|
|
18523
18523
|
秒数,默认 10 秒
|
|
18524
18524
|
|
|
@@ -18528,7 +18528,7 @@ Defined in: [lib/undici.ts:676](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18528
18528
|
|
|
18529
18529
|
> `optional` **type?**: `"form"` \| `"json"`
|
|
18530
18530
|
|
|
18531
|
-
Defined in: [lib/undici.ts:
|
|
18531
|
+
Defined in: [lib/undici.ts:675](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L675)
|
|
18532
18532
|
|
|
18533
18533
|
lib/undici/interfaces/IRproxyOptions.md
|
|
18534
18534
|
---
|
|
@@ -18541,7 +18541,7 @@ lib/undici/interfaces/IRproxyOptions.md
|
|
|
18541
18541
|
|
|
18542
18542
|
# Interface: IRproxyOptions
|
|
18543
18543
|
|
|
18544
|
-
Defined in: [lib/undici.ts:
|
|
18544
|
+
Defined in: [lib/undici.ts:719](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L719)
|
|
18545
18545
|
|
|
18546
18546
|
反向代理请求的传入参数选项
|
|
18547
18547
|
|
|
@@ -18551,7 +18551,7 @@ Defined in: [lib/undici.ts:718](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18551
18551
|
|
|
18552
18552
|
> `optional` **filter?**: (`h`) => `boolean`
|
|
18553
18553
|
|
|
18554
|
-
Defined in: [lib/undici.ts:
|
|
18554
|
+
Defined in: [lib/undici.ts:728](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L728)
|
|
18555
18555
|
|
|
18556
18556
|
过滤 header,返回 true 则留下
|
|
18557
18557
|
|
|
@@ -18571,7 +18571,7 @@ Defined in: [lib/undici.ts:727](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18571
18571
|
|
|
18572
18572
|
> `optional` **follow?**: `number`
|
|
18573
18573
|
|
|
18574
|
-
Defined in: [lib/undici.ts:
|
|
18574
|
+
Defined in: [lib/undici.ts:722](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L722)
|
|
18575
18575
|
|
|
18576
18576
|
***
|
|
18577
18577
|
|
|
@@ -18579,7 +18579,7 @@ Defined in: [lib/undici.ts:721](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18579
18579
|
|
|
18580
18580
|
> `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
|
|
18581
18581
|
|
|
18582
|
-
Defined in: [lib/undici.ts:
|
|
18582
|
+
Defined in: [lib/undici.ts:726](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L726)
|
|
18583
18583
|
|
|
18584
18584
|
***
|
|
18585
18585
|
|
|
@@ -18587,7 +18587,7 @@ Defined in: [lib/undici.ts:725](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18587
18587
|
|
|
18588
18588
|
> `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
|
|
18589
18589
|
|
|
18590
|
-
Defined in: [lib/undici.ts:
|
|
18590
|
+
Defined in: [lib/undici.ts:724](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L724)
|
|
18591
18591
|
|
|
18592
18592
|
自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
|
|
18593
18593
|
|
|
@@ -18597,7 +18597,7 @@ Defined in: [lib/undici.ts:723](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18597
18597
|
|
|
18598
18598
|
> `optional` **local?**: `string`
|
|
18599
18599
|
|
|
18600
|
-
Defined in: [lib/undici.ts:
|
|
18600
|
+
Defined in: [lib/undici.ts:725](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L725)
|
|
18601
18601
|
|
|
18602
18602
|
***
|
|
18603
18603
|
|
|
@@ -18605,7 +18605,7 @@ Defined in: [lib/undici.ts:724](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18605
18605
|
|
|
18606
18606
|
> `optional` **mproxy?**: `object`
|
|
18607
18607
|
|
|
18608
|
-
Defined in: [lib/undici.ts:
|
|
18608
|
+
Defined in: [lib/undici.ts:730](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L730)
|
|
18609
18609
|
|
|
18610
18610
|
正向 mproxy 代理,url 如 https://xxx/abc
|
|
18611
18611
|
|
|
@@ -18633,7 +18633,7 @@ Defined in: [lib/undici.ts:729](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18633
18633
|
|
|
18634
18634
|
> `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
|
|
18635
18635
|
|
|
18636
|
-
Defined in: [lib/undici.ts:
|
|
18636
|
+
Defined in: [lib/undici.ts:738](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L738)
|
|
18637
18637
|
|
|
18638
18638
|
默认为 default
|
|
18639
18639
|
|
|
@@ -18643,7 +18643,7 @@ Defined in: [lib/undici.ts:737](https://github.com/maiyunnet/kebab/blob/master/l
|
|
|
18643
18643
|
|
|
18644
18644
|
> `optional` **timeout?**: `number`
|
|
18645
18645
|
|
|
18646
|
-
Defined in: [lib/undici.ts:
|
|
18646
|
+
Defined in: [lib/undici.ts:721](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L721)
|
|
18647
18647
|
|
|
18648
18648
|
秒数
|
|
18649
18649
|
|
|
@@ -19132,7 +19132,7 @@ lib/undici/type-aliases/THttpHeaders.md
|
|
|
19132
19132
|
|
|
19133
19133
|
> **THttpHeaders** = `http.IncomingHttpHeaders` & `object`
|
|
19134
19134
|
|
|
19135
|
-
Defined in: [lib/undici.ts:
|
|
19135
|
+
Defined in: [lib/undici.ts:743](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L743)
|
|
19136
19136
|
|
|
19137
19137
|
http headers
|
|
19138
19138
|
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* --- 本文件用来定义每个目录实体地址的常量 ---
|
|
7
7
|
*/
|
|
8
8
|
/** --- 当前系统版本号 --- */
|
|
9
|
-
export const VER = '9.2.
|
|
9
|
+
export const VER = '9.2.5';
|
|
10
10
|
// --- 服务端用的路径 ---
|
|
11
11
|
const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
|
|
12
12
|
/** --- /xxx/xxx --- */
|
package/lib/undici/response.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare class Response {
|
|
|
31
31
|
/**
|
|
32
32
|
* --- 获取响应读取流对象 ---
|
|
33
33
|
*/
|
|
34
|
-
getStream():
|
|
34
|
+
getStream(): (import("undici/types/readable").default & undici.Dispatcher.BodyMixin) | zlib.Gunzip | zlib.Inflate | zlib.BrotliDecompress | null;
|
|
35
35
|
/**
|
|
36
36
|
* --- 获取原生响应读取流对象 ---
|
|
37
37
|
*/
|
package/lib/undici/response.js
CHANGED
|
@@ -101,11 +101,6 @@ export class Response {
|
|
|
101
101
|
*/
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
103
103
|
getRawStream() {
|
|
104
|
-
|
|
105
|
-
return this._req ? this._req.body : null;
|
|
106
|
-
}
|
|
107
|
-
catch {
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
104
|
+
return this._req ? this._req.body : null;
|
|
110
105
|
}
|
|
111
106
|
}
|
package/lib/undici.js
CHANGED
|
@@ -333,7 +333,7 @@ export async function request(u, data, opt = {}) {
|
|
|
333
333
|
'message': 'hostname not found',
|
|
334
334
|
};
|
|
335
335
|
if (opt.log === undefined || opt.log) {
|
|
336
|
-
lCore.log({}, `[
|
|
336
|
+
lCore.log({}, `[UNDICI][REQUEST] ${res.error.message}`, '-neterror');
|
|
337
337
|
}
|
|
338
338
|
return res;
|
|
339
339
|
}
|
|
@@ -346,7 +346,7 @@ export async function request(u, data, opt = {}) {
|
|
|
346
346
|
'message': 'hosts param error',
|
|
347
347
|
};
|
|
348
348
|
if (opt.log === undefined || opt.log) {
|
|
349
|
-
lCore.log({}, `[
|
|
349
|
+
lCore.log({}, `[UNDICI][REQUEST] ${res.error.message}`, '-neterror');
|
|
350
350
|
}
|
|
351
351
|
return res;
|
|
352
352
|
}
|
|
@@ -364,7 +364,7 @@ export async function request(u, data, opt = {}) {
|
|
|
364
364
|
const res = new lResponse.Response(null);
|
|
365
365
|
res.error = err;
|
|
366
366
|
if (opt.log === undefined || opt.log) {
|
|
367
|
-
lCore.log({}, `[
|
|
367
|
+
lCore.log({}, `[UNDICI][REQUEST] ${err.message}`, '-neterror');
|
|
368
368
|
}
|
|
369
369
|
return res;
|
|
370
370
|
}
|
|
@@ -489,7 +489,7 @@ export async function mproxy(ctr, auth, opt = {}) {
|
|
|
489
489
|
/** --- 客户端请求中的 get 的数据 --- */
|
|
490
490
|
const get = ctr.getPrototype('_get');
|
|
491
491
|
if (req.readableEnded) {
|
|
492
|
-
return -
|
|
492
|
+
return -4;
|
|
493
493
|
}
|
|
494
494
|
if (get['auth'] !== auth) {
|
|
495
495
|
return 0;
|
|
@@ -506,10 +506,11 @@ export async function mproxy(ctr, auth, opt = {}) {
|
|
|
506
506
|
const rres = await request(get['url'], req, {
|
|
507
507
|
...opt,
|
|
508
508
|
'hosts': lText.logicalOr(hosts, opt.hosts),
|
|
509
|
-
headers
|
|
509
|
+
headers,
|
|
510
510
|
});
|
|
511
511
|
const stream = rres.getRawStream();
|
|
512
512
|
if (!stream) {
|
|
513
|
+
lCore.log({}, `[UNDICI][MPROXY] ${rres.error?.message ?? 'null'}, ${get['url']}`, '-neterror');
|
|
513
514
|
return -3;
|
|
514
515
|
}
|
|
515
516
|
if (rres.error) {
|