Introduction¶
DeepSeek Harness (DSH) adopts a plugin-based architecture. When developing or debugging agent applications, mobile devices often need to connect to a local Host via WebRTC or an encrypted tunnel. noirbright/dsh-mobile-pairing is a DSH Host-side plugin used to manage the mobile device pairing process, generate connection entry points, and provide WebRTC Direct and encrypted Tunnel Fallback capabilities.
Plugin Overview¶
This plugin is maintained by NOirBRight and is released under the MIT license. It runs as a component of the DSH Host and primarily addresses the following:
- Provides a unified pairing management interface.
- Exposes signaling and encrypted Tunnel entry points through the Host Gateway.
- Supports onboarding mobile devices into the DSH environment via QR code or Deep Link.
Core Features¶
- DSH Host Plugin: Acts as a Host-side component and provides pairing services.
- Pairing Management: Manages the state of paired devices.
- Host Gateway: Provides a local loopback address for mobile devices to connect to.
- WebRTC Direct: Supports peer-to-peer direct connection.
- Encrypted Tunnel Fallback: Provides an encrypted tunnel when direct connection is unavailable.
- QR Code Minting: Generates pairing QR codes (primarily for Android).
- Persistent Device Token: The token issued during initial pairing remains valid until revoked by the Host.
Installation¶
Run the following command in the terminal to install the latest version (v0.1.22):
dsh plugin --profile web add --force https://github.com/NOirBRight/dsh-mobile-pairing/releases/download/v0.1.22/dsh-mobile-pairing-0.1.22.tgz
After installation, the plugin must be enabled in the DSH configuration file.
Configuration and Usage¶
GUI Configuration Path¶
- Open the DSH client.
- Navigate to Settings → Plugins → Plugin Configuration → DSH Mobile.
- In the expanded card, you can view the current Public Endpoint and Host Identity.
- Refresh QR Code: Clicking the refresh button immediately mints a new offer, valid for 5 minutes.
- Device Management: Click “Open full device management” to view the device list, refresh QR codes for existing devices, or perform revocation.
Configuration File Settings¶
In the plugin configuration file, you need to specify the Host Gateway bind address and port, as well as the DSH Host connection information.
The default configuration is intended for the daily :3080 profile:
- id: dsh-mobile-pairing
config:
dshHost: 127.0.0.1
dshPort: 3080
gatewayBind: 127.0.0.1
gatewayPort: 0
For the Lab profile, it is recommended to set dshPort to 3082.
Mobile Access¶
- Android QR: Scan the QR code generated in the GUI.
- Deep Link: Android devices can open the pairing page directly via
dsh-mobile://pair.
Technical Details and Notes¶
Host Gateway Limitations¶
The Host Gateway only listens on the loopback address (127.0.0.1) and does not provide a browser Shell. This means the Gateway itself is not exposed to the public network, but the bounded Gateway can be exposed to mobile devices through a configured Public Endpoint (such as Quick Tunnel or a custom Endpoint).
QR Code and Token Mechanism¶
- The offer in the QR code is valid for 5 minutes.
- Refreshing the QR code generates a new offer, and the old one becomes invalid.
- After the first successful pairing, the issued Device Token remains valid until it is revoked on the Host side.
Processes and Dependencies¶
- Do not share DSH_HOME across multiple processes: Do not start a second DSH process that shares the same
DSH_HOMEdirectory to host this plugin, as this may cause conflicts. - Dependency Notes: This plugin depends on the
@dsh-mobile/e2e-tunnellibrary (version >= 0.1.6). Make sure this dependency is satisfied during installation.
References¶
- Plugin directory: https://www.skillhub.cn/plugins/NOirBRight/dsh-mobile-pairing
- Source repository: https://github.com/NOirBRight/dsh-mobile-pairing