@restregular/dsh-pocket
Pocket — 把本机 DeepSeek Harness 装进口袋:本地起移动端 Web 服务并支持内外网隧道穿透,在手机上查看会话、流式输出与工具调用,并反向发送指令。 · Pocket for DeepSeek Harness: a mobile web surface with LAN and tunnel access to sessions, live streams, and tool calls. 适合需要通过手机随时随地查看会话、流式输出并审批工具调用的用户。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:RestRegular/dsh-pocket配置
插件行 id 为 dsh-pocket,默认配置见 cordis.patch.yml。
| 字段 | 默认 | 说明 |
|---|---|---|
port | 8790 | 移动端监听端口;被占用时自动向后找 10 个端口。0 表示随机端口。 |
lan | false(本仓库 patch 里为 true) | 是否绑定 0.0.0.0 允许局域网访问;关掉时只绑 127.0.0.1,但隧道仍可用。 |
tunnel | auto | auto / cloudflared / localtunnel / localhost.run / ssh / custom / off。 |
autoStart | true | Host 启动后是否自动拉起隧道。 |
publicUrl | 无 | 已有反向代理或固定域名时直接使用它,不再起隧道进程。 |
cloudflaredPath | 无 | 指定 cloudflared 可执行文件;留空时优先用随包二进制,其次 PATH。 |
customCommand | 无 | tunnel: custom 时执行;%PORT% 会被替换成本地端口,输出里第一个公网 URL 视为就绪。 |
sshHost | 无 | 自有服务器地址;设置后可将 tunnel 设为 ssh。 |
sshUser | root | SSH 用户名;请使用免密公钥登录。 |
sshPort | 22 | SSH 端口。 |
sshKeyPath | 无 | SSH 私钥路径;支持 ~/...。 |
sshRemotePort | 8790 | SSH 在服务器 127.0.0.1 上绑定的反向转发端口。 |
sshExposePort | 80 | 服务器上 Node TCP 代理监听的公网端口;需在防火墙/安全组放行。 |
sshExposeHost | 0.0.0.0 | 服务器 TCP 代理绑定地址;若用 Nginx/Caddy 反代可设为 127.0.0.1。 |
sshPublicUrl | 无 | 自有域名/HTTPS 入口;设置后二维码使用它,而不是 http://:。 |
token | 自动生成 | 固定访问令牌;留空时使用 ~/.dsh/pocket/state.json 里持久化的令牌。 |
用自有服务器转发
tunnel: ssh 不要求服务器开启 GatewayPorts,也不改 sshd:
- SSH 建立
-R 127.0.0.1:sshRemotePort:127.0.0.1:。 - SSH 在服务器上启动一个很小的 Node TCP 代理,监听
sshExposeHost:sshExposePort,转发到127.0.0.1:sshRemotePort。 - 手机访问
sshPublicUrl,未设置时访问http://[:sshExposePort]。
示例:
tunnel: ssh
sshHost: 203.0.113.10
sshUser: root
sshKeyPath: ~/.ssh/id_ed25519
sshPort: 22
sshRemotePort: 8790
sshExposePort: 80