RustMinerSystem

Documentation

Fleet Control and Remote Forwarding API

RustMinerSystem fleet tokens, client records, remote-client maintenance, and Base64 path-forwarding endpoints.

Fleet Control and Remote Forwarding API

Fleet control lets one RustMinerSystem instance read the status of other instances. The fleet API is a high-privilege credential and should be shared only between trusted systems.

Fleet credential and clients

Method Path Purpose
GET /api/remote/token Read the local fleet API.
GET /api/remote/refresh/token Rotate it; the old value stops working.
GET /api/remote/list Read configured remote clients.
POST /api/remote/new Add a remote client.
POST /api/remote/{id} Update a remote client.
DELETE /api/remote/{id} Delete a remote client.

Create/update body:

{
  "name": "Hong Kong Proxy 01",
  "endpoint": "https://proxy.example.com/safe-route",
  "token": "<remote instance fleet API>"
}

endpoint must include protocol, port, and safe route. A trailing slash is not required.

/api/remote/token and /api/remote/refresh/token return the fleet token as a direct string; refresh changes the credential. /api/remote/list returns RemoteClient[], and create/update/delete return Ok.

RemoteClient field Type Meaning
id string Local record ID used in path parameters.
name string Display name.
endpoint string Remote base URL including its safe route.
token string Remote fleet token; redact it.
time string Creation or update time.

Forward a remote request

POST /api/remote/q/{id}/{m}/{p}
X-ACCESS-TOKEN: <Access Token>
Content-Type: application/json
Path value Meaning
id Remote-client record ID.
m Request mode; the current frontend always uses 0.
p API path without /api/, encoded with Base64.

For /api/ports, encode ports and place the result in {p}.

The current fleet page reads these remote paths:

/api/ports
/api/stat/currency/{currency}
/api/device/stats
/api/currency/online/stat/{coin}
/api/sys/stat
/api/sys/base/info
/api/local/version
/api/sys/starttime

The outer request is always POST; read calls normally send an empty JSON object. Failed remote calls produce partial or offline client status.

HTTP 200 returns the remote endpoint’s raw data without a new envelope:

Remote path Response model
/api/ports PortRecord[].
/api/stat/currency/{currency} ChartPoint[].
/api/device/stats DevicePoint[].
/api/currency/online/stat/{coin} CoinDevicePoint[].
/api/sys/stat SystemPoint[].
/api/sys/base/info System-information object.
/api/local/version { version: string }.
/api/sys/starttime Numeric timestamp.

Generate {p} only from a fixed allowlist. Base64 is path encoding, not access control.

Security guidance

  • Store and rotate the fleet API separately from the general X-ACCESS-TOKEN.
  • After rotation, update every upstream manager immediately.
  • Use HTTPS endpoints and source-IP restrictions.
  • Do not let untrusted callers control {p}; that can expand which remote APIs are reachable.
  • Redact client token and complete forwarding parameters from logs.