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

+19
View File
@@ -29,6 +29,25 @@ TEST_PEER_RX = {
"secret": "test_secret_rx",
}
# Third test peer used to exercise per-link BLACKLIST_TGS / ALLOW_TGS /
# TG_MAP / PEER_ID. Kept isolated from TEST_PEER so routing tests don't
# interact with filter tests.
TEST_PEER_FILTER = {
"prefix": ["7"],
"secret": "test_secret_filter",
"peer_id": "filter-peer",
"blacklist_tgs": "12345",
"allow_tgs": "7*,1220",
"tg_map": "7000:1220",
}
# Per-reflector MQTT_NAME overrides — when set, the reflector publishes
# under <TOPIC_PREFIX>/<MQTT_NAME>/... so tests can verify the new key
# without breaking the flat-topic MQTT test on reflector 'a'.
MQTT_NAMES = {
"c": "mqname-c",
}
# Cluster TGs — forwarded to all peers regardless of prefix ownership
# 8000: no prefix match (not owned by any reflector)
# 1201: starts with prefix "120" (overlaps with reflector-a's ownership)