shadowsocks

package
v1.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2016 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

R.I.P Shadowsocks

Index

Constants

View Source
const (
	AddrTypeIPv4   = 1
	AddrTypeIPv6   = 4
	AddrTypeDomain = 3
)
View Source
const (
	AuthSize = 10
)

Variables

This section is empty.

Functions

func ChunkKeyGenerator added in v1.9.1

func ChunkKeyGenerator(iv []byte) func() []byte

func HeaderKeyGenerator added in v1.9.1

func HeaderKeyGenerator(key []byte, iv []byte) func() []byte

func PasswordToCipherKey added in v1.9.1

func PasswordToCipherKey(password string, keySize int) []byte

Types

type AesCfb added in v1.9.1

type AesCfb struct {
	KeyBytes int
}

func (*AesCfb) IVSize added in v1.9.1

func (this *AesCfb) IVSize() int

func (*AesCfb) KeySize added in v1.9.1

func (this *AesCfb) KeySize() int

func (*AesCfb) NewDecodingStream added in v1.9.1

func (this *AesCfb) NewDecodingStream(key []byte, iv []byte) (cipher.Stream, error)

func (*AesCfb) NewEncodingStream added in v1.9.1

func (this *AesCfb) NewEncodingStream(key []byte, iv []byte) (cipher.Stream, error)

type Authenticator added in v1.9.1

type Authenticator struct {
	// contains filtered or unexported fields
}

func NewAuthenticator added in v1.9.1

func NewAuthenticator(keygen KeyGenerator) *Authenticator

func (*Authenticator) Authenticate added in v1.9.1

func (this *Authenticator) Authenticate(auth []byte, data []byte) []byte

type ChaCha20 added in v1.9.1

type ChaCha20 struct {
	IVBytes int
}

func (*ChaCha20) IVSize added in v1.9.1

func (this *ChaCha20) IVSize() int

func (*ChaCha20) KeySize added in v1.9.1

func (this *ChaCha20) KeySize() int

func (*ChaCha20) NewDecodingStream added in v1.9.1

func (this *ChaCha20) NewDecodingStream(key []byte, iv []byte) (cipher.Stream, error)

func (*ChaCha20) NewEncodingStream added in v1.9.1

func (this *ChaCha20) NewEncodingStream(key []byte, iv []byte) (cipher.Stream, error)

type ChunkReader added in v1.9.1

type ChunkReader struct {
	// contains filtered or unexported fields
}

func NewChunkReader added in v1.9.1

func NewChunkReader(reader io.Reader, auth *Authenticator) *ChunkReader

func (*ChunkReader) Read added in v1.9.1

func (this *ChunkReader) Read() (*alloc.Buffer, error)

func (*ChunkReader) Release added in v1.11.1

func (this *ChunkReader) Release()

type Cipher

type Cipher interface {
	KeySize() int
	IVSize() int
	NewEncodingStream(key []byte, iv []byte) (cipher.Stream, error)
	NewDecodingStream(key []byte, iv []byte) (cipher.Stream, error)
}

type Config added in v1.9.1

type Config struct {
	Cipher Cipher
	Key    []byte
	UDP    bool
	Level  protocol.UserLevel
	Email  string
}

type KeyGenerator added in v1.9.1

type KeyGenerator func() []byte

type Request added in v1.9.1

type Request struct {
	Address    v2net.Address
	Port       v2net.Port
	OTA        bool
	UDPPayload *alloc.Buffer
}

func ReadRequest added in v1.9.1

func ReadRequest(reader io.Reader, auth *Authenticator, udp bool) (*Request, error)

func (*Request) DetachUDPPayload added in v1.12.1

func (this *Request) DetachUDPPayload() *alloc.Buffer

func (*Request) Release added in v1.12.1

func (this *Request) Release()

type Shadowsocks added in v1.9.1

type Shadowsocks struct {
	// contains filtered or unexported fields
}

func NewShadowsocks added in v1.9.1

func NewShadowsocks(config *Config, packetDispatcher dispatcher.PacketDispatcher) *Shadowsocks

func (*Shadowsocks) Close added in v1.9.1

func (this *Shadowsocks) Close()

func (*Shadowsocks) Listen added in v1.9.1

func (this *Shadowsocks) Listen(port v2net.Port) error

func (*Shadowsocks) Port added in v1.9.1

func (this *Shadowsocks) Port() v2net.Port

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL