Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RequestHeaderFixedChunkLength // https://github.com/Shadowsocks-NET/shadowsocks-specs/blob/main/2022-1-shadowsocks-2022-edition.md#312-format // Request stream: // +--------+------------------------+---------------------------+------------------------+---------------------------+---+ // | salt | encrypted header chunk | encrypted header chunk | encrypted length chunk | encrypted payload chunk |...| // +--------+------------------------+---------------------------+------------------------+---------------------------+---+ // | 16/32B | 11B + 16B tag | variable length + 16B tag | 2B length + 16B tag | variable length + 16B tag |...| // +--------+------------------------+---------------------------+------------------------+---------------------------+---+ // RequestHeaderFixedChunkLength = 1 + 8 + 2 // PacketMinimalHeaderSize // https://github.com/Shadowsocks-NET/shadowsocks-specs/blob/main/2022-1-shadowsocks-2022-edition.md#322-format-and-separate-header // Packet: // +---------------------------+---------------------------+ // | encrypted separate header | encrypted body | // +---------------------------+---------------------------+ // | 16B | variable length + 16B tag | // +---------------------------+---------------------------+ // // Separate header: // +------------+-----------+ // | session ID | packet ID | // +------------+-----------+ // | 8B | u64be | // +------------+-----------+ // PacketMinimalHeaderSize = 16 + 16 )
Variables ¶
View Source
var (
ErrMissingPSK = errors.New("missing psk")
)
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.