Merge jayReflector additions: per-trunk filters, node-list, PTY mute

Ports DJ1JAY / FM-Funknetz' jayReflector features (https://github.com/dj1jay/jayReflector)
into GeuReflector while keeping the in-process MqttPublisher.

Per-trunk config (TrunkLink): BLACKLIST_TGS, ALLOW_TGS, TG_MAP (with
explicit-route bypass of the prefix routing check), PEER_ID. New helpers
TgFilter.h provide exact / "24*" / "10-20" syntax shared across keys.

Wire protocol (additive, backward compatible — older peers ignore unknown
types): MsgTrunkNodeList (type 121) carries callsign + current_tg + optional
lat/lon/QTH; MsgTrunkFilter (type 122) reserved for satellite TG filters.

Reflector emits debounced (500 ms) MsgTrunkNodeList to all trunk peers on
local client login/logout/TG change. Inbound lists are republished via MQTT
under nodes/<peer_id>; the local list under nodes/local. New MQTT_NAME global
key inserts a path component so several reflectors can share a TOPIC_PREFIX.

PTY commands (Reflector): TRUNK MUTE|UNMUTE <section> <callsign>,
TRUNK RELOAD [<section>] re-reads BLACKLIST_TGS/ALLOW_TGS/TG_MAP without
restart, TRUNK STATUS [<section>] dumps a one-line summary per link.
Mute is applied on the inbound audio path.

Tests: 8 new integration tests (19-27) plus a TEST_PEER_FILTER fixture in
topology.py. Tests cover PEER_ID hello, BLACKLIST/ALLOW/TG_MAP semantics,
PTY MUTE/RELOAD/STATUS via docker exec, MQTT_NAME topic namespacing, and
node-list emission. Total now 27 tests.

Docs: docs/JAY-additions.md credits DJ1JAY / FM-Funknetz and lists every
merged feature with file pointers and the filter-evaluation order.
README.md links it. svxreflector.conf.in documents every new key.

Bumps SVXREFLECTOR to 1.3.99.13+trunk.
This commit is contained in:
Audric committed 2026-04-14 23:48:03 +02:00
1 parent 6f5138cd11
commit 5708e2d0e8
17 files changed
+1287 -58

No files matched your search

@@ -104,6 +104,17 @@ CERT_CA_HOOK=@SVX_SHARE_INSTALL_DIR@/ca-hook.py
#PORT=5302
#SECRET=change_this_shared_secret
#REMOTE_PREFIX=2
# Optional PEER_ID — name advertised to the peer in the trunk hello
# (defaults to section name). The peer uses it as the MQTT topic
# component for this link, so set it to a stable, broker-friendly name.
#PEER_ID=reflector-a
# Optional per-trunk TG filters (syntax: exact "26200", prefix "24*",
# range "2427-2438", comma-separated):
#BLACKLIST_TGS=666,777* # never carried in either direction on this link
#ALLOW_TGS=24*,2624123 # if set, ONLY these TGs are exchanged
# Optional bidirectional TG remap (peer_tg:local_tg, comma-separated).
# Mapped TGs bypass the prefix routing check on this link.
#TG_MAP=1:2624123,2:2624124
# --- Satellite reflectors ---
# A satellite is a lightweight reflector that connects to a parent
@@ -136,6 +147,10 @@ CERT_CA_HOOK=@SVX_SHARE_INSTALL_DIR@/ca-hook.py
#USERNAME=reflector
#PASSWORD=secret
#TOPIC_PREFIX=svxreflector/myreflector
# Optional MQTT_NAME — appended as a path component, so topics become
# <TOPIC_PREFIX>/<MQTT_NAME>/... — useful when several reflectors share
# the same TOPIC_PREFIX. Leave unset to keep topics flat.
#MQTT_NAME=reflector-01
#STATUS_INTERVAL=1000
#TLS_ENABLED=0
#TLS_CA_CERT=/path/to/ca.crt