Implement satellite reflectors

Satellite reflectors are lightweight relay instances that connect to a
parent reflector instead of joining the full trunk mesh. Clients connect
to the satellite normally; it relays all TGs bidirectionally to the
parent. The parent forwards satellite events to local clients, trunk
peers, and other satellites.

New classes:
- SatelliteLink: parent-side handler for each inbound satellite
  connection (HMAC auth, heartbeat, all-TG relay)
- SatelliteClient: satellite-side outbound connection to parent

Wire protocol: MsgTrunkHello gains m_role field (ROLE_PEER=0,
ROLE_SATELLITE=1) to distinguish satellite handshakes.

Config:
- Parent: [SATELLITE] section with LISTEN_PORT and SECRET
- Satellite: SATELLITE_OF, SATELLITE_PORT, SATELLITE_SECRET in [GLOBAL]

HTTP /config endpoint now shows mode (reflector/satellite),
satellite_server config on parents, and satellite connection info.

Docs updated: README, DEPLOYMENT_ITALY, Italian translation.
This commit is contained in:
Audric committed 2026-03-20 13:53:17 +01:00
1 parent 166e57f445
commit 551cfa70cd
13 files changed
+1159 -20

No files matched your search

+32 -1
View File
@@ -289,6 +289,36 @@ licensed operators active at any given time.
---
## Satellite reflectors (optional)
Larger regions may want to run additional reflector instances as satellites
(e.g. one per province) to distribute the client load without adding more trunk
mesh connections. A satellite connects to its regional reflector and relays all
traffic — remote reflectors see satellite clients as if they were connected
directly to the regional reflector.
**Regional reflector** (e.g. Lazio) — add a `[SATELLITE]` section:
```ini
[SATELLITE]
LISTEN_PORT=5303
SECRET=lazio_satellite_secret
```
**Satellite** (e.g. Roma province):
```ini
[GLOBAL]
SATELLITE_OF=svxref-lazio.example.it
SATELLITE_PORT=5303
SATELLITE_SECRET=lazio_satellite_secret
SATELLITE_ID=sat-roma
```
The satellite does not set `LOCAL_PREFIX`, `REMOTE_PREFIX`, or any `[TRUNK_xx]`
sections. It only needs `LISTEN_PORT=5300` for its local SvxLink clients. Also
open port `5303` inbound on the regional reflector firewall.
---
## Per-region config checklist
1. Set `LOCAL_PREFIX` to the 2-digit code from the table above.
@@ -296,4 +326,5 @@ licensed operators active at any given time.
3. Use the same `SECRET` value as the matching section on the peer — mismatched
secrets will prevent the trunk from connecting.
4. Open TCP port `5302` inbound in the firewall (trunk) and `5300` inbound (clients).
5. Ensure `HOST` resolves to the peer's public IP from the server's network.
5. If accepting satellites, also open TCP port `5303` inbound.
6. Ensure `HOST` resolves to the peer's public IP from the server's network.
+33 -1
View File
@@ -296,6 +296,37 @@ il vero limite pratico è il numero di operatori patentati attivi in un dato mom
---
## Reflector satellite (opzionale)
Le regioni più grandi possono eseguire istanze aggiuntive come satellite
(ad esempio una per provincia) per distribuire il carico client senza aggiungere
ulteriori connessioni trunk. Un satellite si collega al proprio reflector
regionale e inoltra tutto il traffico — i reflector remoti vedono i client
satellite come se fossero connessi direttamente al reflector regionale.
**Reflector regionale** (es. Lazio) — aggiungere una sezione `[SATELLITE]`:
```ini
[SATELLITE]
LISTEN_PORT=5303
SECRET=lazio_satellite_secret
```
**Satellite** (es. provincia di Roma):
```ini
[GLOBAL]
SATELLITE_OF=svxref-lazio.example.it
SATELLITE_PORT=5303
SATELLITE_SECRET=lazio_satellite_secret
SATELLITE_ID=sat-roma
```
Il satellite non imposta `LOCAL_PREFIX`, `REMOTE_PREFIX` o alcuna sezione
`[TRUNK_xx]`. Necessita solo di `LISTEN_PORT=5300` per i propri client SvxLink
locali. Aprire anche la porta `5303` in ingresso sul firewall del reflector
regionale.
---
## Lista di controllo per ogni regione
1. Impostare `LOCAL_PREFIX` al codice a 2 cifre dalla tabella sopra.
@@ -303,4 +334,5 @@ il vero limite pratico è il numero di operatori patentati attivi in un dato mom
3. Usare lo stesso valore di `SECRET` della sezione corrispondente sul peer — secret
non corrispondenti impediranno la connessione del trunk.
4. Aprire la porta TCP `5302` in ingresso nel firewall (trunk) e la porta `5300` (client).
5. Verificare che `HOST` risolva all'IP pubblico del peer dalla rete del server.
5. Se si accettano satellite, aprire anche la porta TCP `5303` in ingresso.
6. Verificare che `HOST` risolva all'IP pubblico del peer dalla rete del server.