feat: SRTLA support#5811
Open
thejoeejoee wants to merge 13 commits into
Open
Conversation
Implements SRTLA (SRT Link Aggregation) protocol receiver as a UDP proxy server that aggregates multiple sender connections into a single SRT stream, enabling mobile IRL streaming over bonded network links (BELABOX, IRL Pro, Moblin). Resolves bluenviron#3029
Match BELABOX receiver behavior: broadcast SRT ACKs to all connections, send other packets only to the most recently active SRTLA address. Also adds config validation and matches upstream maxConnsPerGroup=8.
Wire SRTLA groups to their corresponding SRT connections for: - Per-path metrics (bytes_received, bytes_forwarded, conns_active) - Enriched logging with stream path context - Lifecycle coupling (SRT close triggers SRTLA group teardown) Use interfaceIsEmpty() for nil-safe metrics check matching SRT pattern.
Address review findings: - Lazy srtConn creation on first data packet (not during REG1) - sendReg2/sendReg3 return errors with state rollback on failure - IPv6 loopback resolution for dual-stack/IPv6-only setups - Close() atomically clears maps, preventing post-close state leaks - All network I/O moved outside mutex - cleanup() repairs lastAddr when timed-out conn was current target - All send errors logged with context - Shutdown race fix: closed check + wg.Add inside mutex - 13 regression tests (including IPv6 loopback resolution)
Author
|
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an SRTLA (SRT Link Aggregation) receiver server that accepts bonded connections from BELABOX-compatible encoders and proxies aggregated traffic to the local SRT server.
What
srtla_groups,srtla_groups_conns_active,srtla_groups_bytes_received,srtla_groups_bytes_forwardedsrtla/srtlaAddressinmediamtx.ymlConfig
Closes #3029