[Feature]: Explore single-port UDP multiplexing for multi-client WebRTC
Maintainers usually reply within 2 days
@PinJinx is already working on this.
Since Sep 17, 2026.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- networking
Research direction
Start by mapping the current werift ICE socket allocation and the HTTP/WebSocket signaling path. Investigate shared UDP demultiplexing, TCP 3000 and UDP 3000 coexistence, and routing for concurrent viewers and reconnects. Done means a documented recommendation and, if viable, a prototype demonstrating two clients, reconnects, video, and both DataChannel modes while keeping GStreamer at 127.0.0.1:5004.
Written by the indexing model from the issue text.
Description
Problem Statement
We shoudl rely on https://github.com/shinyoshiaki/werift-webrtc/issues/650
Rein currently serves its UI and WebSocket signaling on TCP port 3000 while werift allocates a separate UDP ICE socket per peer connection from a configured range. LAN hosts therefore need both TCP 3000 and a UDP range in their firewall configuration.
Explore whether all WebRTC clients can share one UDP port while HTTP and WebSocket signaling continue on TCP using the same numeric port, without relying on a cloud service or external TURN server.
Proposed Solution
Run a focused research spike and prototype for multi-client ICE UDP multiplexing.
The investigation should cover:
- How STUN username fragments, remote address tuples, DTLS, SRTP, and SCTP packets can be demultiplexed on a shared UDP socket.
- Whether the current
weriftstack can be extended cleanly or whether upstream support is feasible. - Whether TCP 3000 and UDP 3000 can be used concurrently as separate protocol sockets.
- Correct routing for multiple simultaneous viewers and reconnect overlap.
- Preservation of Rein's single
RTCPeerConnectionper viewer and ordered/unordered DataChannel behavior. - Security, authentication, denial-of-service, cleanup, and observability implications.
The deliverable should be a documented recommendation plus a minimal prototype if the approach is viable.
Alternatives Considered (Optional)
- Keep the existing bounded ICE UDP range.
- Embed a local TURN relay.
- Move media to WebTransport or WebSocket-based transport.
- Adopt a WebRTC stack with native ICE UDP-mux support.
Alternatives should be compared for latency, portability, maintenance cost, and LAN-only operation.
Additional Context (Optional)
Suggested acceptance criteria:
- Document the limitations of the installed
weriftversion and candidate implementation paths. - Demonstrate two concurrent clients and reconnects through one shared UDP listener, or clearly document why this is not viable.
- Verify video,
input-unordered, andinput-orderedtraffic remain functional. - Require no external server or cloud dependency.
- Keep the GStreamer RTP relay on
127.0.0.1:5004; it must not become externally accessible. - Update firewall and architecture documentation if a solution is adopted.
Checklist
- I have searched for existing feature requests to avoid duplicates
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 120
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 24
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AOSSIE-Org/Rein
-
[Bug]: JSON body null returns 500 on /api/clipboard/copy and /api/clipboard/pastePossibly taken A pull request linked to this issue is open or already merged. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AOSSIE-Org/Rein#522 · 1 comment ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AOSSIE-Org/Rein#509 · 3 comments ·
Maintainers usually reply within 2 days
-
[Bug]: Session tokens expire 10 days after creation regardless of use (touchToken is never called)Possibly taken @Ankitavasudev claimed this 12 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
AOSSIE-Org/Rein#466 · 6 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Bug]: Uploaded files are saved with garbled non-ASCII names and overwrite existing files with the same namePossibly taken @Aryan-en claimed this 23 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
AOSSIE-Org/Rein#458 · 5 comments ·
Maintainers usually reply within 2 days
-
[Bug]: Missing WebRTC playoutDelayHint introduces 50-100ms artificial latency and redundant MediaStream recreation triggers video pipeline reloadPossibly taken @MPoojaSiyag claimed this 1 day ago. Openbug enhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
AOSSIE-Org/Rein#523 · 1 comment ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
review-followup
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
griffinwork40/agent-afk#5387 ·
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
CodeManufactoryLLC/Code60#358 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
android:plan ios:plan main:plan packages:learn
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day