返回目錄

dsh-one-gateway

精選清單收錄維護狀態: 活躍

tiantianflow/dsh-one-gateway

私有 DSH One 閘道器:面向 DeepSeek Harness 的迴環、身份優先安全入口,配合 Tailscale 實現遠端訪問。

前往 GitHub
$ dsh plugin add dsh-one-gateway

安裝

dsh 沒有統一的安裝指令 —— 把該外掛 README 中的設定行加入你的 profile / patch 設定,然後重啟即可。

查看安裝教學

13

星數

1

Fork

JavaScript

語言

MIT

授權條款

2026-08-16

建立於

2026-08-26

最近推送

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

在 GitHub 閱讀完整 README →

DSH Plugins 是獨立的 DeepSeek Harness 外掛目錄,與 DeepSeek 官方無關,也不代表官方背書。第三方外掛未經安全稽核,安裝前請審查原始碼。

每週取得最新的 DeepSeek Harness 外掛,絕不濫發。