Proxy nodes
A proxy node runs with PIPING_RUN_MODE=proxy to reach SSH, RDP and VNC targets in another network segment. It exchanges WebSocket frames with the central backend. Targets reachable directly from the backend use its embedded proxy.
What runs on a proxy node
A proxy node is the same backend binary (and container image) in a different run mode. In proxy mode the process:
- connects to no database and no Redis — it keeps only live session state in memory;
- runs the protocol engines for SSH, RDP (through a local
guacd, the Apache Guacamole daemon), and VNC; - serves a minimal HTTP surface:
| Method | Path | Purpose |
|---|---|---|
GET | /health | Liveness probe, returns {"status":"ok"} |
POST | /proxy/v1/connections | Create a protocol connection (called by the backend) |
DELETE | /proxy/v1/connections/{id} | Terminate a connection (called by the backend) |
GET | /proxy/v1/connections/{id}/metrics | Connection metrics (called by the backend) |
GET | /proxy/v1/ws/{terminal|rdp|vnc}/{id} | Per-session WebSocket leg |
The browser never talks to a proxy node. Clients connect to the backend's /api/v1/ws/... endpoints (see Connections); the backend dials the node's WebSocket endpoint and relays frames in both directions. Only the backend needs to reach the node's base URL; the node needs to reach its targets.
Why deploy several
Each inventory target can be pinned to the proxy node that sits in its network segment:
- a remote data centre or branch office reachable only through one gateway;
- a DMZ or management VLAN the central backend has no route into;
- segments where protocol traffic should stay local, with a single HTTP(S)/WSS leg crossing the boundary.
Targets without an assignment are served by the embedded proxy runtime inside the backend — no extra configuration needed.
Running a node
The bundled Compose proxy service uses profile proxy. Register the node first and configure its bootstrap credentials before starting it alongside guacd:
docker compose --profile proxy up -d
To run a node on a separate host, start the same image with:
| Variable | Meaning |
|---|---|
PIPING_RUN_MODE=proxy | Switches the binary into proxy mode |
PIPING_SERVER__BIND | Listen address, e.g. 0.0.0.0:7100 |
PIPING_PROXY__NODE_ID | Registered node UUID; use the bootstrap value |
PIPING_PROXY__NODE_SECRET | This node’s bootstrap secret; do not reuse another node’s credential |
PIPING_PROXY__GUACD_HOST / PIPING_PROXY__GUACD_PORT | guacd address for RDP sessions (default 127.0.0.1:4822) |
Proxy mode refuses to start without a node ID and secret. For TLS, place the node behind a reverse proxy and register an https:// base URL; the backend upgrades http to ws and https to wss.
Registration
Add a node under Administration → Proxy Nodes or through the REST API. Creation returns a one-time bootstrap secret, environment values, and a Docker command. Save the credential securely and use it on that node. To replace a lost or compromised secret, call POST /api/v1/admin/proxy-nodes/{id}/rotate-secret and update the node’s environment with the new bootstrap values.
| Field | Rules |
|---|---|
| Name | Display name |
| Slug | Lowercase letters, digits, hyphens; auto-generated from the name |
| Base URL | http:// or https:// URL reachable from the backend |
| Enabled | Disabled nodes are refused at session launch |
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/admin/proxy-nodes | List (filters: search, enabled, limit, offset) |
POST | /api/v1/admin/proxy-nodes | Register a node |
GET | /api/v1/admin/proxy-nodes/{id} | Get a node |
PUT | /api/v1/admin/proxy-nodes/{id} | Update (full payload) |
DELETE | /api/v1/admin/proxy-nodes/{id} | Delete a node |
Node management requires the corresponding action on the proxy_node resource. Assignments use proxy_node_assignment; direct target assignments also check access to the target. See Access control.
Backend ↔ node authentication
Each registered node has its own credential. The node reads PIPING_PROXY__NODE_ID and PIPING_PROXY__NODE_SECRET; the backend stores the secret with consumer proxy_node:credential and field node_secret in the secret store. The embedded proxy uses a process-local credential, not a shared deployment secret.
- Control calls (
/proxy/v1/connections...) carryX-Piping-Proxy-Node-IdandX-Piping-Proxy-Secret. The node validates both. - Each WebSocket leg uses a short-lived token derived from that node’s secret, passed as the
tokenquery parameter. TTL:proxy.ws_token_ttl_seconds(default 120 s).
How sessions are routed
When a session is created (see Active sessions), the backend resolves the route in strict precedence order and records it on the session as routing_source:
| Priority | Source | routing_source |
|---|---|---|
| 1 | proxy_node_id passed in the session-create request | request_override |
| 2 | Winning scope assignment for the target | proxy_assignment |
| 3 | Embedded proxy runtime inside the backend | embedded_default |
Scope assignments are managed through /api/v1/admin/proxy-node-assignments. The most specific matching enabled assignment wins; weight breaks ties within a scope. For a direct per-target assignment:
GET /api/v1/inventory/targets/{id}/proxy-assignment
PUT /api/v1/inventory/targets/{id}/proxy-assignment {"proxy_node_id": "<uuid>"}
DELETE /api/v1/inventory/targets/{id}/proxy-assignment
PUT with {"proxy_node_id": null} also clears the assignment. A route to a disabled or deleted node fails with a validation error; re-enable the node or fix the assignment.
Tip: SSH sessions on a node survive a dropped browser connection for
proxy.ssh_detach_grace_seconds(default 60 s); reconnecting within the grace window re-attaches to the same terminal.
Health
A node answers GET /health with 200 {"status":"ok"} — wire it into your load balancer or orchestrator checks; the bundled Compose service already does. The backend does not poll node health: the Enabled flag is operator-controlled, and a node outage surfaces as a session-launch error, not as automatic failover. Proxy processes export the same telemetry as the backend — see Observability.