Preface¶
The DeepSeek Harness (DSH) Web profile defaults to running on the local loopback address, making it suitable for local development and personal use. To share the DSH Web with a few trusted individuals, common approaches include configuring a reverse proxy, setting up intranet penetration, or adding a gateway layer in front of DSH. These methods often conflate “access to the private network” with “permission to access,” or require patching the DSH core to maintain gateway coverage after upgrades.
This introduces the community plugin dsh-one-gateway (maintained by TiantianFlow, GitHub repository: TiantianFlow/dsh-one-gateway). It places a loopback-only gateway in front of the DSH Web, using an exact allowlist of principals for authentication. DSH itself always remains bound to 127.0.0.1.
What Is It¶
dsh-one-gateway is a plugin for DSH’s web profile, positioned as a “private, zero-trust entry point for DSH Web.” In one sentence: it adds a loopback proxy and authentication layer in front of DSH Web, only allowing principals from an allowlist and not exposing DSH directly to the local network or edge network.
The plugin is currently at version v0.1.0, licensed under MIT, and requires Node.js 20+ (usually bundled with DSH). It is categorized under admin-security in the SkillHub community directory. It is not an intranet penetration tool and does not replace Tailscale or Cloudflare; instead, it adds an identity layer on top of your existing private entry points.
Core Features¶
Based on the positioning above, the plugin’s capabilities can be broken down into the following parts.
Loopback Proxy with Fail-Closed¶
The gateway listens on 127.0.0.1:3088, while the upstream DSH Web remains on 127.0.0.1:3080. The entry provider (e.g., Tailscale Serve, Cloudflare Tunnel with Cloudflare Access, Tailscale TCP Serve on Headscale) is only responsible for routing HTTPS traffic to the local gateway—joining the private network itself does not constitute authorization.
Before forwarding a request to DSH, the gateway must resolve a clear principal that is on the allowlist; if not, it returns a 403. DSH upgrades will not silently add routes accessible from outside, because DSH never listens outside the loopback from the start.
Three Supported Entry Points and Authentication Modes¶
| Entry Point | Authentication Method | Identity Source |
|---|---|---|
| Tailscale Serve | trusted-header |
Tailscale-User-Login injected by Serve |
| Cloudflare Tunnel + Access | signed-jwt |
Locally verified Cloudflare Access JWT |
| Headscale TCP Serve | gateway-credential |
System-generated per-principal gateway credential |
In Tailscale Serve and Cloudflare Access modes, identity comes from the entry provider, requiring no user-selected passwords. Headscale TCP Serve lacks native HTTP identity headers, so the plugin uses the gateway-credential mode: the CLI issues a high-entropy credential, the gateway stores only a verification hash, supporting individual revocation and rate limiting.
One Setup Command, One Allowlist¶
All three entry points share the same loopback gateway instance and a single trustedPrincipals allowlist. The setup command previews the plan and rejects public or anonymous defaults before writing to the profile. The full command is dsh-one-gateway, aliased as dsh-gateway.
Explicit Non-Goals¶
The plugin documentation lists boundaries worth noting: every allowed principal is a full DSH administrator; it does not support public anonymous tunnels, Funnel, or Cloudflare quick tunnels; it does not manage edge-level ACLs or DNS; uninstalling does not automatically delete Tailscale Serve routes, Cloudflare tunnels, or credential files; nor does it defend against processes on the local machine that can directly connect to DSH’s loopback port.
Installation and Enabling¶
Before installing, please review the GitHub source code and the MIT license yourself. The plugin runs with the dsh process permissions, and installation implies trust in the maintainer’s code.
A locally available DSH Web profile is required. Simply installing the plugin without running setup will not expose anything.
1. Install the Plugin
dsh plugin --profile web add github:TiantianFlow/dsh-one-gateway
To install from a local directory:
dsh plugin --profile web add -w /path/to/dsh-one-gateway
2. Run Setup
dsh plugin --profile web exec dsh-gateway -- setup
The setup opens a menu, previews the plan, and waits for confirmation before writing. It rejects public or anonymous defaults; operators on Tailscale.com will be guided to the authenticated Tailscale Serve.
3. Restart DSH Web
Restart your existing DSH Web process, then have principals on the allowlist open the configured HTTPS origin. Port 3088 itself is unreachable from both the local network and edge networks.
Typical Usage¶
Interactive Setup (Default)¶
When --provider is omitted, setup prompts for the entry point via a menu. If exactly one entry point executable is detected locally, it is suggested as the default, but this is not a configuration validation.
Tailscale Serve¶
dsh plugin --profile web exec dsh-gateway -- setup --provider tailscale-serve
Cloudflare Access¶
You must preconfigure an Access application that forwards only to 127.0.0.1:3088; setup does not create tunnels, DNS records, or the Access application itself.
dsh plugin --profile web exec dsh-gateway -- setup --provider cloudflare-access \
--external-origin 'https://dsh.example.invalid' \
--team-origin 'https://team.example.invalid' \
--application-audience 'replace-with-access-application-audience' \
--trusted-principal 'email:operator@example.invalid'
Headscale TCP Serve¶
The certificate and private key are provided by the operator; setup does not treat it as a menu item equal in weight to Tailscale Serve on Tailscale.com.
dsh plugin --profile web exec dsh-gateway -- setup --provider headscale-tcp-serve \
--tls-cert /path/to/dsh-one-gateway/cert.pem \
--tls-key /path/to/dsh-one-gateway/key.pem \
--credential-store /path/to/dsh-one-gateway/credentials.json \
--trusted-principal operator-1
Post-Installation Operations Commands¶
dsh-gateway doctor
dsh-gateway credential issue --store /path/to/dsh-one-gateway/credentials.json --name operator-1
dsh-gateway credential list --store /path/to/dsh-one-gateway/credentials.json
dsh-gateway credential revoke --store /path/to/dsh-one-gateway/credentials.json --name operator-1
Use --print to preview the plan without writing to the profile. In non-interactive scenarios, adding --yes requires all security-sensitive parameters to be explicitly provided.
Use Cases and Considerations¶
Who is it for: Developers or home lab operators already using the DSH Web profile who want to share the instance with a few designated individuals (colleagues, family) and are willing to set up Tailscale Serve, Cloudflare Access, or Headscale TCP Serve as private entry points.
Difference from similar gateways: Other DSH gateways might listen outside the loopback or patch the DSH core to maintain gateway coverage after upgrades. This plugin takes a different path—DSH never leaves the loopback, the gateway is an independent external process, and DSH source code is not modified. Missing a proxy path only renders that path unusable, without silently exposing DSH.
Before use, please confirm:
- The plugin runs with the current
dshprocess permissions; review the source code and MIT license before installation. - Every principal on the allowlist has full DSH administrator privileges, not multi-tenant or fine-grained RBAC.
- Processes on the local machine that can connect to
127.0.0.1:3080or127.0.0.1:3088are outside the threat model. - SkillHub (directory page) is the DSH community plugin directory and has no official affiliation with DeepSeek / High-Flyer.
The DSH ecosystem’s philosophy is “everything is a plugin”; dsh-one-gateway separates “can connect” from “is allowed,” using a loopback gateway with an exact allowlist to provide a verifiable installation path for self-hosted scenarios requiring remote access to DSH Web.
- Community directory: https://www.skillhub.cn/plugins/TiantianFlow/dsh-one-gateway
- GitHub: https://github.com/TiantianFlow/dsh-one-gateway