mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-06-06 04:19:46 +00:00
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
94 lines
4.1 KiB
Modula-2
94 lines
4.1 KiB
Modula-2
module github.com/openlibrecommunity/olcrtc
|
|
|
|
go 1.25.0
|
|
|
|
require (
|
|
github.com/google/uuid v1.6.0
|
|
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674
|
|
github.com/livekit/server-sdk-go/v2 v2.16.2
|
|
github.com/magefile/mage v1.17.1
|
|
github.com/pion/rtp v1.10.1
|
|
github.com/pion/webrtc/v4 v4.2.11
|
|
github.com/zarazaex69/b v0.0.0-20260423064626-c0bd20863b89
|
|
github.com/zarazaex69/gr v0.0.0-20260430043628-45b595f4fef0
|
|
golang.org/x/crypto v0.50.0
|
|
golang.org/x/mobile v0.0.0-20260410095206-2cfb76559b7b
|
|
)
|
|
|
|
require (
|
|
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260209202127-80ab13bee0bf.1 // indirect
|
|
buf.build/go/protovalidate v1.1.2 // indirect
|
|
buf.build/go/protoyaml v0.6.0 // indirect
|
|
cel.dev/expr v0.25.1 // indirect
|
|
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
|
|
github.com/benbjohnson/clock v1.3.5 // indirect
|
|
github.com/bep/debounce v1.2.1 // indirect
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/dennwc/iters v1.2.2 // indirect
|
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
|
github.com/frostbyte73/core v0.1.1 // indirect
|
|
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
|
github.com/gammazero/deque v1.2.1 // indirect
|
|
github.com/go-jose/go-jose/v3 v3.0.5 // indirect
|
|
github.com/go-logr/logr v1.4.3 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/google/cel-go v0.27.0 // indirect
|
|
github.com/jxskiss/base62 v1.1.0 // indirect
|
|
github.com/klauspost/compress v1.18.4 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
|
github.com/klauspost/reedsolomon v1.13.3 // indirect
|
|
github.com/lithammer/shortuuid/v4 v4.2.0 // indirect
|
|
github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731 // indirect
|
|
github.com/livekit/mediatransportutil v0.0.0-20251128105421-19c7a7b81c22 // indirect
|
|
github.com/livekit/protocol v1.45.3 // indirect
|
|
github.com/livekit/psrpc v0.7.1 // indirect
|
|
github.com/makiuchi-d/gozxing v0.1.1 // indirect
|
|
github.com/moby/sys/user v0.4.0 // indirect
|
|
github.com/nats-io/nats.go v1.48.0 // indirect
|
|
github.com/nats-io/nkeys v0.4.15 // indirect
|
|
github.com/nats-io/nuid v1.0.1 // indirect
|
|
github.com/pion/datachannel v1.6.0 // indirect
|
|
github.com/pion/dtls/v3 v3.1.2 // indirect
|
|
github.com/pion/ice/v4 v4.2.2 // indirect
|
|
github.com/pion/interceptor v0.1.44 // indirect
|
|
github.com/pion/logging v0.2.4 // indirect
|
|
github.com/pion/mdns/v2 v2.1.0 // indirect
|
|
github.com/pion/randutil v0.1.0 // indirect
|
|
github.com/pion/rtcp v1.2.16 // indirect
|
|
github.com/pion/sctp v1.9.4 // indirect
|
|
github.com/pion/sdp/v3 v3.0.18 // indirect
|
|
github.com/pion/srtp/v3 v3.0.10 // indirect
|
|
github.com/pion/stun/v3 v3.1.2 // indirect
|
|
github.com/pion/transport/v4 v4.0.1 // indirect
|
|
github.com/pion/turn/v4 v4.1.4 // indirect
|
|
github.com/pkg/errors v0.9.1 // indirect
|
|
github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect
|
|
github.com/redis/go-redis/v9 v9.17.2 // indirect
|
|
github.com/tjfoc/gmsm v1.4.1 // indirect
|
|
github.com/twitchtv/twirp v8.1.3+incompatible // indirect
|
|
github.com/wlynxg/anet v0.0.5 // indirect
|
|
github.com/xtaci/kcp-go/v5 v5.6.72 // indirect
|
|
github.com/xtaci/smux v1.5.57 // indirect
|
|
github.com/zeebo/xxh3 v1.1.0 // indirect
|
|
go.opentelemetry.io/otel v1.40.0 // indirect
|
|
go.uber.org/atomic v1.11.0 // indirect
|
|
go.uber.org/multierr v1.11.0 // indirect
|
|
go.uber.org/zap v1.27.1 // indirect
|
|
go.uber.org/zap/exp v0.3.0 // indirect
|
|
golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a // indirect
|
|
golang.org/x/mod v0.35.0 // indirect
|
|
golang.org/x/net v0.53.0 // indirect
|
|
golang.org/x/sync v0.20.0 // indirect
|
|
golang.org/x/sys v0.43.0 // indirect
|
|
golang.org/x/text v0.36.0 // indirect
|
|
golang.org/x/time v0.15.0 // indirect
|
|
golang.org/x/tools v0.44.0 // indirect
|
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
|
google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20260209200024-4cfbd4190f57 // indirect
|
|
google.golang.org/grpc v1.79.1 // indirect
|
|
google.golang.org/protobuf v1.36.11 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
rsc.io/qr v0.2.0 // indirect
|
|
)
|