Documentation ¶
Overview ¶
Package shadowstream implements the original Shadowsocks protocol protected by stream cipher.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrShortPacket = errors.New("short packet")
ErrShortPacket means the packet is too short to be a valid encrypted packet.
Functions ¶
Types ¶
type Cipher ¶
type Cipher interface { IVSize() int Encrypter(iv []byte) cipher.Stream Decrypter(iv []byte) cipher.Stream }
Cipher generates a pair of stream ciphers for encryption and decryption.
func Chacha20IETF ¶
type Conn ¶
A Conn represents a Shadowsocks connection. It implements the net.Conn interface.
type KeySizeError ¶
type KeySizeError int
func (KeySizeError) Error ¶
func (e KeySizeError) Error() string
type PacketConn ¶
type PacketConn struct { net.PacketConn Cipher }
func NewPacketConn ¶
func NewPacketConn(c net.PacketConn, ciph Cipher) *PacketConn
NewPacketConn wraps a net.PacketConn with stream cipher encryption/decryption.
Click to show internal directories.
Click to hide internal directories.