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:
1 parent
6f5138cd11
commit
5708e2d0e8
17 files changed
+1287
-58
No files matched your search
@@ -73,6 +73,16 @@ def generate_reflector_conf(name: str) -> str:
|
||||
f"SECRET={T.TEST_PEER_RX['secret']}",
|
||||
f"REMOTE_PREFIX={T.prefix_str(T.TEST_PEER_RX['prefix'])}",
|
||||
"",
|
||||
"[TRUNK_TEST_FILTER]",
|
||||
"HOST=192.0.2.1",
|
||||
"PORT=59304",
|
||||
f"SECRET={T.TEST_PEER_FILTER['secret']}",
|
||||
f"REMOTE_PREFIX={T.prefix_str(T.TEST_PEER_FILTER['prefix'])}",
|
||||
f"PEER_ID={T.TEST_PEER_FILTER['peer_id']}",
|
||||
f"BLACKLIST_TGS={T.TEST_PEER_FILTER['blacklist_tgs']}",
|
||||
f"ALLOW_TGS={T.TEST_PEER_FILTER['allow_tgs']}",
|
||||
f"TG_MAP={T.TEST_PEER_FILTER['tg_map']}",
|
||||
"",
|
||||
]
|
||||
|
||||
# Satellite server section (only on the primary reflector)
|
||||
@@ -94,8 +104,10 @@ def generate_reflector_conf(name: str) -> str:
|
||||
f"PASSWORD={T.MQTT['password']}",
|
||||
f"TOPIC_PREFIX=svxreflector/{name}",
|
||||
"STATUS_INTERVAL=1000",
|
||||
"",
|
||||
]
|
||||
if name in T.MQTT_NAMES:
|
||||
lines.append(f"MQTT_NAME={T.MQTT_NAMES[name]}")
|
||||
lines.append("")
|
||||
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
Reference in new issue
Block a user