Documentation ¶
Overview ¶
Package shadowstream implements the original Shadowsocks protocol protected by stream cipher.
Index ¶
- Variables
- func Pack(dst, plaintext []byte, s Cipher) ([]byte, error)
- func Unpack(dst, pkt []byte, s Cipher) ([]byte, error)
- type Cipher
- func AESCFB(key []byte) (Cipher, error)
- func AESCFB8(key []byte) (Cipher, error)
- func AESCTR(key []byte) (Cipher, error)
- func AESOFB(key []byte) (Cipher, error)
- func BFCFB(key []byte) (Cipher, error)
- func CAST5CFB(key []byte) (Cipher, error)
- func CamelliaCFB(key []byte) (Cipher, error)
- func CamelliaCFB8(key []byte) (Cipher, error)
- func Chacha20(key []byte) (Cipher, error)
- func Chacha20IETF(key []byte) (Cipher, error)
- func DESCFB(key []byte) (Cipher, error)
- func IDEACFB(key []byte) (Cipher, error)
- func RC2CFB(key []byte) (Cipher, error)
- func RC4(key []byte) (Cipher, error)
- func RC4MD5(key []byte) (Cipher, error)
- func SEEDCFB(key []byte) (Cipher, error)
- func Salsa20(key []byte) (Cipher, error)
- func Xchacha20(key []byte) (Cipher, error)
- type Conn
- type KeySizeError
- type PacketConn
- type Reader
- type Writer
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 CamelliaCFB8 ¶ added in v0.1.8
func Chacha20IETF ¶
type Conn ¶
A Conn represents a Shadowsocks connection. It implements the net.Conn interface.
func (*Conn) ObtainReadIV ¶ added in v0.1.8
func (*Conn) ObtainWriteIV ¶ added in v0.1.8
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.