RustMinerSystem

Documentation

Web Security, Firewall, and Log API

RustMinerSystem safe-route, web-port, HTTPS, certificate, IP/wallet firewall, and log-query endpoints.

Web Security, Firewall, and Log API

These operations can change the backend address, restart services, or block access. Confirm the new endpoint first and never blacklist the current management address.

Web access settings

Method Path Request/purpose
GET /api/route Read the backend safe route.
POST /api/route Save it with { "k": "new-route" }.
POST /api/web/port/restart Change the web port with { "port": 8080 }.
GET /api/web/tls Read backend HTTPS state.
POST /api/web/tls/{flag} Set HTTPS; flag is 0 or 1.

A safe-route, web-port, or HTTPS change can disconnect the request while the service restarts. Reconnect to the new address before declaring the operation failed.

Mining-port certificate

Method Path Purpose
GET /api/cert Read global mining-port certificate state.
POST /api/cert/upload Upload the PEM certificate and private key.
GET /api/cert/reset Restore the bundled certificate.
{
  "pem": "<URI-encode the certificate text, then Base64-encode it>",
  "key": "<URI-encode the private-key text, then Base64-encode it>"
}

Never log this body. The reset changes state even though the current frontend calls it with GET.

IP blacklist

Method Path Purpose
GET /api/ip/blacklist Read the IP blacklist.
POST /api/ip/blacklist/add Add one or more IPs.
POST /api/ip/blacklist/delete Remove one or more IPs.
GET /api/ip/coming Read IP access records from all ports.
GET /api/ipblacklist/all/log Read blocked-IP events.

Add/remove body:

{
  "ips": ["192.0.2.10"]
}

Wallet blocklist and allowlist

Method Path Purpose
GET /api/wallet/blacklist Read the wallet blocklist.
POST /api/wallet/blacklist/add Add a blocked wallet.
POST /api/wallet/blacklist/delete Remove a blocked wallet.
GET /api/wallet/whitelist Read the wallet allowlist.
POST /api/wallet/whitelist/add Add an allowed wallet.
POST /api/wallet/whitelist/delete Remove an allowed wallet.
GET /api/bwlist/log Read wallet firewall match logs.

The wallet APIs retain the historical ips field name:

{
  "ips": ["<wallet or subaccount>"]
}

Program and operation logs

Method Path Purpose
GET /api/request/log Read backend operation logs.
GET /api/running/log Read runtime logs.
GET /api/error/log Read program error logs.
GET /api/d/tl Read miner connection-trouble records.

Logs can contain wallets, IPs, pool endpoints, and internal errors. Redact them before external display and tightly restrict log API access.

Response reference

Web and certificates

  • GET /api/route returns the safe-route string directly.
  • GET /api/web/tls returns numeric state: 0 disabled, nonzero enabled.
  • GET /api/cert returns numeric certificate state; the frontend treats 0 as no custom certificate and nonzero as present.
  • Web-port, route, TLS, upload, and reset calls return a success scalar or HTTP 200. A connection can close after a change has already taken effect.

IP firewall

  • /api/ip/blacklist returns string[].
  • /api/ip/coming returns tuples, currently [ip, port, time]; older data may be [ip, time] or an object.
  • /api/ipblacklist/all/log returns { t, f, d }[]. t is a timestamp, f is pipe-delimited, and d is a status/direction value. The UI reads port and IP from the third and fourth f segments.
  • Add/delete calls return a success scalar or HTTP 200; refetch the list.

Wallet firewall

Blacklist and allowlist queries return string[]. /api/bwlist/log returns { t, f, d }[], where f is the wallet/subaccount and the current UI interprets d=0 as a blacklist hit. Mutations return a success scalar or HTTP 200.

Program logs

Endpoint Success response
/api/request/log string[], commonly [time] operation.
/api/running/log string[] or newline-delimited text.
/api/error/log string[] or newline-delimited text.
/api/d/tl { port, coin, wi, ct }[].

In a trouble-connection row, port is the listen port, coin is the currency, wi is a wallet/worker-related identifier, and ct is the count. The endpoint may be temporarily unavailable instead of returning an empty array.