Network proxy manager for DeepSeek Harness: switch between system, manual, and direct modes from a live settings UI, applied instantly.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:kriskite/dsh-network-proxy
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
DeepSeek Harness (DSH) 的网络代理管理插件。为用户提供图形化设置界面,可随时切换 跟随系统 / 手动代理 / 直连 三种网络出口模式,修改后立即生效。
Network proxy management plugin for DeepSeek Harness. Switch between system / manual / direct proxy modes from the settings UI, applied live.
当前版本 1.0.1 为 DSH Desktop 2.0.10 兼容版:客户端取数路径、
dsh.client声明与 服务端 dispatcher 生命周期已按@deepseek-ai/dsh0.1.5-rc.2 的接口调整(含嵌套服务名remote.settings声明)。适配目标与逐条改动见 PATCHES.md。
✨ 功能特性
- 三种模式
system跟随系统:自动读取系统代理(Windows 读取注册表Internet Settings;其他平台读取HTTP(S)_PROXY环境变量),无需手动配置。manual手动代理:填写一个 HTTP/HTTPS 代理地址(如http://127.0.0.1:7890)即可生效。direct直连:清空所有代理环境变量,强制直连。
- 即时生效:设置变更通过 DSH 的 live settings 机制实时应用,无需重启。
- 多协议支持:基于
undici的ProxyAgent/EnvHttpProxyAgent接管全局Dispatcher,对fetch与undici请求统一生效。 - Windows 系统代理解析:正确解析
ProxyServer的http=...;https=...多协议写法与ProxyOverride(NO_PROXY)。 - 双语界面:内置中文 / 英文文案,跟随 DSH 语言环境自动切换。
📦 系统要求
| 依赖 | 版本 |
|---|---|
| Node.js | >= 20.18.1(由 undici@7 要求) |
| DeepSeek Harness | 支持 DSH 插件与 settings / client 注入的运行环境;1.0.1 实测于 DSH Desktop 2.0.10(@deepseek-ai/dsh 0.1.5-rc.2) |
@deepseek-ai/dsh-settings |
>= 0.1.0-rc.7(实测 0.1.5-rc.2) |
@deepseek-ai/schemastery |
^3.18.1(实测 3.18.2) |
🚀 安装
将本仓库作为 DSH 插件加入你的 Harness 配置(具体方式取决于你使用的 DSH 发行版 / 插件加载器):
npm install dsh-network-proxy
插件通过 cordis.patch.yml 注入 network-proxy 插件点,并在客户端 settings.general.item
插槽注册「网络代理」设置项。
DSH Desktop 的用户 profile($DSH_HOME/profiles/<name>)里,把它加入
dsh.profile.bundles 并安装为依赖即可,与其他 bundle 插件一致。
⚙️ 配置项
插件在 network-proxy 命名空间下提供以下设置:
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
mode |
system | manual | direct |
system |
代理模式 |
url |
string |
"" |
手动模式下的代理地址(须为 http(s):// URL) |
当用户选择「手动代理」时,URL 会经过校验:必须是合法的 http:// 或 https:// 地址,
否则保存会被拒绝并提示错误。
🧪 开发 & 测试
npm install
npm test # node smoke-test.mjs
smoke-test.mjs 覆盖 Windows 代理字符串解析、显式 scheme 保留、URL 校验、settings
注册形状、live settings 联动驱动的全局 dispatcher 切换,以及(仅在 Windows 平台)读取
活动系统代理的逻辑;依赖缺失时(裸 checkout)报告 SKIP 而非失败。
📁 目录结构
dsh-network-proxy/
├── index.js # 服务端插件:代理 Dispatcher 管理与环境变量注入
├── client.js # Web 客户端:设置界面 UI 与状态管理
├── cordis.patch.yml # cordis 插件注入声明
├── smoke-test.mjs # 冒烟测试
├── PATCHES.md # DSH Desktop 兼容性补丁明细
├── package.json
└── package-lock.json
📄 License
MIT © 2026 Kirskite
Architecture
See docs/ARCHITECTURE.md for how the server plugin, web client, and cordis patch fit together.
FAQ
Q: Why does manual mode reject my URL?
A: The URL must start with http:// or https://; anything else is rejected before save.
Q: Does direct mode affect the system proxy? A: No — it only clears the environment variables DSH reads; your OS proxy setting is untouched.
Q: Windows 下 PAC 自动代理脚本支持吗?
A: 不支持。检测到 AutoConfigURL 时会提示改用手动代理。
Links
More in this category
yjh051108/dsh-routing-suite★ 7001
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3677
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
hust-open-atom-club/oh-dsh★ 325
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
weijiafu14/pi2dsh★ 212
Pi Host ABI compatibility engine: after one install, unmodified Pi extensions from npm mount as native DSH plugins with `dsh plugin add <pi-package>`. Verified end to end on stock DSH with pi-mcp-adapter (full MCP manager: OAuth, resources, prompts, MCP Apps, elicitation, sampling), @tintinweb/pi-subagents, pi-code, pi-hermes-memory and pi-background-tasks; `pi2dsh inspect` reports a package's compatibility before installing.
Fishquito7/dsh-skill-mcp-panel★ 174
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
lire1131/dsh-undo-savepoint★ 171
Undo/redo & rollback system for DSH: every config change is auto-snapshotted; undo/redo/restore to any version from the WebUI or the offline CLI/GUI tools (works even when DSH fails to boot).
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.