DSH Pocket iOS GitHub

DSH Pocket iOS 产品使用说明

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

电脑保持开机、不休眠,DSH 一直运行即可;手机端随时扫码或点一下就接入。

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

这个 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 18 及以上)。

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

三样都装好之后

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

使用场景

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

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

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

四种连接方式

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

方式适合电脑要做什么手机要装什么
局域网手机和电脑在同一个 Wi-Fi什么都不用什么都不用
Cloudflare人在外面,任何网络插件自动下载 cloudflared(约 20MB,Cloudflare 官方隧道客户端),无需注册什么都不用
Tailscale长期使用,要固定地址装 Tailscale 并注册登录 + 后台开 HTTPS Certificates + 跑 tailscale serve --bg 3091装 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 serve --bg 3091。这一步做的是:把连接器在电脑本机的入口(127.0.0.1:3091)发布到你的 tailnet,并自动签发一个 HTTPS 地址(形如 https://你的电脑名.xxx.ts.net)。不做这步,手机连不到你电脑;--bg 表示后台常驻,跑一次就够,重启电脑也保留。
  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)。
  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 会记住这台服务器,下次在「历史连接」里点一下就进入,不需要再扫码或输密码。

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

没有二维码时的手动连接

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

相关链接

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:扫码提示「配对二维码已失效」?

配对码有效 5 分钟,面板会在剩余 30 秒时自动换新码。等新码出现再扫即可。电脑休眠或 DSH 关闭后也会失效。

Q:需要输访问密码吗?

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

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

最常见是隧道地址变了(尤其 Cloudflare 在 DSH 重启后)。回到电脑的设置页重新出码再扫一次。仍不行时依次排查:① Tailscale 没启动或没登录(systemctl status tailscaled);② 忘了把入口发布出去(tailscale serve --bg 3091);③ 手机没登录同一个 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, run tailscale serve --bg 3091Install 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.

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. On the Mac run tailscale serve --bg 3091. What this does: publishes the connector's local entry (127.0.0.1:3091) to your tailnet and issues an HTTPS URL such as https://your-mac.xxx.ts.net. Without it the phone cannot reach your Mac. --bg keeps it running in the background; one run is enough and it survives reboots.
  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://192.168.1.18:3091/dsh-pocket-ios/easytier.conf) → 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 server — next time just tap it under recent connections, no scanning and no password.

Sessions live in ~/.dsh/sessions/ on each machine, so the cloud server and your local 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 with recent connections.

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.

App Store

GitHub repository

npm package

FAQ

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.