DSH Pocket iOS 产品使用说明手册产品使用说明

DSH Pocket iOS 产品使用说明

DSH Pocket iOS 是 DeepSeek Harness(DSH)的 iOS 客户端:它把手机变成电脑上 DSH 的「远程屏」。电脑保持开机,人在家里、通勤路上或碎片时间都能接着用。

电脑保持开机、不休眠,DSH 一直运行即可;手机端随时扫码或点一下就接入。
第一次接触 DSH?先看这篇 《什么是 DeepSeek Harness》零基础版:不用懂技术,10 分钟装好并说出第一句话。本文是 App 与插件的中文说明书,偏技术;那篇是给完全没接触过的人看的。

开始之前:你需要三样东西

这个 App 只是「遥控器」——它本身不产生任何对话,所有会话都跑在你自己电脑上的 DSH 里。所以第一次使用,需要按顺序把下面三样装好。

① 电脑:DSH 桌面端(必须)

你的 AI 会话都在这里运行。已经装了可以跳过。

下载地址:DeepSeek 官网下载页(macOS / Windows)。安装与使用说明见 DSH 文档。

② 电脑:连接器插件 dsh-pocket-ios(必须)

本文后面提到的所有二维码,都由这个插件生成;它也是手机和电脑之间的桥。

dsh plugin add dsh-pocket-ios
不想自己敲命令?把上面这句原样发给你电脑上的 DSH 对话框,让它替你装——它本身就是个能执行命令的 agent,会自己跑完这一步。

装完重启 DSH 并刷新页面。图形界面里也可以装:DSH → 设置 → 插件,点右上角 「+ 添加插件」 → 选 「安装第三方插件」,输入 dsh-pocket-ios 回车即可。

源码:GitHub · 包:npm

③ 手机:DSH Pocket App(必须)

App Store 下载(iPhone / iPad。iOS 17 及以上:自 1.1.1 起支持(该版本正在 TestFlight 内测,尚未上架);1.1.0 及更早需要 iOS 18)。

只想先看看界面、还没有电脑可连:打开 App 后点底部的「演示模式」,会用内置示例数据展示全部界面,不联网。

三样都装好之后

回到电脑的 DSH → 设置 → 手机访问(iOS),选一种连接方式,用手机扫二维码即可——扫码不需要密码。四种方式怎么选,见下一节。

使用场景

最典型是在家:电脑开着 DSH,躺在床上用手机继续写代码、盯任务进度,不用再坐回书桌。

出门在外同样可用:通勤、咖啡厅里打开会话就能继续推进任务。

碎片时间也能利用:排队、午休几分钟,看 AI 跑到哪一步、补一句指令。

四种连接方式

四种方式全部由 dsh-pocket-ios 一个插件提供,在电脑的 DSH → 设置 → 手机访问(iOS) 里随时切换,二维码会对应当前选中的方式。

方式适合电脑要做什么手机要装什么
局域网手机和电脑在同一个 Wi-Fi什么都不用什么都不用
Cloudflare人在外面,任何网络插件自动下载 cloudflared(约 20MB,Cloudflare 官方隧道客户端),无需注册什么都不用
Tailscale长期使用,要固定地址装 Tailscale 并注册登录 + 后台开 HTTPS Certificates + 在面板里切到 Tailscale(插件自动发布入口,无需手敲命令)装 Tailscale,登录同一个账号
EasyTier想自己组网,不依赖境外服务装 EasyTier 并跑起服务(面板给的一键命令)EasyTier App(大陆区需外区 ID;备选 Shadowrocket)

方式一:局域网(同一 Wi-Fi,最快)

适合:手机和电脑连同一个 Wi-Fi,想最快、最省事。

  1. 电脑 DSH → 设置 → 手机访问(iOS),选择局域网。
  2. 手机连上同一个 Wi-Fi,用 DSH Pocket 扫二维码,自动连接,不需要密码。
换到别的网络(比如用流量)就连不上了,那时改用 Cloudflare。

方式二:Cloudflare(任何网络,手机零安装)

适合:人在外面、手机不想装任何东西。

  1. 电脑 DSH → 设置 → 手机访问(iOS),选择 Cloudflare。
  2. 首次使用电脑会自动下载约 20MB 的 cloudflared——Cloudflare 官方的隧道客户端程序(一个命令行小工具,不是我们写的代码),下完会存到本机缓存目录,之后不再重复下载。等面板显示「正在启动」结束即可。
  3. 手机用 DSH Pocket 扫二维码,自动连接。
走公网中继,速度比局域网慢一些;隧道地址会在 DSH 重启后变化,需要重新扫码。敏感场景建议用方式一或方式三。

方式三:Tailscale(地址固定,长期稳定)

