Commit Graph

218 Commits

Author SHA1 Message Date
zarazaex69 75692dbebb АпДеЙт МагикККАМЕНТССССЩЩЩЩ 2026-05-07 20:53:43 +03:00
zarazaex69 5a4446e2a7 add magic КОМЕНТАРИЙ 2026-05-07 20:50:10 +03:00
zarazaex69 7e810acd34 upd: trandport go fix maybe 2026-05-07 20:43:32 +03:00
zarazaex69 f8d8bf326e chore: update videochannel submodule to latest revision 2026-05-07 18:20:11 +03:00
zarazaex69 87a546605c fix: golangci 2026-05-07 16:36:30 +03:00
zarazaex69 84c53f1676 feat: add real provider E2E test matrix for WebRTC carriers 2026-05-07 15:28:40 +03:00
zarazaex69 4070d36307 test: add video track support and provider/transport matrix tests 2026-05-07 14:43:58 +03:00
zarazaex69 9c992d6fe4 refactor: remove legacy code 2026-05-07 14:28:32 +03:00
zarazaex69 99ee4d8bbc fix:fix suppress noisy LiveKit/pion logs in non-debug mode 2026-05-07 13:03:19 +03:00
zarazaex69 e4212b346b feat(sei): add sei config 2026-05-07 01:08:35 +03:00
zarazaex69 9ca0e8f57f fix: srv dont leave bug 2026-05-07 00:42:36 +03:00
zarazaex69 63dd61c61d fix(test): fix all test bugs 2026-05-07 00:38:52 +03:00
zarazaex69 ed682c3b82 feat(test): update e2e test 2026-05-07 00:20:13 +03:00
zarazaex69 a217093b8e feat(test): add e2e 2026-05-07 00:08:22 +03:00
zarazaex69 9d8f063ce3 feat(test): up test coverage 2026-05-07 00:06:28 +03:00
zarazaex69 aa49808e68 feat(test): init base test 2026-05-06 22:33:29 +03:00
zarazaex69 0cae2d0b8f fix: golangci errors 2026-05-06 19:55:09 +03:00
zarazaex69 1965cff5cf fix: -client-id bug 2026-05-06 19:23:16 +03:00
zarazaex69 8be56493f0 feat: add clientid key 2026-05-06 19:23:16 +03:00
zarazaex69 a2234b6a2a perf: optimize write polling and kcp interval for lower latency 2026-05-03 16:10:32 +03:00
zarazaex69 bca50fa7c9 feat: add session epoch tracking to detect peer restarts 2026-05-03 15:53:11 +03:00
zarazaex69 3c816a38e8 fix: state 2026-05-03 11:54:13 +03:00
zarazaex69 ee4afe6f07 fix: reconnect keepalive DONT work 2026-05-03 10:44:06 +03:00
zarazaex69 fce4d12fbc fix: waitForNewSession spam 2026-05-03 10:33:40 +03:00
zarazaex69 a4e6079148 fix: golangci 2026-05-03 10:24:18 +03:00
zarazaex69 dd606ddfb2 fix: fix all golangci errors 2026-05-03 06:10:48 +03:00
zarazaex69 6183233eeb fix: fix bug where the srv side ignored WebRTC renegotiation 2026-05-03 02:04:41 +03:00
zarazaex69 5bb8178e50 feat(smux): replace internal/mux with smux over KCP
Replace the hand-rolled multiplexer (internal/mux) with xtaci/smux v2
running on top of the existing KCP-reliable vp8channel transport.

- Add internal/muxconn: io.ReadWriteCloser adapter bridging link.Link
  (message-oriented) into the byte-stream smux expects; applies AEAD
  on every write and inverts it on every received message
- Rewrite client: smux.Client session over muxconn; OpenStream per
  SOCKS5 connection; reconnect handler tears down and rebuilds session
- Rewrite server: smux.Server session; AcceptStream loop dispatches
  each stream to a proxy handler; tolerates session bounces on reconnect
- Delete internal/mux: all sequence/reorder/buffer logic is now
  handled by smux + KCP
2026-05-03 00:45:58 +03:00
zarazaex69 35c05b654a feat(vp8channel): wrap carrier in KCP for reliable, ordered delivery
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
2026-05-02 18:03:44 +03:00
zarazaex69 21d46e478b refactor: remove debug logging and unused queue monitor 2026-05-02 14:56:33 +03:00
zarazaex69 602c8a7b0d refactor: remove telemetry and metrics collection 2026-05-02 14:39:49 +03:00
zarazaex69 1101528cf6 refactor: add comprehensive diagnostics and flow control to data pumping 2026-05-02 02:18:45 +03:00
zarazaex69 647f605905 feat: add inbound queue and dispatch goroutine for vp8 transport 2026-05-01 13:27:21 +03:00
zarazaex69 2a24f7f196 fix: change vp8Keepalive from P-frame to keyframe 2026-05-01 10:16:36 +03:00
zarazaex69 5ddc942405 refactor: adjust vp8 keepalive timing and queue parameters 2026-05-01 10:11:43 +03:00
zarazaex69 9a5a4b249d feat(vp8channel): drain outbound channel before reconnect callback 2026-04-30 14:13:54 +03:00
zarazaex69 4a5b255db6 refactor: calculate sample duration based on batch size 2026-04-30 13:51:55 +03:00
zarazaex69 86b92d4fc5 feat(videochannel): cache idle frame to avoid re-encoding 2026-04-30 12:24:00 +03:00
zarazaex69 2c8edeeef0 feat(thread): make 1 ffmpg tread 2026-04-30 08:29:54 +03:00
zarazaex69 bf454145ba feat(lcm): implement strict lifecycle management for both encoders and
decoders
2026-04-30 08:14:05 +03:00
zarazaex69 b4408715bb upd 2026-04-30 07:36:35 +03:00
zarazaex69 92462878d7 chore: update gr submodule (add reedsolomon for tile) 2026-04-30 07:02:07 +03:00
zarazaex69 8996b2878a fix: validate tile codec requires 1080x1080 dimensions 2026-04-30 06:56:59 +03:00
zarazaex69 ad7c9a5c3e feat: add tile as videochannel visual codec via -video-codec tile 2026-04-30 06:55:34 +03:00
zarazaex69 f11cf6baef refactor: remove "b" codec support 2026-04-30 05:09:07 +03:00
zarazaex69 8ee1855ba3 chore: update videochannel/gr submodule 2026-04-30 05:01:40 +03:00
zarazaex69 e742a789b9 chore: update gr submodule and replace qr dependencies 2026-04-30 04:56:45 +03:00
zarazaex69 5f66d764b5 refactor(videochannel): replace qr libs with grqr codec 2026-04-30 04:56:33 +03:00
zarazaex69 d4de7a1d1c chore: add gr submodule for videochannel transport 2026-04-30 04:50:29 +03:00
zarazaex69 9c7b4e316f refactor(videochannel): remove b codec 2026-04-30 01:55:17 +03:00