Introduction

By default, DSH Web only listens on 127.0.0.1 and has Host/Origin guards that only allow local access. This prevents direct connection from a phone or other devices on the local network. The dshgo plugin solves this issue by exposing dsh web to the local network and providing mobile adaptation and an access password feature.

What It Is

dshgo is a combination of a plugin and an Android client.
* Plugin: Changes the listening address of dsh web so it can be accessed over the local network, and provides a settings tab for viewing addresses, QR code, and configuring the password.
* App: Provides a native experience for phones and tablets, with support for session notifications, approval actions, voice input, and more.

Installation

Install the plugin by running the following command in the terminal:

dsh plugin --profile web add github:xiazhi88/dshgo -w

After installation, dsh web must be restarted for the changes to take effect.

Note:
* When upgrading, if the old dsh-lan plugin was previously installed, remove the old package first: dsh plugin --profile web remove dsh-lan.
* The plugin requires DSH version 0.1.2-rc.1 or later.

Configuration

If you need to customize the port, configure it in cordis.patch.yml of the profile:

- id: dshgo
  config:
    port: 3081        # 对外端口,默认 3081
    bind: 0.0.0.0     # 对外绑定地址

Usage

After installing and restarting dsh web, a top-level tab named 「LAN Access」 will appear in DSH settings.

  • View Address: Clicking the tab shows all available local addresses and a QR code; scan it with your phone to access the service.
  • Local Access: Browsers on the same machine can also access it directly through this tab.
  • Access Password: Disabled by default. For security, you can enable the access password in the tab. Browsers will show a password page, and the App will use fingerprint or face unlock.

Security Notice:
* This plugin exposes DSH, which can execute arbitrary code, to the local network.
* Do not forward the address or port to the public internet.
* Use it only on trusted networks (such as home WiFi).

Android App Features

The Android App of dshgo provides the following features:
* Session Notifications: Sends a notification when a session completes or is waiting for approval; you can click “Allow” directly in the notification bar.
* Connection Management: Manages connections to multiple computers, and lets you view status, latency, and plugin version.
* Voice Input: Supports voice input in the input box.
* Home Screen Widget: View status and perform approvals directly from the phone home screen.
* Access Gate: Shares the password with the plugin and supports unlock via fingerprint, face, or device password.
* In-App Updates: Supports downloading and installing updates directly.

Technical Details

  • Guard Bypass: The plugin rewrites the Host/Origin of incoming requests to 127.0.0.1:<dshPort>, bypassing the Host/Origin guard of DSH Web.
  • Polyfill: Injects polyfills for crypto.randomUUID and AbortSignal.any to support older WebViews and non-secure contexts.
  • Token Injection: Injects the startup token to ensure the session cookie can be obtained.

License

MIT.

References