Replies: 4 comments
|
遇到了同样问题,想把这个部署到公网环境下使用,外层已经有安全身份处理的情况下,内部这一堆写死的东西没法处理很难受。 |
|
Same pain here on a LAN deployment (dsh behind nginx with HTTPS, Current workaround: manage configuration from the host itself via What would help most:
Thanks for looking into this! |
|
我做了个远程控制的方案https://github.com/JUANWANG-BUAA/dsh-full-remote ,实测是可以解决局域网与内网穿透的控制问题,并且目前没发现大的问题 |
|
@nevergow @roojay — I hit the exact same wall (LAN deployment, privileged methods 403 from any non-loopback client) and ended up building a generic solution that does not touch dsh source at all. Approach: an mTLS gateway instead of an allow-flag Instead of asking for --allow-remote-settings (which would weaken the loopback pin), I put a small standalone gateway in front of dsh that provides the real authentication layer the code comment asks for:
Default stays safe: no registered cert = no access. The auth layer is stronger than a token — private key, per-device revocation, expiry built into the cert. Repo: https://github.com/0gl20shk0sbt36/mtls-gateway It is generic: fronts dsh today, any other self-hosted app tomorrow (vaultwarden, etc.). Works for LAN and for public deployments behind a tunnel, since the outer security is the cert itself. |
Uh oh!
There was an error while loading. Please reload this page.
Problem
settings.describe/settings.update/credentials.*/agentPreset.*/llm.discoverModelsare pinned to loopback-only via PRIVILEGED_METHODS (checked with an empty trust list), even when--trusted-hostis configured. On a LAN deployment (dsh bound to 127.0.0.1 behind a reverse proxy with HTTPS), the Settings / Models / Credentials / Agent-preset / Plugin pages all fail withtransport failure for /api/settings.describe: HTTP 403from any non-loopback client.Verified in source:
packages/client/connection/src/index.tsPRIVILEGED_METHODS + createSharedFetchHandler/register useisTrustedApiRequest(request, [])for these methods, so--trusted-hostnever applies to them. The comment says the configuration plane stays loopback-same-origin until a real authentication layer.Ask
Would be great to have an explicit opt-in (env/config flag) that lets a trusted-host deployment also allow these privileged methods, e.g.
--allow-remote-settingsor a config key, so LAN users can manage settings without SSH-ing into the host. An explicit opt-in keeps the default safe.All reactions