Proxy API
Tunnel TCP connections directly to services running inside your Sprite. After a brief WebSocket handshake, the connection becomes a transparent relay to any port.
Use this to access dev servers, databases, or any TCP service as if it were running locally. The proxy handles connection setup; your client speaks directly to the target service.
WebSocket Endpoints — Some endpoints in this section use WebSocket for bidirectional communication. The SDK handles the connection protocol automatically.
TCP Proxy
Section titled "TCP Proxy"WSS
/v1/sprites/{name}/proxyEstablish a WebSocket tunnel to a port inside the sprite environment.
Responses
Section titled “Responses”| Status | Description |
|---|---|
101 | Switching Protocols - WebSocket connection established |
400 | Bad Request - Invalid WebSocket upgrade or missing parameters |
404 | Not Found - Resource not found |
Client → Server Messages
Section titled “Client → Server Messages”ProxyInitMessage
Section titled “ProxyInitMessage”| Field | Type | Description |
|---|---|---|
host | string | Target hostname (typically “localhost”) |
port | number | Target port (1-65535) |
{ "host": "localhost", "port": 5432} Request