dsh-phone-access: Toggle to Connect Phone to Current DSH Session

Introduction

The DeepSeek Harness (DSH) web interface listens on the local loopback interface by default. This is an intentional security boundary: changing it to 0.0.0.0 effectively exposes an interface capable of executing arbitrary commands to the entire local network. However, when you’re away from home and a session is running on the machine at home, you genuinely need to continue viewing and chatting from a mobile browser—same conversation, same process, not a separate login setup.

Common workarounds typically fail at three points: they cannot safely bind to external interfaces; DSH only trusts loopback or pre-declared domains for the /api Host header, while temporary tunnel domains are random each time; and the main connection is WebSocket, which ordinary reverse proxies do not handle (upgrade handshake), leaving the interface stuck on “Reconnecting.” The following community plugin dsh-phone-access (maintained by Hongjun1-RGB) provides a toggle switch in the DSH interface: when enabled, it launches a micro reverse proxy locally, connects to the public internet via Cloudflare Quick Tunnel, and can push the new address to WeChat.

What Is This

dsh-phone-access is a “networking tool” category plugin in the DSH ecosystem. The current npm package version is 0.1.5 (MIT). In one sentence: toggle a switch in the DSH interface to continue the current session from a mobile browser—same process, real-time message synchronization between both ends. The implementation combines an embedded reverse proxy, Cloudflare’s free Quick Tunnel, and an optional push service (including WeChat).

The DSH community plugin directory is on the independent site SkillHub, with no official affiliation to DeepSeek or High-Flyer. Source code and documentation are available in the GitHub repository.

What Problems It Solves

The plugin README summarizes the pain points into three issues, and works around them via a local proxy that only listens on 127.0.0.1 + Host rewriting + WebSocket passthrough:

  1. Cannot bind to 0.0.0.0: DSH only allows 127.0.0.1 for security; exposing the entire network segment is too risky.
  2. Host trust barrier for /api: tunnel domains are random and cannot be pre-configured.
  3. Main connection is WebSocket (/api/remote.mux): the proxy must handle the upgrade event and bidirectionally pipe the connection.

The data path can be understood as: the mobile browser enters via a temporary trycloudflare.com domain into the local proxy started by the plugin; the proxy rewrites the Host header to loopback, strips some cross-site related headers, and then forwards to the DSH core which still only listens locally.

Core Features

Interface and Toggle

  • If dsh-whale-widget is installed, the toggle appears in the “Phone Access” row of the whale girl’s ☰ settings menu: a toggle switch + a gear icon on the right (push settings). After toggling, it becomes active immediately and stays active; the whale spins during loading; once fully ready, there’s a circular green breathing glow behind it.
  • Without the whale plugin, it falls back to a draggable whale icon; right-click to open push settings.

Tunnel

Uses Cloudflare Quick Tunnel (cloudflared tunnel --url …): no Cloudflare account, domain, or credentials required. The domain looks like xxx-yyy-zzz.trycloudflare.com and changes when the tunnel is recycled; the plugin actively rebuilds it at configured intervals and pushes the new address through the configured push channel. On first use, cloudflared can be auto-downloaded from the official Release (~50MB), or you can specify cloudflaredPath in the profile.

Push

WeChat has no personal message API, so the plugin relays via Server酱 (ServerChan), WxPusher, pushplus, or WeCom Webhook. You can fill in API keys in the interface and test them (testing works without saving); keys are stored in $DSH_HOME/remote-access/config.json (permission 0600). Neither the interface nor the API echoes the original text; only masked versions are shown.

Other Behaviors

  • Adds cache headers for static resources like /assets/* accessed via the tunnel, reducing the burden of repeatedly downloading ~1.4MB on mobile devices.
  • Default proxy port is 19389; if occupied, it auto-increments.

Installation and Activation

Installation command from the repository README:

dsh plugin add dsh-phone-access

After installation, restart DSH and the toggle appears. The plugin is disabled by default (autoStart: false); you must manually enable it to establish an external tunnel.

Runtime requirements (stated in README): DSH core 0.2.0-rc.x; Node 20+; Windows / macOS / Linux.

Typical Usage

1. Install and Turn On the Switch

After running the install command and restarting, open “Phone Access” from the whale menu or fallback icon. Wait for the tunnel and proxy to be ready (green glow), then get the access link per plugin logic; if push is configured, the new address will be sent to the chosen channel.

Click the ⚙ in the “Phone Access” row, select the push method, fill in the key, set the daily limit (default example is 8), and you can click Test before clicking Save. Use “Clear Saved Key” to remove keys.

3. Batch Deployment: Write to Profile

Override in the profile’s cordis.patch.yml (takes precedence over interface storage):

- id: phone-access
  config:
    cloudflaredPath: ''   # Path to installed cloudflared. Leave empty to search PATH / common locations, download only if not found
    proxyPort: 19389      # Local proxy port; auto-increments if occupied
    rebuildMinutes: 130   # Interval (minutes) for actively rotating the tunnel
    autoStart: false      # Enable on load; defaults to false for security
    pushKind: serverchan  # serverchan | wxpusher | pushplus | webhook
    pushKey: ''           # Key for the corresponding channel
    pushCapPerDay: 8      # Daily push limit to avoid triggering push service rate limits

pushKind and channel descriptions are in the README table: serverchan, wxpusher, pushplus (requires real-name verification), webhook, etc.

Use Cases and Considerations

For whom: Personal developers who need to continue the current DSH session over mobile networks and can accept the “short-lived public tunnel + link-is-permission” model; not suitable for scenarios requiring fixed domains, long-term stable exposure, or zero public network links.

Security and permissions (must read the README “Security Notes”):

  • DSH still only listens on 127.0.0.1; external exposure is primarily through Cloudflare’s temporary tunnel. Behind the tunnel, DSH session cookie validation still applies; unauthenticated requests return 401.
  • Link is permission: anyone who gets the full link can enter your session. Do not forward it, do not screenshot and share externally, do not commit to repositories.
  • If you do not accept “having a public network link to DSH on the machine,” do not enable it.

The plugin runs with the current DSH process’s permissions; please review the source code and MIT license yourself before installation to confirm it aligns with your security policy.

Conclusion

dsh-phone-access consolidates “continuing the current session on mobile” into a single toggle in the interface: the local proxy solves Host and WebSocket issues, Cloudflare Quick Tunnel provides a temporary domain without registration, and the push service handles address synchronization after tunnel rotation. For details, HTTP route listings, or secondary development instructions, refer to the repository README.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye