DeepSeek Harness Reverse Proxy Plugin: LAN and Public Internet Access

Introduction

When running the DSH Web interface locally, it listens on 127.0.0.1 by default. To access the admin panel from a phone, tablet, or another computer on the same LAN, you either have to hunt for a random token in the startup logs or manually configure a reverse proxy. Starting from DSH 0.2.2, a plugin system was introduced. The dsh-plugin-reverse-proxy plugin, maintained by llifco, builds the reverse proxy logic directly into DSH and provides a LAN access toggle, a public-access key, port forwarding, a blacklist, and anti-scanning capabilities.

This article covers the plugin’s features, installation, and usage.

Plugin Overview

Plugin Name: dsh-plugin-reverse-proxy
Maintainer: llifco (GitHub account)
Category: admin-security
Version: 0.13.0
License: MIT
Node Version Requirement: >=22
DSH Version Compatibility: 0.2.2–rc.1~rc.3

The plugin starts a reverse proxy within the DSH process, forwarding requests to 0.0.0.0:8080 (default) to the DSH Web backend at 127.0.0.1:3080, and rewrites request headers so that dsh web accepts connections from LAN or public network clients.

Installation

The recommended approach is to install via the npm package (no build required):

dsh plugin --profile web add dsh-plugin-reverse-proxy

You can also install from source:

dsh plugin --profile web add github:llifco/dsh-plugin-reverse-proxy

After installation, go to the DSH Settings page and find the “Settings → LAN Access” entry. By default, only localhost is monitored; you must manually enable it.

LAN Access

By default, only 127.0.0.1:8080 is monitored, so only the machine running DSH can open the admin panel. To share access with devices on the same Wi-Fi / LAN, you must explicitly enable it:

Settings Page Method:
1. Navigate to “Settings → LAN Access”
2. Toggle the switch (purple) — a security prompt will appear
3. Click “Confirm” to activate

Command-Line Method (Chat Input Box):

/lan status    # Check status
/lan yes       # Enable (a security prompt is shown first; confirmation is required)
/lan no        # Disable
/lan port 9000 # Change the listening port (1024–65535, cannot be 3080)
/lan ipv6 on   # Enable IPv6 listening

SSH Terminal Method:

reproxy-lan status
reproxy-lan enable        # Requires typing "yes" to confirm
reproxy-lan disable
reproxy-lan port 9000
reproxy-lan ipv6 on

Once enabled, devices on the same network can access the full admin panel (sessions, terminal, settings) directly via http://<local IP>:<port> — no token or login required. The master switch only governs LAN access; requests from public IP addresses are blocked outright (403).

The listening port defaults to 8080 and can be changed via the Settings page or the command line. The change takes effect immediately (the listener is rebuilt), and the setting persists across restarts. An error is returned if the port is already in use or falls outside the 1024–65535 range.

Public Access & Access Key

To allow public internet access, an additional gate is required: the public access toggle + an access key.

Settings Page Method:
1. Find “Public Access” under the “Settings → LAN Access” page
2. Enter an access key (minimum 5 characters, alphanumeric only)
3. Click the “Random” button to auto-generate a 12-character random key
4. After filling in and saving, the access URL becomes http://<public IP>:<port>/<access key>

Command-Line Method:

/lan public on <key>     # Enable public access (if no key is specified, one is auto-generated)
/lan public on            # One-click enable: prompt → type "yes" → auto-generate a 12-char random key
/lan public off           # Disable public access only; the key is retained
/lan key <key>           # Change the access key

SSH Terminal Method:

reproxy-lan public on <key>
reproxy-lan public on     # One-click public enable: auto-generate a random key and print the access URL
reproxy-lan public off
reproxy-lan key <key>
reproxy-lan addresses     # List all accessible addresses (LAN/public IPv4+IPv6; public ones include the key)

When the access URL contains the key, the plugin sets a cookie valid for 30 days on the client. Subsequent page refreshes, resource loads, and WebSocket real-time channels no longer require the key in the URL. If the key is missing or incorrect, a 404 is returned.

The key is the sole credential. Changing the key immediately invalidates all old URLs, and every device must reconnect with the new key.

Additional Port Forwarding

The plugin can also expose other plugin ports that only listen on 127.0.0.1:

Chat Input Box:

/lan forward add 18787
/lan forward
/lan forward del 18787
/lan forward on
/lan forward off

SSH Terminal:

reproxy-lan forward add 18787
reproxy-lan forward        # View / remove / toggle
reproxy-lan forward del 18787
reproxy-lan forward on
reproxy-lan forward off

Access Control & Security

The plugin provides a blacklist and a whitelist (mutually exclusive toggles):

Blacklist: After adding an IP, any subsequent request from that device receives a 403. Anti-scanning support is included — when enabled, scanning requests are automatically blocked and logged.

Whitelist: After adding an IP, that device can access the panel directly without the key (in public mode the key is still required, but whitelisted devices can bypass key verification).

Command-Line Method:

# Blacklist
/lan scan on              # Enable anti-scanning (disabled by default)
/lan scan off
/lan scan log             # View the last 20 blocked entries
/lan clear                # Clear access records
/lan white <IP>           # Add to whitelist

# SSH Terminal
reproxy-lan scan on
reproxy-lan scan off
reproxy-lan scan log
reproxy-lan clear
reproxy-lan white <IP>

Reset to Defaults

If the configuration gets messed up, you can restore defaults in one step:

Chat Input Box:

/lan reset yes

SSH Terminal:

reproxy-lan reset

After resetting: the LAN toggle is off, the port reverts to 8080, the public access toggle is off, and the key and blacklist are cleared.

Typical Usage Flow

  1. Install the plugin: dsh plugin --profile web add dsh-plugin-reverse-proxy
  2. Open Settings → LAN Access, toggle the switch and confirm — LAN devices can now access the panel
  3. For public access, enable the public toggle and set a key via the Settings page or command line; the URL becomes http://<public IP>:<port>/<key>
  4. Add whitelist IPs or enable anti-scanning as needed

Use Cases & Caveats

  • Ideal for agent developers who need LAN or public access to the DSH Web admin panel
  • The plugin runs with the current DSH process permissions; review the source code and license before installing
  • Always set an access key when enabling public access to avoid exposing the admin panel
  • LAN access should only be enabled in trusted network environments

Summary

dsh-plugin-reverse-proxy provides a built-in reverse proxy and access control, enabling the DSH Web admin panel to be accessed directly from the LAN or the public internet — no more hunting for a random token in startup logs, and no need to configure nginx separately. Combined with port forwarding, a blacklist, a whitelist, and anti-scanning, it covers a wide range of scenarios from intranet sharing to external access.

  • Directory Page: https://www.skillhub.cn/plugins/llifco/dsh-plugin-reverse-proxy
  • GitHub: https://github.com/llifco/dsh-plugin-reverse-proxy
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye