Versions in this module Expand all Collapse all v1 v1.9.1 Feb 28, 2016 Changes in this version + const AddrTypeDomain + const AddrTypeIPv4 + const AddrTypeIPv6 + const AuthSize + func ChunkKeyGenerator(iv []byte) func() []byte + func HeaderKeyGenerator(key []byte, iv []byte) func() []byte + func PasswordToCipherKey(password string, keySize int) []byte + type AesCfb struct + KeyBytes int + func (this *AesCfb) IVSize() int + func (this *AesCfb) KeySize() int + func (this *AesCfb) NewDecodingStream(key []byte, iv []byte) (cipher.Stream, error) + func (this *AesCfb) NewEncodingStream(key []byte, iv []byte) (cipher.Stream, error) + type Authenticator struct + func NewAuthenticator(keygen KeyGenerator) *Authenticator + func (this *Authenticator) Authenticate(auth []byte, data []byte) []byte + type ChaCha20 struct + IVBytes int + func (this *ChaCha20) IVSize() int + func (this *ChaCha20) KeySize() int + func (this *ChaCha20) NewDecodingStream(key []byte, iv []byte) (cipher.Stream, error) + func (this *ChaCha20) NewEncodingStream(key []byte, iv []byte) (cipher.Stream, error) + type ChunkReader struct + func NewChunkReader(reader io.Reader, auth *Authenticator) *ChunkReader + func (this *ChunkReader) Read() (*alloc.Buffer, error) + type Cipher interface + IVSize func() int + KeySize func() int + NewDecodingStream func(key []byte, iv []byte) (cipher.Stream, error) + NewEncodingStream func(key []byte, iv []byte) (cipher.Stream, error) + type Config struct + Cipher Cipher + Email string + Key []byte + Level protocol.UserLevel + UDP bool + type KeyGenerator func() []byte + type Request struct + Address v2net.Address + OTA bool + Port v2net.Port + UDPPayload *alloc.Buffer + func ReadRequest(reader io.Reader, auth *Authenticator, udp bool) (*Request, error) + type Shadowsocks struct + func NewShadowsocks(config *Config, packetDispatcher dispatcher.PacketDispatcher) *Shadowsocks + func (this *Shadowsocks) Close() + func (this *Shadowsocks) Listen(port v2net.Port) error + func (this *Shadowsocks) Port() v2net.Port