AcidGr/dsh-web-lan-access ↗★ 31
dsh-web-lan-access
支持局域网及远程访问,自动放宽API信任域 适合需要远程或局域网访问Web UI的用户,免去手动修改源码和配置host参数的麻烦。
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:AcidGr/dsh-web-lan-access說明文件
閱讀完整 README ↗Usage
The plugin is self-contained: its bundle patch sets the webserver bind host to 0.0.0.0 directly (the CLI flag --host 0.0.0.0 is hard-rejected for safety on newer harness versions, but the webserver config still accepts it — so no source changes and no --host flag are needed; the CLI --port flag still works). It also widens the /api trust fence automatically.
-
Install the plugin, then start normally — without
--host:dsh --profile web --port 3080The bundle patch re-derives the
/apitrust fence from every non-internal IPv4 the host currently has — LAN (192.168.x), Tailscale (100.x), and VPN interfaces — and merges in whateverresolveLanTrustalready computed. So as long as the remote interface is up whendsh webstarts (Tailscale usually autostarts first), LAN and Tailscale IP access need zero extra config: openhttp://:3080orhttp://:3080and sessions/models load.If you prefer NOT to let the plugin take over the bind host (e.g. you want loopback + a port forward), keep the
webserverrow override out of your tree and instead forward a port (socat / rinetd / Tailscale serve) from127.0.0.1:3080, adding the forwarded address totrustedHostsmanually. -
MagicDNS hostnames (e.g.
xxx.tailXXXX.ts.net) — the fence can't discover hostnames, only IP literals, so add your own names if you want to browse by name instead of IP. Patch theweb-runtimerow, whosetrustedHostsfeed into the fence computation (resolveLanTrustmerges them), so your entries stack on top of the auto-discovered IPs:- id: web-runtime config: trustedHosts: - # e.g. myhost — MUST be listed separately! - .tailXXXX.ts.net # full domainOr skip file editing entirely with the repeatable CLI flag (same injection path):
dsh --profile web --trusted-host myhost --trusted-host myhost.tailXXXX.ts.net. Use one mechanism or the other — a static list replaces the row's default expression, so it will not merge with--trusted-host.⚠️ The fence compares the
Hostheader literally: a MagicDNS short name (http://myhost:3080) is not the full domain — list the short name on its own line, or every/apicall returns 403 (page shell loads, sessions/models absent). Tailscale / LAN IP literals need no entry here — they stay covered automatically.⚠️ Do not retarget this block at the
connectionrow: patch layers compose by whole-key replacement in application order (bundle layers first, then your profile'scordis.patch.yml), so a plain literal array onconnection.config.trustedHostswould silently replace the bundle's dynamic fence expression — names would work, but the auto-derived LAN/Tailscale IP trust would vanish. If you truly needconnection, copy the full concatenation expression from the plugin's bundle patch and append your literals; never write a plain list there.