Back to home@ming-14

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 | 中文


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 / Referer headers 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 for crypto.randomUUID and navigator.clipboard; patches the frontend isLoopback check 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

OptionDescriptionDefault
--hostListen address0.0.0.0
--portListen port3080
--target-hostTarget host127.0.0.1
--target-portTarget port3080
--rewrite-hostRewrite Host header (pass empty string to disable)127.0.0.1:3080
--rewrite-originRewrite Origin/Referertrue
--log-leveldebug / info / warn / errorinfo
--helpShow 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.randomUUIDnavigator.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/Referertrue
--log-leveldebug / info / warn / errorinfo
--help显示帮助

示例:

node app.js --port 8080 --target-port 3000 --log-level debug

License

MIT