# Functions
DecryptOnce will decrypt the cipherText using the cipher and salt, appending the output to plainText.
No description provided by the author
MakeTestPayload returns a slice of `size` arbitrary bytes.
MakeTestSecrets returns a slice of `n` test passwords.
No description provided by the author
NewCipher creates a Cipher given a cipher name and a secret.
NewShadowsocksReader creates a Reader that decrypts the given Reader using the shadowsocks protocol with the given shadowsocks cipher.
NewShadowsocksWriter creates a Writer that encrypts the given Writer using the shadowsocks protocol with the given shadowsocks cipher.
Pack encrypts a Shadowsocks-UDP packet and returns a slice containing the encrypted packet.
Pack function for 2022-blake3-aes-256-gcm.
ParseTCPReqHeader reads the first payload chunk, validates the header, and returns the target address, initial payload, or an error.
No description provided by the author
For spec 2022, this function only parses the decrypted AEAD header.
SupportedCipherNames lists the names of the AEAD ciphers that are supported.
Unpack decrypts a Shadowsocks UDP packet and returns the plaintext offset in the original packet buffer, a slice containing the decrypted plaintext (header + payload) or an error.
Unpack function for 2022-blake3-aes-256-gcm.
WriteClientUDPHeader fills a Shadowsocks UDP header into the buffer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WriteUDPHeader fills a Shadowsocks 2022 UDP header into the buffer.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
type + 64-bit timestamp + socks address + padding length + padding.
type + 64-bit timestamp + max salt length.
TestCipher is a preferred cipher to use in testing.
client session id + packet id + type + timestamp + padding length.
server session id + packet id + type + timestamp + client session id + padding length.
# Variables
High performance random salt/nonce generator.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RandomSaltGenerator is a basic SaltGenerator.
# Structs
Cipher encapsulates a Shadowsocks AEAD spec and a secret.
No description provided by the author
No description provided by the author
Writer is an io.Writer that also implements io.ReaderFrom to allow for piping the data without extra allocations and copies.
# Interfaces
ChunkReader is similar to io.Reader, except that it controls its own buffer granularity.
Reader is an io.Reader that also implements io.WriterTo to allow for piping the data without extra allocations and copies.
SaltGenerator generates unique salts to use in Shadowsocks connections.