dsh-tailnet-admin: Enable DSH Admin Page on Non-Loopback Addresses

DeepSeek Harness (DSH) defines “local” by default as the globalThis.__DSH_TRANSPORT__ injected by the desktop shell or the loopback address (localhost). When accessing DSH via Tailscale Tailnet or a reverse proxy domain, the settings page reports settings are unavailable in this browser, and browser session authentication (token) fails after a restart. The dsh-tailnet-admin plugin breaks these two problems into independent switches, making the settings page available on non-loopback addresses and supporting on-demand disabling of browser session verification, while retaining the Host/Origin barrier.

Basic Information

  • Plugin Name: dsh-tailnet-admin
  • Maintainer: he0119
  • Category: Networking Tool
  • License: MIT
  • Core Value: Treat Tailnet / reverse-proxy pages as “local”: enable host-persistent settings and optionally disable browser session verification (Host/Origin barrier remains unchanged).

Core Features

  1. Settings Page Availability: Allows the DSH settings page to be available on non-loopback addresses, resolving the settings are unavailable in this browser issue.
  2. Session Authentication Control: Provides a switch to disable browser session verification (disableBrowserAuth), resolving the token-invalidation-after-restart problem.
  3. Security Barrier Retained: Retains the Host/Origin barrier, removing only the browser-side token verification.
  4. Local Development Support: Supports local development installation via link:/path/to/....

Installation & Configuration

1. Install the Plugin

Before installation, ensure the Node.js version is ^22.19.0 || >=24.0.0.

Install using the official command:

npx @deepseek-ai/dsh plugin --profile web add @he0119/dsh-tailnet-admin

For local development, build first, then install via a link:

pnpm run build
npx @deepseek-ai/dsh plugin --profile web add link:/path/to/dsh-tailnet-admin

2. Register as a Bundle

dsh plugin add only runs pnpm add; DSH reads dsh.profile.bundles at startup. After installation, you must register it in the profile’s package.json.

// ~/.dsh/profiles/web/package.json
{
  "dsh": {
    "profile": {
      "bundles": [
        "@he0119/dsh-tailnet-admin"
      ]
    }
  }
}

Alternatively, you can do this through the DSH UI: go to Settings → Plugins, find the package under “Installed but not enabled”, and enable it once to complete registration.

3. Configure Switches

The plugin provides two independent configuration options: pageHosts and disableBrowserAuth.

Method 1: Via the Configuration Page

  1. Open DSH Settings → Plugins.
  2. Find the dsh-tailnet-admin plugin page.
  3. pageHosts: Page hosts to treat as “local”, one per line.
    • A leading . indicates suffix matching (e.g., .ts.net matches a.ts.net).
    • * matches all.
    • Defaults to empty; must be configured manually.
  4. disableBrowserAuth: Disable browser session verification. Defaults to off; read the “Security Boundaries” section before enabling.
  5. Save the configuration.

Method 2: Edit the Configuration File

Edit ~/.dsh/profiles/web/cordis.patch.yml directly:

- id: tailnet-admin            # Plugin's fixed id convention
  name: '@he0119/dsh-tailnet-admin'
  config:
    pageHosts:
      - .ts.net              # or an exact hostname, or *
    disableBrowserAuth: true # default: false

Note: disableBrowserAuth takes effect immediately; pageHosts requires a page refresh to take effect.

Security Boundaries

When disableBrowserAuth is on, there is no browser token authentication, relying solely on the Host/Origin barrier. This means anyone who can open this page gains machine control (read/write files, execute commands, use API keys). The exposure surface depends on Tailscale ACLs or reverse-proxy access controls.

Recommended combination:
* Enable pageHosts as needed.
* Enable disableBrowserAuth only when the frequent token-invalidation issue must be resolved.
* After enabling, confirm that Tailscale ACLs only allow trusted devices.

Troubleshooting

Symptom Cause
Settings page still reports settings are unavailable in this browser pageHosts does not match the current hostname (must include the leading dot suffix), or the page has not been refreshed
Request returns 403 directly Host/Origin barrier not satisfied: add --trusted-host <authority> to the dsh web startup arguments
Still requires ?token= disableBrowserAuth is not enabled
Startup log does not show [dsh-tailnet-admin] The package name has not been added to dsh.profile.bundles, or the package is not installed
Configuration page shows “written to this browser only” The current page is not being treated as “local”; open from a loopback address first or modify cordis.patch.yml

Summary

dsh-tailnet-admin resolves the settings-page unavailability and session authentication issues for DSH in Tailnet or reverse-proxy environments. By splitting the two switches pageHosts and disableBrowserAuth, it provides flexible configuration while retaining the security barrier.

  • GitHub: https://github.com/he0119/dsh-tailnet-admin
  • Directory: https://www.skillhub.cn/plugins/he0119/dsh-tailnet-admin
羽毛球分组比赛记分
小程序二维码

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

Xiaoye