Port Proxy
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.
TCP Proxy
/v1/sprites/{name}/proxy
Establish a WebSocket tunnel to a port inside the sprite environment.
JSON Messages
After connecting, send a JSON init message to specify the target host and port.
ProxyInitMessage
Client → Server
host*
String
Target hostname (typically “localhost”)
port*
integer
Target port (1-65535)
Binary Protocol
After the JSON handshake completes, the connection becomes a raw TCP relay. Binary data is forwarded directly without any framing or prefixes.
| Name | Direction | Description |
|---|---|---|
| data | client → server | Raw bytes sent to the target TCP port |
| data | server → client | Raw bytes received from the target TCP port |
Response Codes
Switching Protocols - WebSocket connection established
Bad Request - Invalid WebSocket upgrade or missing parameters
Not Found - Resource not found