aashizpoudel/dsh-remote-trust
aashizpoudel★ 0JavaScript最后同步: 2026-08-16
DSH plugin: open privileged /api methods (settings, credentials, model discovery) to remote trusted hosts
README 摘要
@crckss/dsh-remote-trust Open DSH's privileged /api methods to remote trusted hosts, so a browser visiting the Web UI through a reverse proxy (or from another machine on your network) can configure the harness — Settings → Models , provider and credential management — instead of getting 403 forbidden . Why this exists DeepSeek Harness binds its Web server to loopback for safety ( --host 0.0.0.0 is refused outright) and its /api browser-trust fence has two layers: 1. A general fence — the request's Host must be loopback or a --trusted-host authority, with Origin and sec-fetch-site checks. 2. A privileged-method pin — settings. , credentials. , agentPreset. , and llm.discoverModels are additionally FORCED to loopback with an empty trust list, even when --trusted-host names your domain. That pin is hardcoded in @deepseek-ai/dsh-client-connection , so a deployment behind Traefik/Caddy/nginx can browse sessions but can never open the settings plane. This plugin removes the pin for endpoints you declare , without touching node modules. How it works The webserver's route table is checked exact-first, then longest-prefix . The built-in /api route is a prefix route, so this plugin registers…
在 GitHub 查看完整 README →