dsh-forwarder
Make DeepSeek Harness (DSH) accessible over the local area network for other devices such as phones and tablets to access
- Stars
- 0
- Language
- JavaScript
- Created
- Aug 23, 2026
- Updated
- Aug 23, 2026
Introduction
tcpforward
English
Forward your local DeepSeek Harness (DSH) instance to the LAN, so phones and other devices can access it via http://<LAN-IP>:<port>. To expose it to the public internet later, use your platform's intranet tunneling feature.
Why you need it
DSH only listens on 127.0.0.1, so LAN devices cannot reach it directly. This forwarder listens on 0.0.0.0 and forwards traffic to the loopback target, automatically handling two kinds of obstacles:
- Server-side validation: rewrites
Host/Origin/Refererheaders to the loopback address, passing the target's local validation and anti-CSRF checks - Browser restrictions: LAN
http://is a non-secure context — injects polyfills forcrypto.randomUUIDandnavigator.clipboard; patches the frontendisLoopbackcheck to unlock privileged features such as settings / credentials
Quick start
# Option 1: run from source (requires Node >= 18)
node app.js
# Option 2: prebuilt executable (no Node needed)
dist\tcpforward.exe
After startup, all reachable addresses are printed:
Available on:
http://172.22.112.1:3080
http://127.0.0.1:3080
Hit CTRL-C to stop the server
Open any listed LAN address from your phone or another device.
Options
| Option | Description | Default |
|---|---|---|
--host | Listen address | 0.0.0.0 |
--port | Listen port | 3080 |
--target-host | Target host | 127.0.0.1 |
--target-port | Target port | 3080 |
--rewrite-host | Rewrite Host header (pass empty string to disable) | 127.0.0.1:3080 |
--rewrite-origin | Rewrite Origin/Referer | true |
--log-level | debug / info / warn / error | info |
--help | Show help |
Example:
node app.js --port 8080 --target-port 3000 --log-level debug
License
MIT
中文
把 DeepSeek Harness(DSH)穿透到局域网,供手机/其他设备通过 http://<局域网IP>:<端口> 访问。若之后需要开放到公网,用平台的内网穿透即可。
为什么需要它
DSH 只监听 127.0.0.1,局域网设备无法直接访问。本转发器监听 0.0.0.0,把流量转发到回环目标,并自动处理两类障碍:
- 服务端校验:改写
Host/Origin/Referer头为回环地址,通过目标的本地校验与反 CSRF 检查 - 浏览器限制:局域网 http 是非安全上下文,注入 polyfill 补齐
crypto.randomUUID、navigator.clipboard;改写前端isLoopback判定,解锁 settings / credentials 等特权功能
快速开始
# 方式一:源码运行(需 Node >= 18)
node app.js
# 方式二:打包好的可执行文件(无需 Node)
dist\tcpforward.exe
启动后显示所有可达地址:
Available on:
http://172.22.112.1:3080
http://127.0.0.1:3080
Hit CTRL-C to stop the server
手机/其他设备访问列出的局域网地址即可。
参数
| 参数 | 说明 | 默认值 |
|---|---|---|
--host | 监听地址 | 0.0.0.0 |
--port | 监听端口 | 3080 |
--target-host | 目标主机 | 127.0.0.1 |
--target-port | 目标端口 | 3080 |
--rewrite-host | 改写 Host 头(传空串禁用) | 127.0.0.1:3080 |
--rewrite-origin | 改写 Origin/Referer | true |
--log-level | debug / info / warn / error | info |
--help | 显示帮助 |
示例:
node app.js --port 8080 --target-port 3000 --log-level debug
License
MIT