README
DSH One Gateway
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.
- Private network membership is never authorization. Binding
0.0.0.0or 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. - 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.
- 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.
- 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-credentialis 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 boundedHttpOnly/Secure/SameSite=Strictsession, 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 withgateway-credential— never a fabricated identity header. - 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
更多「安全與驗證」外掛
dsh-uumit-remote
作者 uumit-ai
為 DeepSeek Harness 提供遠端訪問能力,支援從其他裝置連線和使用會話。
dsh-auto-review
作者 perrylink
第二模型 AI 自動評審:只讀評審子智慧體對審批請求返回結構化允許或拒絕結論,預設關閉、全程可審計。
cc-safety-net
作者 kenryu42
面向 AI 程式設計智慧體的執行前安全防護外掛,在工具呼叫前攔截破壞性 Git、檔案操作和敏感檔案訪問,相容多種編碼 Agent 與命令列工具。
dsh-permission-rules
作者 perrylink
Claude Code 風格宣告式許可權規則:按序 allow/deny/ask 匹配工具、引數與工作區路徑
