Authenticate T5 and T6 telemetry over HTTPS
This commit is contained in:
+9
-4
@@ -354,7 +354,7 @@ and [spawn entry point](https://github.com/plutoniummod/t5-scripts/blob/main/ZM/
|
||||
| `tws_lock_round` | `tws_lock` | `20` | Round at which the lobby locks |
|
||||
| `tws_server_id` | `tws_bank`, `tws_telemetry` | Required for telemetry | Exact registered Electric Cherry server name; also used as the bank label |
|
||||
| `tws_telemetry_enabled` | `tws_telemetry` | `1` | Set to `0` to disable telemetry at init |
|
||||
| `tws_telemetry_url` | `tws_telemetry` | `http://192.168.1.199:3000/api/telemetry` | Electric Cherry telemetry endpoint for JSON POSTs |
|
||||
| `tws_telemetry_url` | `tws_telemetry` | `https://ec.thewrightserver.net/api/telemetry` | Electric Cherry telemetry endpoint for JSON POSTs |
|
||||
| `tws_telemetry_log_level` | `tws_telemetry` | `1` | Read live: `0` warnings/errors/recovery only, `1` lifecycle/request/health logs, `2` also capture/queue logs and response previews |
|
||||
|
||||
## tws_telemetry.gsc
|
||||
@@ -362,13 +362,17 @@ and [spawn entry point](https://github.com/plutoniummod/t5-scripts/blob/main/ZM/
|
||||
Uses `t5-gsc-utils` HTTP/JSON components to POST directly to Electric Cherry's
|
||||
`/api/telemetry`. Install alongside `tws_common.gsc` in `storage/t5/scripts/sp/`.
|
||||
No HUD or database dependency. Reports run whether or not a beta is active.
|
||||
Follow the shared [authentication setup](../README.md#telemetry-authentication-t5-and-t6)
|
||||
to configure the service before upgrading. The reporter token is embedded in
|
||||
`level.telemetry_token`; it must match the service's `EC_TELEMETRY_TOKEN`. Short
|
||||
embedded tokens and non-HTTPS URLs disable reporting at init.
|
||||
|
||||
Example server config (except log level, read at script init; restart the map after changes):
|
||||
|
||||
```cfg
|
||||
set tws_server_id "t5_zombie_prototype_1"
|
||||
set tws_telemetry_enabled "1"
|
||||
set tws_telemetry_url "http://192.168.1.199:3000/api/telemetry"
|
||||
set tws_telemetry_url "https://ec.thewrightserver.net/api/telemetry"
|
||||
set tws_telemetry_log_level "1"
|
||||
```
|
||||
|
||||
@@ -410,8 +414,9 @@ use `jsonSerialize` for escaping.
|
||||
|
||||
Events are captured immediately into an in-memory queue. One HTTP worker
|
||||
POSTs each snapshot once, in gameplay order, with `Content-Type:
|
||||
application/json`, waiting for completion before sending the next. Gameplay
|
||||
and round detection continue while requests are pending. Repeated joins or
|
||||
application/json` and `Authorization: Bearer <token>`, waiting for completion
|
||||
before sending the next. Gameplay and round detection continue while requests
|
||||
are pending. Repeated joins or
|
||||
end notifications do not duplicate start/end reports. At game over, the
|
||||
reporter captures any round change since the last poll, stops detection,
|
||||
and lets the sender drain through `game_end`.
|
||||
|
||||
Reference in New Issue
Block a user