Introduction¶
In the development workflow of DeepSeek Harness (DSH), remote device pairing usually requires opening a new browser tab or manually visiting a specific local port address. This approach interrupts the current workflow and increases the number of manual steps.
The DSH-QrPairing plugin adds a floating entry in the bottom-right corner of the WebUI, integrating the pairing process within the application interface. It serves as a companion UI for the dsh-remote-link gateway and provides a more seamless operational experience.
Plugin Overview¶
This is a client-side UI plugin maintained by huaxiren6. It does not directly handle pairing logic; instead, it injects the pairing entry into the desktop WebUI. By clicking the floating button, users can open an overlay within the application and view the pairing QR code directly.
Core Features¶
- Floating Entry: Displays a floating button in the bottom-right corner of the DSH WebUI.
- Embedded Overlay: After clicking the button, an overlay opens on the current page to display the pairing QR code, without switching tabs.
- Environment Restriction: The button is only displayed when accessed via
127.0.0.1orlocalhost. - Fault Tolerance: If the
dsh-remote-linkgateway is not detected, the overlay displays a “Gateway not detected” message instead of throwing an error or showing a blank page. - Real-time Data: The QR code and short code in the overlay are fetched in real time through a same-origin proxy.
Installation and Enablement¶
Before installing this plugin, make sure that the dsh-remote-link gateway plugin has already been installed.
Run the following commands to install it:
dsh plugin --profile web add github:BotonJ/dsh-remote-link
dsh plugin --profile web add dsh-remote-qr-button
Typical Usage¶
- Ensure that the DSH WebUI is started in local mode.
- Find the floating button in the bottom-right corner of the browser and click it.
- Wait for the countdown in the overlay, then scan the QR code with your phone to complete pairing.
Working Principle¶
This plugin is handled separately on the Host side and the Client side:
-
Host Side (Configuration and Proxy):
The plugin registers a same-origin route in the current service. It reads the port, short code, and TTL configuration ofdsh-remote-linkin real time through theGET /dsh-remote-qr-button/configprobe, and proxies the real-time pairing QR code image throughGET /dsh-remote-qr-button/qr.png. -
Client Side (Rendering and Interaction):
After clicking the floating button, the frontend requests the probe endpoint. The page renders the QR code using a same-origin<img>tag and displays a six-digit short code and countdown. During the countdown, polling is performed every 5 seconds. -
Electron Compatibility:
The plugin uses<img>instead of<iframe>to render the QR code. This is intended to address the issue where Electron desktop applications block cross-origin subframe navigation. If an iframe were used, content pointing tohttp://127.0.0.1:<port>/qrwould render as blank in Electron. The same-origin proxy ensures that both the browser and the Electron desktop client can display it correctly.
Notes¶
- Prerequisite Dependency: The
dsh-remote-linkgateway must be installed before using this plugin. - Access Restriction: The button is only displayed when accessed from
127.0.0.1orlocalhost. - ID Conflicts: The button ID used by this plugin is mutually exclusive with the ID injected by
dsh-remote-link. If both are mounted at the same time, the one mounted first takes effect, and the other one is skipped. - Runtime Permissions: The plugin runs with the permissions of the current DSH process. It is recommended to check the source code and license before installation.
Summary¶
DSH-QrPairing uses a same-origin proxy and a floating button design to solve the problem of frequently switching browser tabs during remote pairing. In particular, it uses <img> rendering on the Electron desktop client to ensure compatibility.
- GitHub: https://github.com/huaxiren6/DSH-QrPairing
- Community Directory: https://www.skillhub.cn/plugins/huaxiren6/DSH-QrPairing