feat: relay several servers, registered through the control API

This commit is contained in:
rmanach
2026-10-01 13:32:45 +02:00
parent af2dc3af53
commit 6b2b137c1d
18 changed files with 1496 additions and 376 deletions
+29
View File
@@ -0,0 +1,29 @@
@startuml
skinparam shadowing false
title Registering a server (pairing)
participant "Admin tool\n(etadm)" as admin
participant "ET server\n<et-server>:27960" as et
participant "etrelay control API\n<front-wg>:8090" as control
participant "Masters" as master
note over admin : picks a key once\n(kept on its side)
admin -> et : rcon: sets etrelay_proof <fingerprint of the key>
admin -> control : PUT /server {port: 27960, upstream_port: 27960, key}\nBearer: the relay's token
control -> control : port offered and free?\n(409: held by another server)
control -> et : getstatus
et --> control : statusResponse\n...\\etrelay_proof\\<fingerprint>...
control -> control : fingerprint == sha256(key)?\n(403: not shown)
control -> control : bind :27960, keep sha256(key)\nin servers.json
control --> admin : 200 {port, upstream, since, alive}
admin -> et : rcon: set etrelay_proof ""
control -> master : heartbeat EnemyTerritory-1\nfrom :27960
== Later ==
admin -> control : GET /sessions, /bans...\nBearer: the key (names the server)
control --> admin : this server's only
note over admin, control : 401 (the relay lost its state):\nthe admin tool registers again
admin -> control : DELETE /server
control -> master : heartbeat ETFlatline-1
note over control : port freed, bans dropped
@enduml