Port forward
forwardCreates persistent local TCP port mappings to peer-reachable host:port targets; omit the mapping to list active tunnels.
Instructions
Forward a local TCP port to a host:port reachable from the peer (like ssh -L), e.g. "15432:db.internal:5432" or "8080:80" (the peer itself). The forward keeps running in the rockd daemon until unforward. Without spec: list running forwards.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"peer": "<peer>"
},
"name": "forward"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| peer | Yes | The peer's 9-digit rockd ID (from `devices` / `status`), or IP:port to dial directly | |
| spec | No | <local port>:[<host>:]<port> |