smanx/dsh-proxy 预览 preview

smanx/dsh-proxy

Plugin插件 Native原生 ⭐ 24 Notifications & Remote通知与远程

HTTP + WebSocket 反向代理:将局域网端口转发至本地DSH服务

Project Overview项目介绍

This repository is dsh-proxy, a native plugin built specifically for DeepSeek Harness (DSH). It provides HTTP and WebSocket reverse proxy that forwards LAN ports to the local DSH service running at 127.0.0.1:3080. Core features include Basic Auth authentication, LAN access support, and injection of a crypto.randomUUID polyfill for non-secure contexts. It offers two separate distribution options: a DSH plugin version that integrates directly with DSH’s web profile, and a standalone executable version for use outside DSH. The plugin version is recommended for DSH users, as it starts and stops with the dsh web command, no separate process required. You can install it directly online via the command dsh plugin --profile web add github:smanx/dsh-proxy#master, no local clone needed.

After installing the plugin version, you just need to restart dsh web to activate it. The plugin adds a dedicated LAN proxy settings page inside DSH’s existing settings menu, where you can check the current proxy status via a status indicator, manually start or stop the proxy, and modify the listening port, username, and password for Basic Auth. By default, if you leave the username and password fields empty, Basic Auth authentication is disabled, and authentication is only enabled when both fields are filled with values. The standalone executable version is designed for users who do not use DSH or need to run the proxy as an independent separate process, and it comes in two different implementations.

The standalone version offers two builds: a lightweight Go build that is only 6 to 7 megabytes, and a Node.js build packaged with Node SEA that weighs between 80 and 120 megabytes, no existing Node.js installation is required to run the Node build. Prebuilt executables are available for five major platforms: Windows x64, Linux x64, Linux arm64, macOS x64, and macOS arm64. You can download them directly from GitHub Releases, or build them from source code if you prefer. Pushing a v* git tag triggers GitHub Actions to automatically build and publish a new release to GitHub Releases.

这是专为DeepSeek Harness(DSH)开发的原生插件smanx/dsh-proxy,提供HTTP与WebSocket反向代理服务,可将局域网端口转发到本地DSH服务127.0.0.1:3080,支持Basic Auth身份验证、局域网访问,以及crypto.randomUUID polyfill注入功能。仓库同时提供两种使用方式,推荐DSH用户使用插件版,可随dsh web一起启停,无需单独运行进程,也无需额外下载独立可执行文件,还自带完整的设置页面。

插件版可通过在线或本地两种方式安装,在线安装可直接执行命令dsh plugin --profile web add github:smanx/dsh-proxy#master完成,本地安装则指向克隆到本机的仓库目录即可。安装完成后重启dsh web即可使用,用户可在DSH设置的局域网代理选项中修改代理监听端口、用户名和密码,默认留空凭据则关闭密码验证功能。

独立可执行版本提供Go和Node.js两种实现,Go版体积仅6-7MB更轻量推荐,Node版采用SEA打包体积80-120MB,无需额外依赖。独立版支持交互式配置、配置记忆和CLI免交互参数,支持五大主流平台,可通过GitHub Releases下载预编译产物,也可自行从源码构建,推送v*标签可触发GitHub Actions自动构建发布。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
  • 24 stars - an early-stage project星标 24,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:smanx/dsh-proxy#master

把 smanx/dsh-proxy 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-proxy

English | 中文

HTTP + WebSocket 反向代理:把局域网端口转发到本地 DSH 服务 127.0.0.1:3080。 支持 Basic Auth、局域网访问、crypto.randomUUID polyfill 注入。

DSH 插件版(推荐 · dsh-proxy)

推荐 DSH(DeepSeek Harness)用户使用:把代理作为插件装进 web profile,随 dsh web 启停,无需单独进程、无需下载可执行文件,带完整设置页面。

  • 与独立版相同的原生 Basic Auth(浏览器弹窗)与 HTTP + WebSocket 全协议转发
  • 设置页面(DSH 设置 → 局域网代理):状态红绿灯、启动/停止、改代理监听端口与用户名密码(表单回写当前值,留空即设为空)
  • 默认空凭据 = 密码登录关闭;同时设置用户名和密码才启用

dsh-proxy 设置页面(中文界面)

安装

在线安装(推荐)——直接从 GitHub 安装(无需下载仓库):

dsh plugin --profile web add github:smanx/dsh-proxy#master

本地安装(仓库已克隆/下载到本机):

dsh plugin --profile web add file:C:/mydata/codes/dsh-proxy

重启 dsh web 后,访问 http://<局域网IP>:3081 即弹 Basic Auth 登录框。详细说明见 dsh-proxy/README.zh.md。

独立可执行版本(go/ 与 node/)

不使用 DSH、或需要独立进程时的备选方案:两个等价的单文件版本(交互式启动、配置记忆、CLI 免交互参数)。

下载安装:从 GitHub Releases 下载对应平台的单个可执行文件(Go 版约 6-7 MB / Node 版约 80-120 MB),放到任意目录直接运行;macOS/Linux 先 chmod +x。

目录 语言 单文件体积 说明
go/ Go(静态编译) 6-7 MB 轻量版;Go 标准库实现,体积小 95%,推荐
node/ Node.js(SEA 打包) 83-119 MB 原版;用 Node 官方 SEA 打包,无需安装 Node

功能

  • HTTP + WebSocket 反向代理(Go 版用标准库 httputil.ReverseProxy,原生支持 WS 升级)
  • Basic Auth(默认 admin/admin,HTTP 与 WS 握手统一校验;公开静态资源如 /manifest.webmanifest 免认证,避免浏览器抓取 manifest 时报 401)
  • Origin 对齐 + Host 改写(通过 DSH /api 同源校验,LAN 访问 WS 不 403)
  • HTML 注入 crypto.randomUUID polyfill(LAN 非安全上下文下实时通道可用)
  • dsh 0.1.1+ 客户端 loopback 信任补丁:重写所服务的 JS,使设置页模型列表等在 LAN 访问下不再报 "settings are unavailable in this browser"(与插件版行为一致)
  • 交互式启动:4 项配置预填可编辑(源端口 3080 / 目标端口 3081 / admin / admin),端口与账号密码均可手动修改
  • 配置记忆:config.json 存于可执行文件同目录,下次启动自动预填
  • CLI 免交互参数(供计划任务/自动化): dsh-proxy --source-port 3080 --target-port 3081 --user admin --pass admin

构建

# Node 版(产物在 node/dist/)
cd node
npm install
npm run build          # 全部 5 个平台(首次需下载 Node 二进制,之后缓存于 .sea-cache/)
npm run build:win      # 只构建 Windows

# Go 版(产物在 go/dist/,无需安装 Go 运行时)
cd go
./build.ps1            # 全部 5 个平台
./build.ps1 -Target win-x64

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-plugin-workshop 下一个 Next dsh-stickers →