Introduction¶
The Web interface of DSH typically runs on a local machine or an internal network environment. When you need to access it on a mobile phone, open sessions from the external network, or want to retain a controllable public network entry, relying solely on local ports is inconvenient. dsh-web-remote-frp is a DSH plugin maintained by Casually, designed for the “Mobile / External Network Remote Access” scenario. It implements the public network channel via frp intranet penetration while retaining local area network HTTP / HTTPS direct connection.
Below is an introduction to the plugin’s positioning, core features, installation method, and basic usage.
What is it¶
dsh-web-remote-frp is a DSH remote access plugin with an MIT license. It adds a remote access entry to the DSH plugin ecosystem, providing capabilities such as frp public network penetration, LAN direct connection, token authentication, gzip compression, and bot channels.
Its goal is to allow DSH Web to be accessible by LAN devices, and to form a configurable remote access entry on a public server that deploys frps.
Core Features¶
- frp Public Network Penetration: Automatically downloads the latest version from GitHub Releases if frpc is missing; supports tcp / http / https proxy modes.
- LAN Direct Connection: Supports HTTP + HTTPS; HTTPS automatically generates self-signed certificates, zero configuration.
- Independent Switches: LAN and public network can be turned on/off independently without affecting each other.
- Secure Authentication: Generates a random token at every startup; uses HttpOnly Cookies; LAN access can be token-free; public network access always requires a token.
- Proxy Compression: Reverse proxy automatically performs gzip compression, improving the loading speed of large historical sessions.
- Sidebar Entry: Mobile shortcut button stays in the sidebar and does not disappear after refreshing.
- Bot Channels: Supports WeChat, QQ (NapCat), Telegram, DingTalk, Feishu/Lark, and WeCom.
Installation and Activation¶
First, execute the installation command in the DSH profile directory:
pnpm add dsh-web-remote-frp
After installation, add the plugin to the dsh.profile.bundles array in the profile’s package.json:
{
"dsh.profile.bundles": [
"dsh-web-remote-frp"
]
}
Then, start DSH Web:
dsh web
Note: After installing or updating via the bundle method, DSH must be restarted; bundle changes do not support hot reloading. If using the cordis.patch.yml method, it will be hot-reloaded via HMR.
If pnpm 11 reports a new release package age validation error for a newly released version, you can retry by adding a parameter:
pnpm add dsh-web-remote-frp --config.minimumReleaseAge=0
Basic Configuration¶
The plugin can be configured by inserting settings into the profile’s cordis.patch.yml. Key configuration items include:
frpServerAddr: frps server address; if left blank, it is only available on the LAN.frpServerPort: frps server port.frpAuthToken: frps authentication token.frpProxyType: Proxy mode; verified to support tcp / http / https.frpRemotePort: Public network access port.
The example structure is as follows; fill in the values according to your frps environment:
- insert:
- id: web-remote-frp
config:
frpServerAddr: "your-frps-host"
frpServerPort: <frps-port>
frpAuthToken: "<frps-auth-token>"
frpProxyType: "tcp"
frpRemotePort: <remote-port>
If you are only using it on the local machine or LAN, you can leave frpServerAddr blank, and the plugin will be LAN-only.
Typical Usage¶
Check Status and Token¶
Run on the local machine:
curl http://127.0.0.1:3080/frpremote/info
Check the status and extract the token via the returned information. Public network access always requires a token; after the token changes, old links and old Cookies will become invalid immediately.
Re-enable LAN¶
When there is no GUI, or the LAN switch is turned off, you can execute the following on the local machine:
curl -s -X POST http://127.0.0.1:3080/frpremote/control \
-H 'content-type: application/json' \
-d '{"action":"lan:start"}'
After execution, confirm the status again:
curl http://127.0.0.1:3080/frpremote/info
Public Network Access¶
Public network tunnels require a server with a public IP running frps. After configuring frpServerAddr, frpServerPort, frpAuthToken, frpProxyType, and frpRemotePort, the public network entry is exposed via the frp tunnel.
Public network access always requires a token. You can check the status and extract the current token from /frpremote/info.
Applicable Scenarios and Notes¶
Suitable for the following situations:
- Want to access DSH Web interface from a mobile phone or external network.
- Want the public network entry to be provided by your own deployed frps server.
- Want to turn LAN and public network on/off separately to avoid mutual interference.
- Need bot channels such as WeChat, QQ, Telegram, DingTalk, Feishu/Lark, and WeCom.
Precautions before use:
- The plugin runs with the permissions of the current dsh process. You should check the source code, dependencies, and MIT license before installation.
- Public network access always requires a token. Process restarts,
renewactions, and configuration saves will regenerate the token; if you encounter an old link becoming invalid, first confirm if the token has changed. - When
frpServerAddris left blank, it is LAN-only; using a public network tunnel requires an frps server. - After updating via the bundle method, DSH must be restarted; the
cordis.patch.ymlmethod will be hot-reloaded via HMR. - It differs from
dsh-web-remotein DOM id, HTTP routes, and localStorage key prefixes, and theoretically can be installed simultaneously without conflicts.
Resources¶
- Community Directory: https://www.skillhub.cn/plugins/Casually/dsh-web-remote-frp
- GitHub: https://github.com/Casually/dsh-web-remote-frp