Repository navigation
Optional LAN access
The panel can now be reached from another device on a private network through an HTTPS reverse proxy. Localhost-only stays the default — nothing changes unless you opt in.
Set APP_ACCESS_MODE=proxy and an exact list of HTTPS origins in APP_TRUSTED_ORIGINS (for example https://commander.home.arpa). The same allowlist gates the REST API and both WebSocket endpoints — the terminal and the agent. A foreign or null Origin is refused, and for GET/HEAD without an Origin the browser Referer is checked against the same list. The session cookie gains Secure, and Forwarded / X-Forwarded-* are never trusted, so a spoofed header cannot grant access or change the decision.
The mode refuses to start without an already configured password: there is no network onboarding. Client IP/CIDR limits stay at the proxy or firewall, and the backend and SSH tunnel ports stay on loopback. An unknown APP_ACCESS_MODE, or a non-empty APP_TRUSTED_ORIGINS while in local, stops startup instead of guessing.
Origin is a CSRF boundary, not authentication — a non-browser client can forge it, so one allowlist does not replace an IP filter. Keep the panel off the internet. See the setup guide and the annotated nginx example.
Other changes
- Automatic recovery after empty AI API responses in chat and planning: up to two retries, cancelled by Stop, with separate errors for content filtering and response limits. Every completed paid attempt is counted in costs, and tools and messages are not duplicated.
- Protection of AI dialogues against context overflow: old tool output is shortened and early turns are dropped from the API request only — the full history is preserved. The budget is set by
AI_CONTEXT_LIMIT; after an HTTP 400 overflow the agent retries once with a smaller context. Works in chat and planning, with Chat Completions and Responses. - Mermaid diagrams in agent answers:
```mermaidblocks render to SVG in the chat (the diagram theme follows the interface, the library loads lazily, labels are sanitized). A malformed diagram shows a note and the source block.
Upgrade: stop the previous instance and back up both data/ and keys/ first; two instances must not write to the same directory. Application data formats are unchanged, and the default access mode is unchanged, so an existing installation behaves exactly as before until you enable the proxy mode.
docker compose -f docker-compose.release.yml pull
docker compose -f docker-compose.release.yml up -dImage: ghcr.io/lexuss1979/ssh-commander:0.2.0 (linux/amd64, linux/arm64)
Multi-platform digest:
ghcr.io/lexuss1979/ssh-commander@sha256:92d1d9f8228b2098398acce60327cb0c5aab95270e8cf753d3b1c21bc38f128c
latest points to the same digest.
Verification
Successful release workflow: 1202 tests in 73 files, both builds, web lint (five pre-existing warnings), both dependency audits, and image smoke checks on amd64 and emulated arm64. Anonymous pulls of both platforms and a smoke run of the published digest were additionally verified.
The network boundary the new mode depends on was checked locally with server/test/lan-proxy.manual.mjs — a real nginx with real TLS in front of the built image, clients on a network with no route to the backend, and no host port published. It covers allow/deny by TCP peer, spoofed Forwarded/X-Forwarded-*, WSS on both endpoints, and two controls proving the refusals come from the gates. Not covered: a real browser on another device (including certificate trust), host firewall rules on the target machine, and IPv6 routing.
Source commit: ce50a71429c5149cff9e6e6456473dd4b6d915bd (v0.2.0).
The app password, SSH and database passwords and the AI API key are stored in plaintext in the local data/ directory; restrict file permissions and never publish that volume.