xshell 1.0.109 → 1.0.111
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/i18n/index.js +1 -0
- package/net.d.ts +1 -1
- package/net.js +2 -2
- package/package.json +2 -2
- package/server.d.ts +1 -0
- package/server.js +2 -1
package/i18n/index.js
CHANGED
package/net.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare const WebSocketClosed = 3;
|
|
|
20
20
|
export declare enum MyProxy {
|
|
21
21
|
socks5 = "http://localhost:10080",
|
|
22
22
|
whistle = "http://localhost:8899",
|
|
23
|
-
work = "http://
|
|
23
|
+
work = "http://127.0.0.1:10090"
|
|
24
24
|
}
|
|
25
25
|
export declare const cookies: {
|
|
26
26
|
store: MemoryCookieStore;
|
package/net.js
CHANGED
|
@@ -11,7 +11,7 @@ export var MyProxy;
|
|
|
11
11
|
(function (MyProxy) {
|
|
12
12
|
MyProxy["socks5"] = "http://localhost:10080";
|
|
13
13
|
MyProxy["whistle"] = "http://localhost:8899";
|
|
14
|
-
MyProxy["work"] = "http://
|
|
14
|
+
MyProxy["work"] = "http://127.0.0.1:10090";
|
|
15
15
|
})(MyProxy || (MyProxy = {}));
|
|
16
16
|
// ------------------------------------ fetch, request
|
|
17
17
|
export const cookies = {
|
|
@@ -81,7 +81,7 @@ export async function request(url, options = {}) {
|
|
|
81
81
|
let headers = {
|
|
82
82
|
'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,ja-JP;q=0.6,ja;q=0.5',
|
|
83
83
|
'accept-encoding': 'gzip, deflate, br',
|
|
84
|
-
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
|
|
84
|
+
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36',
|
|
85
85
|
'sec-ch-ua-platform': '"Windows"',
|
|
86
86
|
'sec-ch-ua-platform-version': '"15.0.0"',
|
|
87
87
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xshell",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.111",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"emoji-regex": "^10.3.0",
|
|
78
78
|
"eslint": "^9.3.0",
|
|
79
79
|
"eslint-plugin-import": "^2.29.1",
|
|
80
|
-
"eslint-plugin-react": "^7.34.
|
|
80
|
+
"eslint-plugin-react": "^7.34.2",
|
|
81
81
|
"gulp-sort": "^2.0.0",
|
|
82
82
|
"hash-string": "^1.0.0",
|
|
83
83
|
"https-proxy-agent": "^7.0.4",
|
package/server.d.ts
CHANGED
package/server.js
CHANGED
|
@@ -25,6 +25,7 @@ export class Server {
|
|
|
25
25
|
UAParser;
|
|
26
26
|
js_exts = new Set(['.js', '.mjs', '.cjs']);
|
|
27
27
|
empty_body_statuses = new Set([304, 204, 205]);
|
|
28
|
+
empty_body_methods = new Set(['HEAD', 'OPTIONS']);
|
|
28
29
|
app;
|
|
29
30
|
handler;
|
|
30
31
|
/** 启用 http server */
|
|
@@ -484,7 +485,7 @@ export class Server {
|
|
|
484
485
|
// 关联了 response_.body 到 res 的 finish 事件,(koa/response.js#set body() 中 onFinish(res, destroy.bind(null, response_.body))
|
|
485
486
|
// 会让 response_.body 这个 UndiciBodyReadable 被提前 finish,而此时
|
|
486
487
|
// 流还没 emit end, 会触发错误 RequestAbortedError [AbortError]: Request aborted
|
|
487
|
-
if (this.empty_body_statuses.has(response_.status))
|
|
488
|
+
if (this.empty_body_statuses.has(response_.status) || this.empty_body_methods.has(method))
|
|
488
489
|
consume_stream(response_.body, true);
|
|
489
490
|
else
|
|
490
491
|
response.body = response_.body;
|