More plausible list of male last names
Composed by Gemini 3.1 Pro AI out of popular surnames of Slavic, Tatar, North-Caucasus, Georgian, Armenian and Buryat origin.
More plausible list of male first names
Composed by Gemini 3.1 Pro AI out of popular names of Slavic, Tatar, North-Caucasus, Georgian, Armenian and Buryat origin.
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
Wrap the VP8 carrier in a KCP session so the upper layer gets reliable,
ordered, message-oriented delivery. Fixes the random 0 B/s stalls that
happened when a single VP8 frame was dropped (drainOutbound on
reconnect, inbound overflow, or RTP loss invalidating partial assembly):
mux.Stream.nextSeq would never advance past the hole and curl would
park on recv until a new mux stream was opened.
KCP retransmits recover from those losses transparently.
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