Back to directory

dsh-one-gateway

In a curated listMaintenance: Active

tiantianflow/dsh-one-gateway

Private DSH One Gateway — loopback, identity-first ingress for DeepSeek Harness

View on GitHub
$ dsh plugin add dsh-one-gateway

Install

dsh has no central install command — add this plugin’s entry (documented in its README) to your profile or patch config, then restart.

How installs work

13

stars

1

forks

JavaScript

Language

MIT

License

2026-08-16

Created

2026-08-26

Last push

README

DSH One Gateway

MIT license DSH Web-profile bundle Node.js 20 or later

English · 简体中文

Share DSH Web with the people you choose — not your whole network.

A DeepSeek Harness (DSH) plugin that puts a private, zero-trust gateway in front of DSH Web. One allowlist. No user-chosen password. Being on the same Wi-Fi, tailnet, or mesh is never enough to get in.

Getting started

You need a working local DSH Web profile and Node.js 20+ (normally supplied by DSH). Installing the plugin does nothing until you run setup. Nothing is exposed.

Install

dsh plugin --profile web add github:TiantianFlow/dsh-one-gateway

Set up

dsh plugin --profile web exec dsh-gateway -- setup

Setup opens a menu, previews a plan, and waits for you to confirm. It refuses public or anonymous defaults. Operators on Tailscale.com are steered to identity-aware Tailscale Serve.

Then restart the DSH Web process you already own, and open the configured HTTPS origin as an allowlisted principal. Port 3088 itself remains unreachable from the LAN and from the provider network.

The full command is dsh-one-gateway; dsh-gateway is a shorter alias. Cloudflare Access, Headscale, local checkouts, and unattended flags are in Setup in detail.

What you get

An exact principal allowlist in front of DSH, a loopback-only HTTP/WebSocket proxy, and a single onboarding command that previews a plan and refuses public or anonymous defaults.

The gateway and DSH stay on loopback. Tailscale Serve, Cloudflare Tunnel with Cloudflare Access, or Headscale via Tailscale TCP Serve is only the private ingress. Joining that private network is never an authorization decision. Every request must resolve one unambiguous, allowlisted principal before anything is forwarded to DSH. That is self-hosted access control for a zero trust homelab: reachability is not permission.

Allowlisted browser ─ HTTPS ─> provider ingress (Tailscale Serve, Cloudflare Access,
                                      │           or Headscale TCP Serve)
                                      └─ loopback gateway ─> local DSH
                                         127.0.0.1:3088   127.0.0.1:3080

Callers authenticate through Tailscale Serve, Cloudflare Access, or — on Headscale — a generated gateway credential in front of private TCP Serve.

How this is different

Other DSH gateways may bind off loopback, patch DSH internals so a gate stays exhaustive after upgrades, or run a reverse proxy in front of DSH. Those designs can cover /api and WebSockets too; the difference is not who covers more of the surface. This plugin is a different contract: DSH itself never leaves loopback.

  1. Private network membership is never authorization. Binding 0.0.0.0 or treating RFC1918 as an allow is out of scope. The listener stays on loopback. Being on the same Wi-Fi, tailnet, or mesh does not get you in.
  2. Fail-closed DSH origin. DSH stays on loopback; the gateway is the only listener in front of it. A DSH upgrade cannot silently add a route that becomes reachable off-host — there is no gate route table to keep exhaustive, because DSH was never reachable off-host to begin with. A missed route in a full-coverage gate is a silent bypass; a missed route in this bridge just breaks that one proxied path. It does not expose DSH.
  3. No DSH-core or client-library patches. Some gates stay exhaustive by patching DSH HTTP and upgrade entry points, then re-applying those patches after every upgrade — because an upstream change can silently undo them. This gateway is an external process. DSH's own code is never modified.
  4. For Tailscale Serve and Cloudflare Access, identity comes from the provider — not a login page, password, or shared token. Password forms, shared tokens, and session-cookie doors are a large auth surface and a common source of bugs. Those two shipped modes use Serve's injected Tailscale-User-Login, or a locally verified Cloudflare Access JWT. We check an allowlist. We do not ask you to invent a password. gateway-credential is a smaller, purpose-built login for transports with no native identity: a generated per-principal credential (not a user-chosen password), verifier-only storage, a bounded HttpOnly/Secure/SameSite=Strict session, individual revocation, and rate limiting without permanent lockout. Compared with a typical user-chosen or shared password, that is stronger on guessability, storage disclosure, and revocation; it is not "passwordless" and not a claim of superiority over every password or passkey. Headscale TCP Serve is the shipped transport that uses this mode. For any transport-only provider with no native identity, the contract is a product-owned bridge from the private overlay to the unchanged loopback gateway, authenticated with gateway-credential — never a fabricated identity header.
  5. One plugin, one onboarding command, one allowlist. Instead of a different bespoke setup per provider, Tailscale Serve, Cloudflare Tunnel with Access, and Headscale TCP Serve share one loopback gateway. A new provider is another adapter, not another product.

Setup in detail

Read the full README on GitHub →

DSH Plugins is an independent community directory of DeepSeek Harness plugins. Not affiliated with or endorsed by DeepSeek. Third-party plugins are not security-audited — review the source before installing.

New DeepSeek Harness plugins, weekly. No spam.