Open liudongmiao opened 6 months ago
There is another simple mux by @IrineSistiana at https://github.com/IrineSistiana/simple-mux
However, it's not standard, and the head length is 7 bytes.
For websocket, the head length is maximum 14 bytes, however, if we don't support more than 2**16 = 64K, the client data frame is 6 or 8 bytes (including mask 4 bytes), and the server data frame is 2 or 4 bytes (without mask 4 bytes). For mux, we can use 3 rsv bits, can support max 8 channel, and there are 10 unused opcodes, can be max to 18. For close stream, I'd suggest a payload length 0, as it's illegal for underlyling data, they never send data in 0. For ping / pong, there're in websockets.
There is no relay in sip003, currenty it's implemented by plugin self.
Mux.Cool
can be turned off by setmux
to0
As it's shadowsocks is based on socks, entire payload can be encrypted, so there is no
mux
solution on shadowsocks payload.Then, the mux should be done on plugin:
Mux.Cool
websockets
based on http/1.1, use websockets's rsv and/or opcode.http2/http3
, special stream and stream flow control