Bundle
dsh-public-proxy
A DeepSeek Harness plugin that exposes the DSH Web UI for LAN access
- Source
- SpringNyan
- License
- MIT
- Updated
- Updated 5 days ago
Readme
# dsh-public-proxy
[](https://www.npmjs.com/package/dsh-public-proxy)
[](https://www.npmjs.com/package/dsh-public-proxy)
[](https://github.com/SpringNyan/dsh-public-proxy/blob/main/LICENSE)
一个 DeepSeek Harness 插件,用于将 DSH Web UI 暴露给局域网访问。
**简体中文** | [English](README_EN.md)
## 安装
```sh
dsh plugin --profile web add dsh-public-proxy@latest
```
## 使用方法
插件运行后,默认会在 **3081** 端口监听。局域网内的其他设备可以通过以下地址访问 Web UI:
```
http://<本机局域网IP>:3081
```
例如 `http://192.168.1.100:3081`
## 配置
可以在 `$DSH_HOME/profiles/web/cordis.patch.yml` 中配置参数(以下为默认值):
```yaml
- id: public-proxy
config:
host: "0.0.0.0"
port: 3081
applyRandomUuidPatch: true
applyIsLoopbackPatch: true
accessKey: ""
enableCookieAuth: false
bypassLaunchToken: false
```
### 访问控制
默认情况下,代理不启用访问控制,局域网内任何人都可以访问。如果你需要保护代理,可以启用 Cookie 认证:
```yaml
- id: public-proxy
config:
# ... 其他配置
accessKey: "your-secret-key"
enableCookieAuth: true
```
启用后,访问代理时会要求输入访问密钥。密钥通过 Cookie 存储,30 天内无需重复输入。
**注意:** 由于代理使用 HTTP 明文传输,访问密钥可能被网络监听者截获。仅在可信任的局域网环境中使用。
### 启动令牌绕过
DSH Web UI 默认通过启动令牌保护,访问时需要在 URL 中携带令牌。启用 `bypassLaunchToken` 后,客户端直接访问代理即可,无需在 URL 中携带令牌:
```yaml
- id: public-proxy
config:
# ... 其他配置
bypassLaunchToken: true
```
**注意:** 该选项会绕过 DSH 的启动令牌保护。建议与 `enableCookieAuth` 配合使用,通过访问密钥代替启动令牌来控制访问权限。
## 安全警告
DSH 本身拒绝绑定 `0.0.0.0`,会返回以下官方错误:
> `error: --host 0.0.0.0 is intentionally not supported yet for safety: it would expose remote code execution to the network; use 127.0.0.1 instead`
本插件有意绕过此限制以实现局域网访问。监听 `0.0.0.0` 会将 Web UI 暴露给整个网络 —— 网络中的任何人都可以访问该机器。请仅在可信任的局域网中启用此功能,切勿将代理直接暴露到公网。
## 许可证
MIT — 详见 [LICENSE](LICENSE)。
Install
dsh plugin --profile web add github:SpringNyan/dsh-public-proxy
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-public-proxy from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.