WASD258-jpg/dsh-port-manager ↗★ 0
dsh-port-manager
DSH web port manager plugin: list all local listening ports, pick a free one, and hot-switch the DSH web port without restarting the process. 端口管理插件:查看本机已占用端口并热切换 DSH web 端口。
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-port-manager
English | 中文
DeepSeek Harness(DSH)社区插件:让 DSH web 不再死占 3080,并列出本机所有已占用端口,方便选一个空闲端口。
这是社区项目,并非 DeepSeek 官方插件,也不代表 DeepSeek 的认可或背书。
功能
- 设置 → 端口管理:在 DSH web 界面里直接查看和切换端口
- 本机端口清单:列出 TCP/UDP 监听端口、监听地址、进程名、PID,标记当前 DSH 端口
- 空闲端口推荐:根据当前占用列表推荐空闲端口,一键填入
- 热切换:切换端口不重启 dsh 进程、不丢会话,页面自动跳转到新地址
- 持久化:端口写入
$DSH_HOME/dsh-port-manager.json,重启 DSH 后继续使用新端口 - 占用保护:目标端口被占用时直接拒绝,并提示占用者进程与 PID
安装
要求:DSH web profile(@deepseek-ai/dsh-web-app),Node.js 环境为 DSH 自带或系统 Node。
-
克隆或下载本仓库:
git clone https://github.com/WASD258-jpg/dsh-port-manager.git -
把插件包放进 DSH 的 profile 依赖目录:
$src = '.\dsh-port-manager' $dst = "$env:USERPROFILE\.dsh\profiles\node_modules\dsh-port-manager" New-Item -ItemType Directory -Force -Path "$dst\lib" | Out-Null Copy-Item "$src\package.json" $dst -Force Copy-Item "$src\lib\index.js","$src\lib\client.js" "$dst\lib" -Force Copy-Item "$src\LICENSE","$src\NOTICE" $dst -Force(Linux/macOS 把
$env:USERPROFILE\.dsh换成~/.dsh;设置了DSH_HOME就用$DSH_HOME。) -
编辑
$DSH_HOME/profiles/web/cordis.patch.yml,追加:# 端口管理插件:CLI --port > 插件配置 > DSH_WEB_PORT > 3080 - id: webserver inject: [webStartup, dshPortManager] config: host: !!js ctx.webStartup.host ?? '127.0.0.1' port: !!js ctx.dshPortManager.startupPort(ctx.webStartup.port) - insert: - id: dsh-port-manager name: 'dsh-port-manager' config: role: provider - id: dsh-port-manager-routes name: 'dsh-port-manager' inject: [webServer, dshPortManager, subprocess, sandboxPolicy] config: role: routes如果你已经手工给 webserver 行写过配置,请把
port表达式替换为!!js ctx.dshPortManager.startupPort(ctx.webStartup.port),并确保 同时包含 与 。