Skip to content

Uplink: what is sent to the Bastrel API

When your server has a valid licence and an active subscription, Bastrel sends its detections, bans and (Pro plan and above) economy lines to the Bastrel API, so that the panel can show them. It also reads the bans lifted in the panel and lifts them on your server.

Status: The licence is inactive in every source and development build (see licensing): until the release package, nothing is stored or sent. Detection, sanctions and bans never depend on the uplink.

Everything is turned into references before it is stored for sending. A reference is an HMAC-SHA256 (64 hexadecimal characters) of the identifier, with a key that belongs to your account.

Item What leaves the server
Detection code, module, severity, score, count, actions, the evidence (cleaned), license_ref and token_refs of the player
Ban id, code, reason, dates, license_ref / token_ref, the ids of the detections that justify it
Who banned console, system or staff:<reference>: the staff member is a reference, never a licence
Economy line license_ref, signed change, account (lower case), reason

Never sent: a licence, Discord, Steam or FiveM identifier, a hardware token, an IP address, a player name. In the evidence, an identifier becomes its reference, an IP address becomes [ip], and keys such as ip or token are removed. Identifiers other than the Rockstar licence and the hardware tokens have no reference format and are not sent: a ban that only holds such identifiers stays local and is counted.

Licence state Stored for sending Sent
active, grace_offline yes yes
local (token expired or missing) yes, if a key is known no, until a valid token
cloud_off (no subscription) bans and liftings only, if a key is known no, until the right comes back
disabled build no no (nothing runs, no query)

The bans lifted in the panel are read in every state but a disabled build, as soon as a key is known.

Items wait in the table bastrel_outbox (see install-sql). Every 10 seconds one batch of up to 500 detections goes out, then economy lines, then bans and lifted bans one by one. If the API is down Bastrel waits longer and longer (30 s, doubled up to one hour) and keeps everything; only age (90 days) and size (50 000 items) limit the queue, and every loss is counted and written in the console.

An item the API refuses one by one (rejected, with its reason, written in the console) is never sent again, and counted as abandoned. A batch the API refuses as a whole (error 422) is kept and tried again later, with a growing pause. A ban whose detections the API does not hold yet is tried again a few times. A ban the API already holds under the same id is not counted as sent; the local ban stays as it is, the console names the ban (uplink.ban_conflict), and its lifting is never sent. When the queue is too large, detections are deleted first, bans and liftings last. A ban that ends after the year 2200 is sent ending on 2200-12-31T23:59:59Z (the last date the API takes), so it stays a temporary ban in the panel. An address or a hardware token in a reason is masked wherever it stands in the text.

The text of a reason is cleaned like the evidence: an identifier anywhere in it becomes its reference, an IP address becomes [ip].

Every minute Bastrel asks the API what changed. A ban lifted in the panel is lifted on your server like a local lifting: its status becomes revoked with who, when and why. Nothing is deleted. A ban id is not a proof of anything, so a lifting applies only if it carries a reference of the same player (licence or hardware token) as the ban on your server; otherwise it is ignored and written in the console. Bans created by another server of your account are not created here.

In config/modules.lua, block uplink (integers; a wrong value costs only itself):

Option Default Meaning
enabled true false: nothing is stored or sent
batchS 10 seconds between two send cycles (5 to 3600)
bansPollS 60 seconds between two reads of the lifted bans (10 to 3600)
retryS / retryMaxS 30 / 3600 first pause after a failure, and its ceiling
maxAgeDays 90 older items are deleted and counted
maxRows 50000 beyond this the oldest items are deleted and counted
waitAttempts 12 tries for a ban the API does not know yet
memoryMax 1000 items kept in memory while the database does not answer (when full, detections are thrown away first)

/bas license shows the state of the uplink: items waiting, sent, not queued, abandoned and bans lifted from the panel.