mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-05-26 07:08:11 +00:00
35c05b654a9d1edf418f5a2d23f4a9cf9be734c9
Plug a KCP session in front of the VP8 wire so the upper layer (mux/curl tunnels) gets reliable, ordered, message-oriented delivery on top of an otherwise unreliable carrier. Why this fixes the random 0 B/s stalls -------------------------------------- The previous design had no retransmits and no ACKs. A single dropped VP8 frame (from drainOutbound on micro-reconnect, the inbound 'default:' overflow drop, or RTP loss invalidating a partial assembly) created a hole in mux.Stream.nextSeq that would never be filled: the receiver parked all subsequent frames in outOfOrder forever and curl read 0 B/s until a brand new mux stream id was opened. KCP layer details ----------------- * Stream mode + 4-byte big-endian length prefix. Message mode would be ideal but UDPSession.Write fragments anything > MSS *outside* of kcp.Send, leaving every fragment with frg=0 and breaking PeekSize-based reassembly. Length-prefix framing under stream mode is the canonical workaround. * nodelay(1, 10ms, fast-resend=2, no congestion control) — KCP turbo preset, identical to kcptun/shadowsocks tuning. Recovers from burst losses in tens of ms instead of seconds. * SndWnd/RcvWnd 4096 segments to absorb the multi-segment burst that a single VP8 sample can carry. * MTU 1400 (kcp-go hardcodes mtuLimit=1500). Wire compatibility with VP8 keepalives -------------------------------------- KCP packets always start with the LE conv id (0x01 0xEE 0xFF 0xC0). VP8 keepalive frames start with 0x30. The receive path filters by the magic byte before handing the buffer to KCP, so keepalives never poison the KCP state machine. Features() now advertises Reliable+Ordered. Drop-on-overflow paths in the carrier are kept — KCP detects the loss via SACK and retransmits. Refs: transport/vp8-kcp
About
olcRTC - across the Sea
Project that allows users to bypass blocking by parasitizing and tunneling on unblocked and whitelisted services in Russia, use telemost, Max, mail and API in the future
satus
alpha
see all info in issues
issues? contact us at @openlibrecommunity
or wait for the release or at least a beta
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
# build ui only
mage buildUI
# 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
fast start
# server ( podman, pre configured, easy, unix )
./script/srv.sh
# client ( podman, pre configured, easy, unix )
./script/cnc.sh
Telegram: zarazaex
Email: zarazaex@tuta.io
Site: zarazaex.xyz
Made for: olcNG
Languages
Go
90.5%
Python
5.6%
Shell
3.7%
Dockerfile
0.2%
