mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-06-02 06:23:37 +02:00
4639e0b3b782450e6bc210ecc4bdefc725d29223
videochannel, seichannel and vp8channel each carried independent copies of randomID(), fragmentPayload(), inboundMessage + upsertInbound + assembleMessage + ackWaiters/ackMu. The reassembly logic was almost byte-identical across videochannel and seichannel; vp8channel only needed randomID. Three copies of the same idea. Add internal/transport/common with: - RandomID(): 8-char hex per-peer ID (Jitsi msid uniqueness requirement). - FragmentPayload(): split bytes into max-size chunks. - Reassembler: stores in-flight messages keyed by Seq, validates CRC, and reports Partial / Delivered / Duplicate / Ignore via a Result enum. - AckRegistry: Register/Unregister/Resolve for ack waiters. videochannel and seichannel now hold *common.AckRegistry and *common.Reassembler instead of raw maps + mutexes. Their Send paths route through acks.Register/Unregister; their handleInboundFrame is a 20-line switch over reassembler.Push. vp8channel keeps its KCP framing but reuses common.RandomID. Tests that constructed raw streamTransport with inbound/delivered/ackWaiters maps are updated to instantiate the new common types instead. Two now- redundant low-level tests (upsertInbound out-of-range, assembleMessage) collapse into the new TestInboundRejectsBadCRC. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
About
olcRTC - across the sea
Project that allows users to bypass blocking by parasitizing and tunneling on unblocked and whitelisted services in Russia, use legal webRTC services
Status
Beta
See all info in issues
Issues? contact us at @openlibrecommunity
Or wait for the release or at least a release
Community ui client: alananisimov/olcbox
Read docs for start
Build
# install mage first
go install github.com/magefile/mage@latest
# build cli + ui
mage build
# build cli only
mage buildCLI
# build cli with b codec, clones b repo, builds libb.so, compiles with -tags b
mage buildCLIB
# cross-compile for linux / windows / darwin
mage cross
# android aar via gomobile
mage mobile
# container image
mage podman
mage docker
# lint / test / clean
mage lint
mage test
mage clean
Telegram: zarazaex
Email: zarazaex@tuta.io
Site: zarazaex.xyz
Made for: olcNG
Languages
Go
90.3%
Python
6.1%
Shell
3.4%
Dockerfile
0.2%
