deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
English | 简体中文
Host plugin for DeepSeek Harness (dsh --profile web) that makes the browser GUI usable over the LAN and protects it with a password:
crypto.randomUUID polyfill — the GUI's RPC client mints request ids with crypto.randomUUID(), which browsers only expose in secure contexts (HTTPS or loopback). Plain-HTTP LAN origins (192.168.x.x, hostnames, ZeroTier IPs) are not secure contexts, so every /api call throws client-side (crypto.randomUUID is not a function), the session list never loads, and the GUI falls into the workspace-picker state. The polyfill is based on crypto.getRandomValues, which IS available on insecure origins.
Password authentication — wraps the page fallback, the /api prefix route, and the two WebSocket downlink upgrades (/api/events.mux, /api/events.host) with a cookie check. Unauthenticated visitors get a built-in login page; POST /api/auth/login with the correct password sets an HttpOnly cookie (30 days). Loopback hosts (127.0.0.1 / localhost / ::1) are exempt by default (config.loopbackExempt).
Read this before exposing the GUI beyond your own machine. dsh web is a remote-control surface: the harness can execute shell commands, read/write files, and manage credentials and settings, so successful (or bypassed) authentication is effectively remote code execution as your user.
config.password lives in ~/.dsh/profiles/web/cordis.patch.yml; the DSH_WEB_PASSWORD alternative is visible in the process environment. Anyone with local read access can recover it. Never commit a real password (the example patch uses a placeholder).loopbackExempt: true (the default), any local process that can reach 127.0.0.1:3080 — not just your browser — bypasses the password entirely, because it can send a loopback Host header and the DNS-rebinding fence does not constrain non-browser clients. Set loopbackExempt: false to enforce the password on loopback too.0.0.0.0 bind widens exposure. The example patch binds all interfaces, so the GUI is reachable on every network the machine is attached to (Wi-Fi, ZeroTier, TUN adapters, ...). On networks you do not fully trust, bind a specific interface instead (e.g. host: '192.168.1.13').crypto.randomUUID on non-secure contexts; no built-in auth). If a future dsh release fixes either, review whether this plugin is still needed before upgrading.Copy the package into your web profile's node_modules:
~/.dsh/profiles/web/node_modules/dsh-lan-web-auth/
(Or install it as a plugin: add "dsh-lan-web-auth": "file:<path>" to ~/.dsh/profiles/web/package.json dependencies and run dsh plugin --profile web install.)
Add the row to your user patch layer ~/.dsh/profiles/web/cordis.patch.yml — see patch.example.yml for the full LAN setup (bind 0.0.0.0, trusted hostname, plugin row). The patch layer is a user-owned extension point: it survives npm i -g @deepseek-ai/dsh upgrades.
Restart dsh --profile web (or let the user-patch watcher hot-apply it).
| Field | Meaning |
|---|---|
password |
Login password. Falls back to the DSH_WEB_PASSWORD environment variable. If neither is set, auth stays disabled (polyfill only) and a warning is logged. |
loopbackExempt |
When true (default), loopback origins skip the password. |
Changing config.password in the patch hot-applies via HMR; LAN clients must log in again.
0.0.0.0) so LAN/ZeroTier devices can reach the GUI; the connection row adds a hostname to the trust fence.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。