适合:经常在外网访问、想要固定地址、长期使用。

  1. 电脑和手机都安装 Tailscale,登录同一账号(iOS App Store · macOS App Store)。电脑菜单栏显示 Connected。
  2. 在 Tailscale 后台 DNS 页开启 HTTPS Certificates。
  3. 回面板切到 Tailscale。插件会自动执行 tailscale serve:把连接器在本机的入口(默认 127.0.0.1:3091,该端口被占用时会自动改用下一个)发布到你的 tailnet,并签发 HTTPS 地址(形如 https://你的电脑名.xxx.ts.net)。不用自己开终端;要确认是否成功,跑一次 tailscale serve status 即可。
  4. 电脑 DSH → 设置 → 手机访问(iOS),选择 Tailscale;手机扫二维码,自动连接,不需要密码。
想同时用 Tailscale 和代理?不用装两个 VPN——Shadowrocket 新版已内置 Tailscale 协议栈,在它的「设置 → Tailscale」里粘贴认证密钥即可,只开一个 App 同时拥有 tailnet 内网和境外代理。详见下方常见问题。

方式四:EasyTier(自主组网,不依赖境外服务)

适合:想自己组网、不愿意依赖 Cloudflare / Tailscale 的技术用户;也适合国内访问 Tailscale 中继偏慢的场景。云服务器上也推荐用它——不依赖境外中继。

和 Tailscale 的真实差别:Tailscale 用官方控制平面 + 境外 DERP 中继,配置最简单、稳定性最好,但中继在境外;EasyTier 可以连国内公共节点、也能完全自建,代价是要自己配一次。要省心选 Tailscale,要自主选 EasyTier。
  1. 电脑安装 EasyTier。官网 easytier.cn,下载页 easytier.cn/guide/download.html 提供 macOS 的 dmg/zip(按芯片选 x86_64 或 aarch64)。装 GUI 后若提示「文件已损坏」,执行 xattr -c /Applications/easytier-gui.app;也可以用 brew tap brewforge/chinese && brew install --cask easytier-gui。
  2. 电脑装成系统服务(只需一次)。在 DSH 面板 EasyTier 一栏复制它给出的命令,粘贴到终端执行(需要输一次密码)。这条命令会写一个 LaunchDaemon 配置并加载它,之后 EasyTier 就是常驻后台服务,关终端、重启电脑都不受影响。服务名:com.ruska.dsh-pocket-ios.easytier。
  3. 手机装 EasyTier App(推荐)。官方客户端在 App Store(US$0.99),支持 iOS 16+ / macOS 13+,用 Network Extension 做系统级 VPN,不用再配代理规则。注意它在中国大陆区 App Store 不提供——需要外区 Apple ID。
    大陆区可用备选:装 Shadowrocket 之类的代理 App,导入面板给出的订阅(http://<电脑IP>:3091/dsh-pocket-ios/easytier.conf(端口默认 3091,被占用时会自动换,以面板显示为准))。
  4. 关键:全局路由选「配置」,不要选「代理」。选「代理」会全局劫持,把 Apple 的证书验证也代理走,导致 DSH Pocket 报「无法验证 App」。
  5. 之后扫码即连。手机用 DSH Pocket 扫面板上的二维码,自动登录,不需要密码。
门槛仍是四种方式里最高的(装 CLI + 跑一次 sudo + 配代理规则)。如果只是想在办公室或路上用手机连,方式二 Cloudflare 更省事。

云服务器的连接方法

如果 DSH 装在云服务器上(阿里云、腾讯云等),连接方式和本地电脑不一样:服务器没有图形界面,看不到「手机访问(iOS)」这个设置页,所以配对码要在终端里获取。

DSH 和 dsh-pocket-ios 插件在服务器上的装法与电脑完全相同(见上文「开始之前」),差别只在:没有图形界面,出码要用命令行。下面是这两种差异。

推荐:EasyTier(不依赖境外中继)

云服务器上用 EasyTier 更合适:可以连国内公共节点,也可以完全自建,不用把流量绕到境外的 DERP 中继。配置流程见上文「方式四」,服务器上只需注意两点:

  1. 用 npx dsh-pocket-ios mode easytier 切到 EasyTier 方式(服务器没有图形界面,见下一节)。
  2. EasyTier 的 launchd/systemd 服务在服务器上换成 systemd 单元,面板给出的命令会按平台生成。

备选:Tailscale(不开公网端口)

也很省心:不需要公网 IP,也不需要开放任何端口。代价是中继在境外,国内访问可能偏慢。

  1. 服务器安装 Tailscale。
curl -fsSL https://tailscale.com/install.sh | sh

国内下载不稳时,改用官方 RPM 源(RHEL / CentOS / Alibaba Cloud Linux):

curl -sS https://pkgs.tailscale.com/stable/rhel/8/tailscale.repo -o /etc/yum.repos.d/tailscale.repo
dnf install -y tailscale
  1. 启动后台服务并登录。
systemctl enable --now tailscaled
tailscale up --hostname=dsh-server

它会打印一个授权链接,在浏览器打开、登录你的 Tailscale 账号即可。

  1. 把连接器发布到 tailnet。
tailscale serve --bg 3091

它会给你一个固定地址,形如 https://dsh-server.你的tailnet.ts.net。

  1. 手机端安装 Tailscale,登录同一个账号。
  2. 把连接器切到 Tailscale 方式。
npx dsh-pocket-ios mode tailscale

在终端里获取配对二维码

npx dsh-pocket-ios pair

终端会直接打印二维码和配对地址,有效期 10 分钟,不需要密码。想把二维码存成图片再发到手机:

npx dsh-pocket-ios pair --png ~/pair.png

然后在手机上打开 DSH Pocket → 扫一扫 → 从相册选二维码图片。

常用命令

npx dsh-pocket-ios pair            # 出配对二维码(10 分钟有效)
npx dsh-pocket-ios pair --png ~/q.png   # 存成图片
npx dsh-pocket-ios status          # 当前方式、地址、是否就绪
npx dsh-pocket-ios mode tailscale  # 切换连接方式
npx dsh-pocket-ios doctor          # 连不上时先跑这个

手机连接与会话说明

扫描终端里打印的二维码即可连接。连成功一次之后,App 会把这台机器记下来,下次直接点它就进入,不需要再扫码或输密码。

App 里的「主机」就是一台机器。连接过几台,就会列几台;点一行即切换。同一台机器可能有多个地址(家里的局域网、外面的 Tailscale),它们归在同一台主机下,由 App 自动挑当次最快的那条(局域网优先)。

自动切换(默认开启):当前地址不通时,App 会在同一台主机的其它地址里自动换路,并在面板里显示当前用的是哪条、延迟多少。不需要你手动选「走局域网还是走 Tailscale」。

启动时的恢复顺序:① 先试「上次选中的主机」→ ② 同一台机器换地址重试 → ③ 仍不行就退回「上次连成功的那台」→ ④ 全都不行才停在连接页(列表不会丢)。

添加新机器不用先断开:设置 → 添加 →「扫码添加另一台」即可。App 会先连上新机器,成功才切过去,连不上会保持现在的连接。主机名可以在列表里左滑重命名(例如改成「Mac」「阿里云」)。

会话保存在各自机器的 ~/.dsh/sessions/ 下,云端和本地是两套独立数据,不会自动同步(DSH 没有账号体系)。手机连哪台,就看到哪台的会话;在「主机」列表里切换即可。

没有二维码时的手动连接

地址填终端打印的地址,密码取服务器上 ~/.dsh/dsh-pocket-ios/pin 文件的内容。

多台 DSH 之间互相连接

如果你有多台机器各自跑着 DSH(比如一台笔记本、一台云服务器),它们之间可以直接互相发消息:让一台上的 AI 去找另一台上的某个会话说话,等它回复,再把结果带回来。

前提:两台机器在同一个 Tailscale 账号下(同一个 tailnet)。这是唯一的信任基础——同一个账号意味着「都是你自己的机器」,所以不需要再输入配对码或密码。

第一步:两台都加入同一个 tailnet

两台机器各装 Tailscale,登录同一个账号。具体装法与「四种连接方式 → 方式三」相同,云服务器上的写法见上一节。

第二步:在其中一台里「添加节点」

在电脑的 DSH → 设置 → 手机访问(iOS) 最下方找到 「跨机器协作(本机连别人)」,填两项:

字段填什么
名称随便起,例如「公司电脑」「云服务器」。留空就用地址当名字。
地址直接抄对方「连接状态」里显示的那个地址,形如 https://对方机器名.你的tailnet.ts.net:端口。端口不要漏——漏了会连到别的服务上,报证书不匹配。

加好之后,「连接状态」里会多出一组 「跨机器协作(本机连别人)」,显示每台是否在线、延迟多少毫秒。

这里的「在线」判断只做一件事:试着连一下对方的端口。不登录、不读内容、不传数据。

第三步:让 AI 直接跟另一台对话

配好节点后,你可以直接对 AI 说人话,它会自己选工具:

列一下云服务器上有哪些会话
把「今天服务器负载怎么样」发给云服务器那个叫 XX 的会话
问问公司电脑上那个会话,上次那个 bug 修好没有

对应的两个能力:

  1. 列出对方会话——返回会话标题、最近活动时间和会话 id。
  2. 发消息并等回复——可以按会话标题的一部分来指定目标,不用记 id。
对方看不到你这边的上下文。它只收到你让它发的那一段话,所以要说清背景——就像给同事发一条自包含的消息。等回复期间可能几十秒到几分钟,取决于对方在做什么。

隐私与权限

这一节值得认真看,因为它涉及「谁能访问你的机器」:

  1. 信任范围=你的 tailnet 账号。同一账号下的任何机器都能与你互相发消息,不需要额外确认。所以把 tailnet 分享给别人,等于把你的 DSH 也分享出去。
  2. 不开公网端口。跨机器通信全部走 tailnet 内网,没有把 DSH 暴露到公网。
  3. 消息内容只在两台机器之间传输(经 Tailscale 加密),不经过我们的任何服务器。
  4. 节点列表只存在你本机(~/.dsh/dsh-pocket-ios/peers.json),不会上传,也不会随插件分发——插件不预置任何节点。
  5. 不想再互连:在「跨机器协作(本机连别人)」里删掉那条即可;要彻底切断,就在 Tailscale 后台把那台设备移出 tailnet。

和「手机连多台」的区别

这两件事容易混:手机连多台是「同一个 App 切换连到不同机器」(在「历史连接」里切);多台 DSH 互连是「两台电脑上的 AI 互相说话」(在「跨机器协作(本机连别人)」里配)。两者互不影响,可以同时用。

Tailscale 中继点优化(进阶,可选)

这一段只影响「走中继」时的速度。如果你用 Tailscale 时大多能打洞直连,可以跳过;但在移动网络(尤其运营商 NAT 严格、5G 切 Wi-Fi)下,Tailscale 常常落到 DERP 中继,而默认中继在美国/日本/德国,实测延迟 150ms 起。在国内自建一个中继点,可以把延迟压到个位数。

为什么会有这个问题

Tailscale 优先打洞直连;打不通时走 DERP 中继(官方在全球部署的中转服务器,按地理就近选择)。国内网络到这些节点通常要绕路,于是出现「明明两边都在国内,却慢得像在跨国」。

实测对比(同一台手机、同一网络):

中继位置延迟
默认节点纽伦堡 / 洛杉矶等约 145–165 ms
自建(阿里云北京)同城约 3–5 ms

并且自建中继还有一个附带好处:中继连通后,两端更容易协商出直连。

你需要准备什么

  1. 一台有公网 IP 的国内服务器(1 核 1G 够用;带宽按你的中继流量估,见文末注意事项)。
  2. 一个能公网解析到你服务器的域名,例如 derp.example.com。必须真的能公网解析——用 *.ts.net 那种仅内网可见的名字是不行的(原因见「三个必经的坑」第 1 条)。
  3. 给这个域名签一张证书(Let's Encrypt 即可)。
  4. 在服务器安全组 / 防火墙放行 TCP 中继端口与 UDP 3478(STUN,可关,见下)。

第一步:装 derper 并跑起来

derper 是 Tailscale 官方的中继服务端程序(开源,和客户端同一个仓库)。装好后用最小权限的 systemd 单元托管:

# 1) 二进制与证书放到 /opt/derper(root 所有)
install -d -m 755 /opt/derper
install -m 755 derper /opt/derper/derper
install -m 644 derp.example.com.crt /opt/derper/
install -m 600 derp.example.com.key /opt/derper/

# 2) systemd 单元(关键项见注释)
cat > /etc/systemd/system/derper.service <<'EOF'
[Unit]
Description=Tailscale DERP relay
After=network-online.target tailscaled.service

[Service]
Type=simple
ExecStart=/opt/derper/derper \
  -a :444 -http-port -1 \
  -hostname derp.example.com \
  -certmode manual -certdir /opt/derper \
  -stun -stun-port 3478 \
  -verify-clients
Restart=always
RestartSec=5

# --- 加固 ---
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
# 端口 < 1024 时必须留这个能力,否则 bind: permission denied
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
ReadWritePaths=/opt/derper /run/tailscale

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload && systemctl enable --now derper
systemctl is-active derper      # 应为 active
ss -lntu | grep -E ':(444|3478)\b'   # 端口应在听

第二步:在 Tailscale 后台登记这个中继

打开 ACL 编辑页,在顶层(和 acls 同级)加一段 derpMap:

"derpMap": {
  "Regions": {
    "900": {
      "RegionID": 900,
      "RegionCode": "bjs",
      "RegionName": "China (Beijing)",
      "Nodes": [
        {
          "Name": "900a",
          "RegionID": 900,
          "HostName": "derp.example.com",
          "IPv4": "你的服务器公网IP",
          "DERPPort": 444,
          "STUNPort": 3478
        }
      ]
    }
  }
}
IPv4 这一行建议写上。Tailscale 控制面要定期探测这个节点(请求 /derp/latency-check);只给域名时它依赖公网 DNS 解析,解析不到就会把整台节点丢掉,表现为「加了却没生效」。

第三步:验证

# 在任意一台 tailnet 设备上跑
tailscale netcheck                 # 顶部「Nearest DERP」应变成你登记的区域
tailscale debug derp-map | grep 900 # 应能看到你的区域
tailscale status                  # 看 peer 是 direct 还是 relay

netcheck 里你的区域延迟应该在个位数到几十毫秒;如果它压根没出现,看下一节。

三个必经的坑(都实测踩过)

  1. 域名必须公网可解析。用 *.ts.net 这类只在 tailnet 内可见的名字,控制面探测不到节点,会静默丢掉整个区域——面板里什么都不报,只是没生效。可以用 dig +short derp.example.com @8.8.8.8 自查。
  2. 端口 < 1024 需要能力位。只写 CapabilityBoundingSet= 空值会得到 listen tcp :444: bind: permission denied;补 CAP_NET_BIND_SERVICE 即可(示例里已给)。
  3. 证书要与 HostName 一致。-certmode manual 时证书放错或过期,握手直接失败,客户端表现为「连上就断」。

成本与注意事项

相关链接

App Store

GitHub 仓库

npm 包

常见问题(Q&A)

Q:这个 App 收费吗?

免费。没有内购、没有订阅、没有广告。App 只是电脑端 DSH 的遥控器,核心能力都在你自己的电脑上。

Q:我的对话和数据会上传吗?

不会。手机只和你自己的电脑通信(局域网或你自己配的隧道)。我们没有任何服务器接收你的会话内容、账号或凭证。地址、PIN、Cookie 都存在手机上(Keychain),诊断信息留在 App 沙盒里。

Q:Intel 芯片的 Mac 能用吗?

App 和连接器都能用,但 DSH 桌面端目前只提供 Apple Silicon(arm64)安装包,Intel Mac 装不了官方客户端。

替代方案:用命令行版。界面和桌面客户端完全一样,只是换成用命令启动:

  1. 装 Node.js(自带 npm)。
  2. 执行 npm install -g dsh。
  3. 执行 dsh web,然后在浏览器打开它给出的地址。

之后照常安装连接器:dsh plugin add dsh-pocket-ios,手机扫码即可。云服务器上没有图形界面时,用的也是同一套命令。

这个办法来自社区用户(感谢「三尾鸭」);我们还没有在 Intel Mac 上实测过。如果你试了遇到问题,欢迎到 GitHub Issues 反馈——确认可行后会写进正文。

Q:为什么电脑端必须装连接器插件?

iOS App 本身只是遥控器。DSH 不接受来自外部的直接访问:网页端口每次重启会变、浏览器会话只信任本机回环请求、也没有给手机用的登录接口。连接器负责提供稳定入口、改写 Host、生成二维码并完成一次性配对。

Q:手机和电脑不在同一个网络,还能用吗?

能。局域网之外有三种方式:Cloudflare(手机零安装,最简单)、Tailscale(地址固定,最稳)、EasyTier(自主组网,不依赖境外服务)。在电脑的 设置 → 手机访问(iOS) 里切换即可,二维码会跟着变。

Q:扫码提示「配对二维码已失效」?

配对码有效 10 分钟。过期后面板会显示「二维码已过期」,点旁边的「重新生成」即可(不会自动刷新)。电脑休眠或 DSH 关闭后也会失效。

Q:需要输访问密码吗?

扫码不需要密码,四种方式扫二维码都是自动登录。只有「手动连接」(自己填地址)时才需要面板上显示的访问密码。

Q:端口 3091 被别的程序占用了怎么办?

不用管,插件会自动换。它默认用 3091,发现被占用就依次试 3092、3093……记住选中的那个(写在 ~/.dsh/dsh-pocket-ios/proxy-port),下次启动继续用,并在面板「固定地址」上方提示「端口 3091 被占用,已自动改用 3092」。

要指定端口,可设环境变量 DSH_POCKET_IOS_PROXY_PORT 后重启 DSH;重启后二维码会跟着新端口变,手机上需要重新扫一次。另外:局域网模式要放行的是实际端口,不一定是 3091。

Q:手机连不上,或提示 HTTP 530 / 安全连接失败?

最常见是隧道地址变了(尤其 Cloudflare 在 DSH 重启后)。回到电脑的设置页重新出码再扫一次。仍不行时依次排查:① Tailscale 没启动或没登录(systemctl status tailscaled);② 入口没发布出去(在面板里重新切一次 Tailscale 会自动发布;手动确认:tailscale serve status);③ 手机没登录同一个 tailnet;④ 电脑睡眠了。

Q:电脑睡眠之后就收不到了,怎么办?

这是正常的——所有连接和提醒都依赖那台电脑上的 DSH 在运行。需要长时间远程使用的话,把电脑设成不休眠(macOS:sudo pmset -a disablesleep 1)。

Q:AI 跑完了,我会收到提醒吗?

会,但可能延迟几分钟。App 用后台刷新(BGAppRefreshTask)定期醒来检查,iOS 决定何时唤醒它。你正在看那个会话时不会打扰。要「秒级到达」需要厂商服务器代发远程推送——本产品没有这样的服务器。

Q:开了代理之后 App 打不开,提示「无法验证」?

代理把 Apple 的证书验证(ppq.apple.com)也拦了。用 EasyTier 时把全局路由设为「配置」而不是「代理」,规则里保留 FINAL,DIRECT;或先关代理再开 App。

Q:Tailscale 和 Shadowrocket 能同时用吗?

可以。但不是「系统里同时开两个 VPN」(iOS 同一时间只允许一个 Packet Tunnel),而是让 Shadowrocket 自己接入 Tailscale——它新版内置了 Tailscale 协议栈,自身作为一台节点加入你的 tailnet。开一个 App 就同时拥有 tailnet 内网和境外代理。

步骤:

  1. 生成认证密钥。浏览器打开 Tailscale 后台 → Settings → Keys,点 Generate auth key(可设有效期与 reusable),复制得到 tskey-auth-… 开头的字符串。
  2. 填进 Shadowrocket。打开 Shadowrocket → 底部「设置」→ 找到 Tailscale → 打开顶部 启用 开关 → 在 认证密钥 里粘贴上一步的 key。
  3. 控制服务器保持默认(https://controlplane.tailscale.com),除非你用自建 Headscale。
  4. 回到首页把开关关掉再打开,让配置生效;然后在 Tailscale 后台的设备列表里应该能看到一台新的节点(就是你的手机)。
  5. 加一条分流规则。让 100.64.0.0/10(tailnet 网段)走 TAILSCALE 策略,其余流量该走代理走代理。这样访问电脑的 tailnet 地址不会被代理劫持。

注意:少数版本仍会和独立安装的 Tailscale App 抢 VPN 槽位,导致节点更新失败——把 Tailscale App 完全退出(从多任务里划掉)即可。另外 Shadowrocket 的 Tailscale 模块对 subnet routes 支持有限,需要访问整个内网网段时反而用独立 Tailscale App 更稳。

Q:可以同时连多台设备吗?

可以。手机、iPad 各自扫码配对后互不影响,都能连同一台电脑。设备凭证存在各自设备的 Keychain 里,旧设备不想要了在电脑端重置 pin 即可。

Q:支持 iPad 吗?

支持。iPad 上有分栏布局(左侧会话列表、右侧对话)。建议 iPadOS 18 及以上。

English

DSH Pocket iOS is the iOS client for DeepSeek Harness (DSH). It turns your phone into a remote screen for the DSH running on your computer: keep the Mac awake and continue your sessions from home, on the go, or in a spare minute.

Four ways to connect

All four are provided by one plugin — dsh-pocket-ios. The third-party dsh-pocket plugin is no longer needed. Switch between them any time under DSH → Settings → Phone access (iOS) on your Mac; the QR code follows the selected method.

MethodBest forWhat the computer needsWhat the phone needs
LANPhone and Mac on the same Wi-FiNothingNothing
CloudflareAny network, when you are awayThe plugin downloads cloudflared (~20MB, Cloudflare's official tunnel client) — no signupNothing
TailscaleLong-term use with a fixed addressInstall Tailscale and sign in, enable HTTPS Certificates, then switch the connector to Tailscale in the panel (it publishes the entry for you)Install Tailscale, sign in with the same account
EasyTierSelf-hosted mesh, no reliance on overseas servicesInstall EasyTier and start its service (one command from the panel)EasyTier App (needs a non-mainland Apple ID; or Shadowrocket)

Preparation (same for all methods)

  1. Install DSH on your Mac. Download from the official page (macOS / Windows).
  2. Install the dsh-pocket-ios connector. DSH → Settings → Built-in plugins, search dsh-pocket-ios and enable it; or run dsh plugin add dsh-pocket-ios.
  3. Install DSH Pocket on your iPhone. Search “DSH Pocket” on the App Store.iOS 17 or later is supported from 1.1.1 (currently in TestFlight, not yet on the App Store); 1.1.0 and earlier require iOS 18.

Method 1: LAN (same Wi-Fi, fastest)

Best for: phone and Mac on the same Wi-Fi — fewest steps, best speed.

  1. Mac: DSH → Settings → Phone access (iOS) → choose LAN.
  2. Phone on the same Wi-Fi: scan the QR with DSH Pocket. It connects automatically — no PIN needed.
Won't work on other networks (e.g. cellular). Use Cloudflare then.

Method 2: Cloudflare (any network, nothing to install)

Best for: being away from home without installing anything on the phone.

  1. Mac: choose Cloudflare.
  2. On first use the Mac downloads cloudflared (~20MB) — Cloudflare's official tunnel client, a small command-line program (not code we wrote). It is cached locally and not downloaded again. Wait for “starting” to finish in the panel.
  3. Scan the QR with DSH Pocket — connects automatically.
Traffic is relayed through the public network (slower than LAN), and the tunnel URL changes after a DSH restart — rescan then.

Method 3: Tailscale (fixed address, most stable)

Best for: frequent remote access with a stable address.

  1. Install Tailscale on both Mac and phone, signed in with the same account.
  2. Enable HTTPS Certificates in the Tailscale admin DNS page.
  3. Switch the connector to Tailscale in the panel. The plugin runs tailscale serve for you: it publishes the local entry (default 127.0.0.1:3091, or the next free port if that one is taken) to your tailnet and issues an HTTPS URL such as https://your-mac.xxx.ts.net. No terminal needed; run tailscale serve status to confirm.
  4. Mac: choose Tailscale; scan the QR with DSH Pocket — connects automatically, no PIN.
On iOS, Tailscale and proxy VPNs such as Shadowrocket cannot be active at the same time.

Method 4: EasyTier (self-hosted mesh)

Best for: technical users who want their own mesh and prefer not to rely on Cloudflare or Tailscale; also useful when Tailscale relays feel slow from mainland China.

How it is deployed on the Mac: as a launchd system service — starts at boot, restarts on crash, runs in the background, so it no longer occupies a terminal window. Once the phone proxy rules are set up (one time), scanning the QR connects automatically without a PIN.

How it really differs from Tailscale: Tailscale uses the official control plane plus overseas DERP relays — simplest to set up, most stable, but the relays are abroad. EasyTier can join public nodes in your region or be fully self-hosted, at the cost of a one-time manual setup. Choose Tailscale for zero fuss, EasyTier for independence.
  1. Install EasyTier on the Mac. No Homebrew formula on macOS — download the zip from GitHub Releases, then put easytier-core and easytier-cli into ~/.local/bin (no sudo needed).
  2. Install it as a system service (one time). Copy the command shown in the DSH panel and run it in a terminal (you will be asked for your password once). It writes a LaunchDaemon plist and loads it; from then on EasyTier runs in the background and survives closing the terminal or rebooting. Service label: com.ruska.dsh-pocket-ios.easytier.
  3. Configure the phone proxy (once). Shadowrocket → Config tab → + → paste the subscription URL shown in the panel (e.g. http://<电脑IP>:3091/dsh-pocket-ios/easytier.conf; default port 3091, falls back if taken — trust the panel) → download → select and enable.
  4. Important: set Global Route to “Config”, not “Proxy”. “Proxy” intercepts everything, including Apple's certificate verification, and DSH Pocket will report “unable to verify app”.
  5. Then scan to connect. Scan the QR with DSH Pocket — automatic login, no PIN.
This is still the highest-effort path of the four (CLI install + one sudo command + proxy rules). If you only need remote access, Method 2 (Cloudflare) is far easier.

Tips

Connecting from a cloud server

If DSH runs on a cloud server (Alibaba Cloud, Tencent Cloud, etc.), connecting works differently from a local machine: there is no desktop UI and therefore no "Phone access (iOS)" settings page, so you get the pairing code from the terminal instead.

If DSH runs on a cloud server (Alibaba Cloud, Tencent Cloud, etc.), connecting works differently from a local machine: there is no desktop UI and therefore no "Phone access (iOS)" settings page, so you get the pairing code from the terminal instead.

Preparation

  1. Install DSH on the server and confirm dsh web starts normally.
  2. Install the dsh-pocket-ios connector: run dsh plugin add dsh-pocket-ios, then restart DSH.

The easiest path on a cloud server: no public IP needed and no ports to open.

  1. Install Tailscale on the server.
curl -fsSL https://tailscale.com/install.sh | sh

If that download is unreliable in your region, use the official RPM repository instead (RHEL / CentOS / Alibaba Cloud Linux):

curl -sS https://pkgs.tailscale.com/stable/rhel/8/tailscale.repo -o /etc/yum.repos.d/tailscale.repo
dnf install -y tailscale
  1. Start the daemon and sign in.
systemctl enable --now tailscaled
tailscale up --hostname=dsh-server

It prints an authorization link — open it in a browser and sign in to your Tailscale account.

  1. Publish the connector to your tailnet.
tailscale serve --bg 3091

You get a fixed address such as https://dsh-server.your-tailnet.ts.net.

  1. Install Tailscale on the phone and sign in with the same account.
  2. Switch the connector to Tailscale mode.
npx dsh-pocket-ios mode tailscale

Get a pairing QR in the terminal

npx dsh-pocket-ios pair

The terminal prints both the QR code and the pairing URL, valid for 10 minutes, no password needed. To save it as an image and send it to your phone:

npx dsh-pocket-ios pair --png ~/pair.png

Then in DSH Pocket: Scan → Choose a QR image from Photos.

Useful commands

npx dsh-pocket-ios pair            # pairing QR (valid 10 min)
npx dsh-pocket-ios pair --png ~/q.png   # save as an image
npx dsh-pocket-ios status          # current mode, address, readiness
npx dsh-pocket-ios mode tailscale  # switch connection method
npx dsh-pocket-ios doctor          # run this first when it will not connect

Connecting and about sessions

Scan the QR printed in the terminal. After one successful connection the app remembers this machine — next time just tap it, no scanning and no password.

In the app, a "host" is one machine. Every machine you have connected to is listed; tap a row to switch. A single machine may be reachable by several addresses (home LAN, Tailscale outside) — they are grouped under that host, and the app picks the fastest reachable one each time (LAN first).

Auto-switching (on by default): if the current address stops working, the app moves to another address of the same host and shows which one it is using and its latency. You never choose "LAN or Tailscale" yourself.

Restore order at launch: ① the host you last selected → ② another address of that host → ③ the address that last connected successfully → ④ only then the connect screen (the list is kept).

No need to disconnect before adding a machine: Settings → Add → “Scan to add another”. The app connects to the new machine first and only switches on success; if it fails, your current connection is kept. Swipe a host row to rename it (e.g. “Mac”, “Aliyun”).

Sessions live in ~/.dsh/sessions/ on each machine, so the cloud server and your computer keep two independent sets and do not sync (DSH has no account system). Whichever machine the phone connects to is whose sessions you see — switch in the host list.

Manual connection without a QR code

Use the address printed in the terminal and the password from ~/.dsh/dsh-pocket-ios/pin on the server.

Connecting several DSH instances

If you run DSH on more than one machine (a laptop and a cloud server, say), they can message each other: ask the assistant on one machine to talk to a session on another, wait for the reply, and report back.

Requirement: both machines are in the same Tailscale account (same tailnet). That shared account is the trust basis — no pairing code or password is involved.

Step 1: join both machines to the same tailnet

Install Tailscale on both and sign in with the same account (see Method 3 above).

Step 2: add the other node in the panel

Open DSH → Settings → Phone access (iOS), find “Cross-machine (this machine → others)” at the bottom and fill in:

FieldWhat to enter
NameAnything, e.g. “Office Mac”.
AddressCopy the address shown in the other machine's “Connection status” (for example https://host.tailnet.ts.net:port). Keep the port — omitting it hits a different service and fails TLS.

Step 3: let the assistant talk to the other machine

Just say it in plain language:

List the sessions on the cloud server
Send “how is the server load today” to the session called XX there
The other side cannot see your context. It only receives the text you send, so make the message self-contained. Replies can take from seconds to minutes depending on what it is doing.

Privacy and permissions

  1. The trust scope is your tailnet account. Any machine in it can message yours without extra confirmation — so sharing your tailnet also shares your DSH.
  2. No public ports. Traffic stays inside the tailnet.
  3. Messages travel only between your machines (end-to-end via Tailscale); no server of ours is involved.
  4. The node list stays local (~/.dsh/dsh-pocket-ios/peers.json); the plugin ships with none.
  5. To stop: remove the entry in the panel, or remove the device from your tailnet.

How this differs from “phone → several machines”

Phone → several machines is one app switching between machines (the host list). Machine → machine is two DSH instances talking to each other (the cross-machine panel). They are independent and can be used together.

DERP relay tuning (advanced, optional)

This only affects speed when traffic falls back to a relay. If your devices usually achieve a direct connection, skip it. On mobile networks (strict carrier NAT, switching between 5G and Wi-Fi) Tailscale often ends up on a DERP relay, and the default relays sit in the US, Japan or Germany — 150 ms+ in practice. Hosting a relay in your own country can bring that down to single-digit milliseconds.

Why this happens

Tailscale prefers a direct path; when hole punching fails it uses a DERP relay (Tailscale's global relay fleet, chosen by proximity). From mainland China those relays are usually far away, so two machines in the same country end up talking through another continent.

RelayLocationLatency
DefaultNuremberg / Los Angeles~145–165 ms
Self-hostedsame city~3–5 ms

What you need

  1. A server with a public IP (1 vCPU / 1 GB is plenty) and enough bandwidth for relayed traffic.
  2. A domain that resolves publicly to that server, e.g. derp.example.com. A *.ts.net name will not work (see pitfall 1).
  3. A certificate for that domain (Let's Encrypt is fine).
  4. Firewall / security group open for the relay TCP port and UDP 3478 (STUN, optional).

Step 1: run derper

install -d -m 755 /opt/derper
install -m 755 derper /opt/derper/derper
install -m 644 derp.example.com.crt /opt/derper/
install -m 600 derp.example.com.key /opt/derper/

# systemd unit — note the capability line and -verify-clients
[Service]
ExecStart=/opt/derper/derper -a :444 -http-port -1 \
  -hostname derp.example.com -certmode manual -certdir /opt/derper \
  -stun -stun-port 3478 -verify-clients
# required when the port is < 1024, otherwise: bind: permission denied
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE

Step 2: register the relay in the ACL

Open the ACL editor and add a top-level derpMap (sibling of acls):

"derpMap": {
  "Regions": {
    "900": {
      "RegionID": 900,
      "RegionCode": "bjs",
      "RegionName": "China (Beijing)",
      "Nodes": [ {
        "Name": "900a", "RegionID": 900,
        "HostName": "derp.example.com",
        "IPv4": "YOUR_SERVER_PUBLIC_IP",
        "DERPPort": 444, "STUNPort": 3478
      } ]
    }
  }
}
Include the IPv4 field. The control plane probes the node (/derp/latency-check); with a hostname only it depends on public DNS, and if that fails the whole region is silently dropped — which looks like “I added it and nothing happened”.

Step 3: verify

tailscale netcheck                  # Nearest DERP should be your region
tailscale debug derp-map | grep 900  # your region must appear
tailscale status                   # direct or relay?

Three pitfalls (all hit in practice)

  1. The hostname must resolve publicly. A *.ts.net name is invisible outside the tailnet, so the control plane cannot probe the node and drops the region without any error. Check with dig +short derp.example.com @8.8.8.8.
  2. Ports below 1024 need a capability. An empty CapabilityBoundingSet= yields listen tcp :444: bind: permission denied; add CAP_NET_BIND_SERVICE.
  3. The certificate must match the hostname. With -certmode manual, a wrong or expired certificate fails the handshake (clients appear to connect and immediately drop).

Cost and cautions

App Store

GitHub repository

npm package

FAQ

Q: Does this app cost money?

Free. No in-app purchases, subscriptions or ads. The app is a remote screen for the DSH running on your own computer.

Q: Are my conversations uploaded?

No. The phone only talks to your own computer (LAN or a tunnel you set up). We run no server that receives your sessions, account or credentials. Addresses, PINs and cookies are stored on the phone (Keychain); diagnostics stay in the app sandbox.

Q: Can I use an Intel Mac?

Yes — DSH runs on Intel Macs; download the macOS build from the official download page.

Q: What if the phone and computer are on different networks?

LAN mode only works on the same Wi-Fi. Use Cloudflare (nothing to install on the phone) or Tailscale/EasyTier (installed on both sides).

Q: Another program is using port 3091 — what now?

Nothing — the plugin moves on. It prefers 3091 and tries 3092, 3093… if taken, remembers the chosen port in ~/.dsh/dsh-pocket-ios/proxy-port, reuses it next launch, and shows “Port 3091 is taken; using 3092 instead” above the fixed address.

To pin a port, set DSH_POCKET_IOS_PROXY_PORT and restart DSH; the QR follows the new port, so the phone must scan again. For LAN mode, allow the actual port in your firewall.

Q: The computer went to sleep and notifications stopped?

Expected — every connection and reminder depends on DSH running on that computer. For long unattended use, disable sleep (sudo pmset -a disablesleep 1 on macOS).

Q: Will I be notified when the AI finishes?

Yes, via a local notification (no push server involved). When the phone is locked the OS schedules background refreshes, so timing can lag by seconds to minutes.

Q: After turning on a proxy the app will not open (“unable to verify”)?

Set the proxy’s routing to “Config” rather than “Proxy” — global proxying hijacks Apple’s certificate validation and the app fails to verify.

Q: Can Tailscale and Shadowrocket be used together?

Yes — recent Shadowrocket builds include a Tailscale stack (Settings → Tailscale, paste an auth key), so one app provides both the tailnet and your proxy.

Q: Can I connect several devices at once?

Yes, several phones/tablets can connect to the same DSH; the panel lists each client with its last-seen time.

Q: Does it support iPad?

Yes — universal app for iPhone and iPad (iOS 17+ from 1.1.1).

Q: How many plugins do I need?

Just one: dsh-pocket-ios. All four connection methods come from it; the third-party dsh-pocket plugin is no longer required.

Q: Why does the Mac need a connector plugin?

The iOS app is only a remote control. DSH does not accept direct external access: the web port changes on restart, browser sessions trust only loopback requests, and there is no mobile login endpoint. The connector provides a stable entry, rewrites Host, and issues one-time pairing logins.

Q: “Pairing QR expired”?

Pairing codes are valid for 5 minutes; the panel rotates them when 30 seconds remain. Wait for the new code and scan again.

Q: Do I need the access PIN?

Not for scanning — all four methods log in automatically. The PIN is only needed for “manual connect” (typing the address yourself).

Q: The phone cannot connect, or shows HTTP 530 / secure connection failed.

Usually the tunnel URL changed. Reopen Phone access (iOS) and scan the new QR; for long-term stability use LAN or Tailscale.

Q: After enabling a proxy the app won't open (“unable to verify”).

The proxy is intercepting Apple's certificate verification (ppq.apple.com). For EasyTier, set Global Route to “Config” rather than “Proxy” and keep FINAL,DIRECT in the rules; or turn the proxy off, open the app, then turn it back on.