@twinsearth/dsh-2xray 0.2.5 → 0.2.6
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/CHANGELOG.md +8 -0
- package/README.md +12 -0
- package/lib/client.js +6 -2
- package/package.json +1 -1
- package/scripts/release-check.mjs +2 -1
- package/tools/launch-with-browser-proxy.cmd +30 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.6 — 2026-10-29
|
|
4
|
+
|
|
5
|
+
### 内置浏览器支持
|
|
6
|
+
|
|
7
|
+
- 新增 `tools/launch-with-browser-proxy.cmd`:以 `--proxy-server=http://127.0.0.1:20808` 启动 DSH,让内置 Chromium 浏览器也走插件的 xray。
|
|
8
|
+
- 设置页与插件页卡片增加说明:Node 插件无法在运行时修改 Chromium 的 session 代理,必须带启动参数重启;系统代理/TUN 是另一条全机路径。
|
|
9
|
+
- 保留边界:插件仍只接管 DSH 进程内的 undici fetch。
|
|
10
|
+
|
|
3
11
|
## 0.2.5 — 2026-10-29
|
|
4
12
|
|
|
5
13
|
### 修复
|
package/README.md
CHANGED
|
@@ -328,6 +328,18 @@ v0.2.0 提供两个入口,互不替代:
|
|
|
328
328
|
| 状态一直 `degraded` + `route-install-failed` | 查日志里的模块解析诊断;必要时确认 DSH 安装目录结构 |
|
|
329
329
|
| `xray_switch_node` 报 `unknown service ... RoutingService` | xray 版本早于 2024-09;升级二进制,或关闭 `control.enabled` 只用 `activeNode` |
|
|
330
330
|
|
|
331
|
+
## 内置浏览器(Chromium)
|
|
332
|
+
|
|
333
|
+
DSH 内置浏览器走 Chromium 网络栈,不读 undici dispatcher,插件无法在运行时改它的代理。支持方式只有启动参数:
|
|
334
|
+
|
|
335
|
+
```powershell
|
|
336
|
+
& "E:\DS\DeepSeek Harness.exe" --proxy-server=http://127.0.0.1:20808
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
或运行 `tools/launch-with-browser-proxy.cmd`(自动查找 DSH 路径并透传 `--proxy-server`)。
|
|
340
|
+
|
|
341
|
+
**必须先完全退出 DSH**:单实例再次启动只会聚焦旧窗口,不会应用参数。系统代理/TUN(v2rayN)也能让 Chromium 生效,但那是全机代理,与本插件无关。
|
|
342
|
+
|
|
331
343
|
## 开发
|
|
332
344
|
|
|
333
345
|
```powershell
|
package/lib/client.js
CHANGED
|
@@ -7,6 +7,8 @@ window.__ModuleLoader__.load({
|
|
|
7
7
|
const PANEL_ID = 'xray'
|
|
8
8
|
const NS = 'xray-proxy'
|
|
9
9
|
const inject = ['slots']
|
|
10
|
+
const BROWSER_HINT =
|
|
11
|
+
'内置浏览器走 Chromium 网络栈,不受插件 dispatcher 影响:请用插件目录 tools/launch-with-browser-proxy.cmd 启动 DSH,或在快捷方式目标后追加 --proxy-server=http://127.0.0.1:20808(需完全退出 DSH 后重启才生效)。'
|
|
10
12
|
|
|
11
13
|
const C = {
|
|
12
14
|
page: { maxWidth: 980, margin: '0 auto', padding: '20px 24px 16px', color: 'var(--dsw-alias-label-primary, #0f1115)' },
|
|
@@ -463,7 +465,8 @@ window.__ModuleLoader__.load({
|
|
|
463
465
|
}
|
|
464
466
|
return h('div', { style: { ...C.card, marginTop: 8 } },
|
|
465
467
|
h('div', { style: C.cardHead }, h(GlobeIcon), '2Xray 连接'),
|
|
466
|
-
h(XrayConfigForm, { pageForm: form })
|
|
468
|
+
h(XrayConfigForm, { pageForm: form }),
|
|
469
|
+
h('p', { style: { ...C.muted, fontSize: 12, marginTop: 10 } }, BROWSER_HINT))
|
|
467
470
|
}
|
|
468
471
|
|
|
469
472
|
function SettingsSection({ controller }) {
|
|
@@ -473,7 +476,8 @@ window.__ModuleLoader__.load({
|
|
|
473
476
|
h('div', null,
|
|
474
477
|
h('h1', { style: C.title }, '2Xray'),
|
|
475
478
|
h('p', { style: C.sub }, '导入 VLESS 链接或本地二维码,保存后重启 DSH 生效。'))),
|
|
476
|
-
h('section', { style: C.card }, h(XrayConfigForm, { controller }))
|
|
479
|
+
h('section', { style: C.card }, h(XrayConfigForm, { controller })),
|
|
480
|
+
h('p', { style: { ...C.muted, fontSize: 12, marginTop: 4 } }, BROWSER_HINT))
|
|
477
481
|
}
|
|
478
482
|
|
|
479
483
|
function apply(ctx) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twinsearth/dsh-2xray",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "DSH-2Xray: supervises xray-core and routes DSH process-wide HTTP(S) traffic through its local inbound, with optional multi-node gRPC control plane",
|
|
6
6
|
"type": "module",
|
|
@@ -73,7 +73,8 @@ const files = walk(ROOT)
|
|
|
73
73
|
const outside = files.filter((file) => !isAllowed(file))
|
|
74
74
|
check('every packaged file is allow-listed', outside.length === 0, outside.join(', ') || `${files.length} files`)
|
|
75
75
|
|
|
76
|
-
for (const required of ['index.js', 'package.json', 'cordis.patch.yml', 'README.md', 'CHANGELOG.md', 'LICENSE', 'lib/supervisor.js', 'lib/control/grpc.js',
|
|
76
|
+
for (const required of ['index.js', 'package.json', 'cordis.patch.yml', 'README.md', 'CHANGELOG.md', 'LICENSE', 'lib/supervisor.js', 'lib/control/grpc.js',
|
|
77
|
+
'tools/launch-with-browser-proxy.cmd', 'locale/en.json', 'locale/zh.json', 'icon.svg']) {
|
|
77
78
|
check(`required file ${required}`, files.includes(required))
|
|
78
79
|
}
|
|
79
80
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal
|
|
3
|
+
rem Launch DeepSeek Harness with the embedded Chromium browser pointed at the
|
|
4
|
+
rem plugin's local HTTP inbound. A Node plugin cannot change Chromium's proxy at
|
|
5
|
+
rem runtime, so the switch has to be present when the app starts.
|
|
6
|
+
rem
|
|
7
|
+
rem Usage:
|
|
8
|
+
rem launch-with-browser-proxy.cmd ["C:\path\to\DeepSeek Harness.exe"]
|
|
9
|
+
rem
|
|
10
|
+
rem Close DSH completely before running this: a second launch only focuses the
|
|
11
|
+
rem existing single instance and never applies the flag.
|
|
12
|
+
|
|
13
|
+
set "PORT=20808"
|
|
14
|
+
set "EXE=%~1"
|
|
15
|
+
if not defined EXE set "EXE=%DSH_EXE%"
|
|
16
|
+
|
|
17
|
+
if not defined EXE if exist "%LOCALAPPDATA%\Programs\DeepSeek Harness\DeepSeek Harness.exe" set "EXE=%LOCALAPPDATA%\Programs\DeepSeek Harness\DeepSeek Harness.exe"
|
|
18
|
+
if not defined EXE if exist "%ProgramFiles%\DeepSeek Harness\DeepSeek Harness.exe" set "EXE=%ProgramFiles%\DeepSeek Harness\DeepSeek Harness.exe"
|
|
19
|
+
if not defined EXE if exist "E:\DS\DeepSeek Harness.exe" set "EXE=E:\DS\DeepSeek Harness.exe"
|
|
20
|
+
|
|
21
|
+
if not defined EXE (
|
|
22
|
+
echo DeepSeek Harness executable not found.
|
|
23
|
+
echo Pass the path explicitly:
|
|
24
|
+
echo %~nx0 "C:\path\to\DeepSeek Harness.exe"
|
|
25
|
+
exit /b 1
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
echo Launching with embedded browser proxy: http://127.0.0.1:%PORT%
|
|
29
|
+
start "" "%EXE%" --proxy-server=http://127.0.0.1:%PORT%
|
|
30
|
+
endlocal
|