Files
GeuReflector/Dockerfile
T
Audric 685d7253ff Fix trunk receive-side TG filtering and add integration test suite
The receive-side handlers (handleMsgTrunkTalkerStart, handleMsgTrunkAudio,
etc.) used isSharedTG() which only checks the remote peer's prefix. This
caused non-cluster TGs to be silently dropped on the receiving reflector —
e.g. a client on reflector-a talking on TG 40001 (owned by reflector-b)
would never reach reflector-b because reflector-b checked the TG against
reflector-a's prefix instead of its own.

Add isOwnedTG() that accepts TGs matching either the local or remote
prefix, and use it in all four receive handlers. The send-side still uses
isSharedTG() (remote prefix only) which is correct.

Also add a Docker-based integration test suite (tests/) with 11 automated
tests covering handshake, routing, cross-reflector audio delivery, cluster
TGs, heartbeat, disconnect cleanup, and trunk-to-trunk isolation. An
interactive mode lets users test arbitrary TG numbers with routing verified
via reflector logs. Topology is defined once in tests/topology.py.

Fix Dockerfile to copy built shared libraries to the runtime image.
2026-03-27 14:43:57 +01:00

43 lines
1.1 KiB
Docker

# Stage 1: Build
FROM debian:bookworm AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
libsigc++-2.0-dev \
libssl-dev \
libjsoncpp-dev \
libpopt-dev \
libopus-dev \
libgsm1-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY src/ src/
RUN cmake -S src -B build -DLOCAL_STATE_DIR=/var -DUSE_ALSA=OFF \
&& cmake --build build
# Stage 2: Runtime
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
libsigc++-2.0-0v5 \
libssl3 \
libjsoncpp25 \
libpopt0 \
libopus0 \
libgsm1 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /src/build/bin/svxreflector /usr/bin/svxreflector
COPY --from=builder /src/build/lib/lib*.so* /usr/lib/
# 5300 tcp+udp: SvxLink client connections and audio
# 5302 tcp: server-to-server trunk links
# 8080 tcp: HTTP status endpoint (optional, enable via HTTP_SRV_PORT)
EXPOSE 5300/tcp 5300/udp 5302/tcp 8080/tcp
ENTRYPOINT ["svxreflector"]
CMD ["--config", "/etc/svxlink/svxreflector.conf"]