Preface

dsh-sakurafrp is a satellite plugin designed for the dsh-mobile plugin. It is used to manage the connection between mobile devices and desktops directly from the DSH UI (SakuraFrp TCP tunnel + dsh-mobile gateway). This plugin replaces the previous workflow that required writing scripts, modifying YAML files, or manually maintaining systemd with graphical operations.

According to the GitHub repository description, this plugin is a “Vibe coding” product. The code was generated through author–AI conversations and refined over multiple iterations, and it has not been manually audited line by line. It is provided “AS IS” under the MIT License, without any warranty, and use is at your own risk.

Core Features

The plugin provides the following core management capabilities:

  • One-screen link status: Directly displays gateway runtime status, latency, number of paired devices, and watchdog status on the panel.
  • One-click mobile access toggle: Directly controls the dsh-mobile mobile gateway through the UI (equivalent to making an API call). Disabling it leaves a suppression marker to prevent the self-healing mechanism from automatically bringing it back up.
  • Pairing QR code: Generates a QR code and link for a one-time pairing window, supporting QR-code scanning on mobile devices.
  • Device management: Supports revoking devices individually or clearing the entire device list with one click.
  • Gateway self-healing: Includes a built-in self-healing mechanism that checks gateway status every 15 seconds and automatically restarts it if an issue is detected.
  • Public reachability probing: Probes the main entry point and carrier-prefix nodes every 60 seconds, and displays connectivity directly in the panel.
  • External watchdog toggle: Controls starting and stopping of dsh-mobile-lan-watchdog.service (this service is a redundancy layer; the plugin’s built-in self-healing can already provide an independent fallback).

Installation and Enablement

The installation process requires cloning the repository, entering the directory, and running the installation script.

git clone https://github.com/ankhishtar2-lang/dsh-sakurafrp.git
cd dsh-sakurafrp
bash scripts/install.sh

The installation script performs the following operations:
1. Copies the plugin files to $DSH_HOME/profiles/web/node_modules/.
2. Appends dsh-sakurafrp to dsh.profile.bundles.
3. Runs a static self-check (verifies that the apply export exists).

After installation is complete, the corresponding DSH Web Profile service must be restarted for the changes to take effect.

Typical Usage

  1. UI operation: Click the phone icon button in the DSH session header tool area (order: -15). This button is located between “Restart” and “Open File Manager.” In this panel, you can view status, toggle the gateway, view the QR code, and manage devices.
  2. Configuration file: Configure the dsh-mobile mobile gateway parameters in $DSH_HOME/profiles/web/cordis.patch.yml (such as port, CA fingerprint, etc.).
  3. Environment variables: Set environment variables such as DSH_SAKURA_ORIGIN to override default behavior or configure the public entry point.

Dependencies and Requirements

The plugin has explicit runtime hard dependencies and platform restrictions:

  • Runtime hard dependencies:
    • dsh-mobile plugin: Provides the local management interface.
    • SakuraFrp launcher (frpc): Provides the public TCP tunnel.
  • Platform and version:
    • Operating system: Supports Linux / WSL2 only.
    • Node.js: Requires >= 20.
    • DSH core: Must be validated on a web profile in the 0.1.5-rc.1 series.
  • Runtime soft dependencies:
    • dsh-mobile-lan-watchdog.service: External self-healing service (optional).

Notes

  • Vibe Coding warning: The code was generated by AI and has not been manually audited. It is not recommended for direct use in production environments or for handling security-sensitive data.
  • Platform limitations: Currently supports Linux and WSL2 only. The code uses POSIX features such as systemctl --user.
  • License: Follows the MIT License and is provided as-is.