shadowsocks

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedItem added in v1.0.2

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

func (*CachedItem) CipherId added in v1.0.2

func (ci *CachedItem) CipherId() string

func (*CachedItem) Refresh added in v1.0.2

func (ci *CachedItem) Refresh()

type CipherCache added in v1.0.2

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

func (*CipherCache) AddCipher added in v1.0.2

func (cc *CipherCache) AddCipher(ip string, cipherId string)

WARNING TODO: All of this needs a MUTEX!!!!!!! WARNING

func (*CipherCache) ExpireOlderThan added in v1.0.2

func (cc *CipherCache) ExpireOlderThan(oldestTime time.Time)

func (*CipherCache) GetCiphers added in v1.0.2

func (c *CipherCache) GetCiphers(ip string) []*CachedItem

type ShadowsocksReader

type ShadowsocksReader interface {
	io.Reader
	io.WriterTo
}

ShadowsocksReader is an io.Reader that also implements io.WriterTo to allow for piping the data without extra allocations and copies.

func NewShadowsocksReader

func NewShadowsocksReader(reader io.Reader, ssCipher shadowaead.Cipher) ShadowsocksReader

NewShadowsocksReader creates a Reader that decrypts the given Reader using the shadowsocks protocol with the given shadowsocks cipher.

type ShadowsocksWriter

type ShadowsocksWriter interface {
	io.Writer
	io.ReaderFrom
}

ShadowsocksWriter is an io.Writer that also implements io.ReaderFrom to allow for piping the data without extra allocations and copies.

func NewShadowsocksWriter

func NewShadowsocksWriter(writer io.Writer, ssCipher shadowaead.Cipher) ShadowsocksWriter

NewShadowsocksWriter creates a Writer that encrypts the given Writer using the shadowsocks protocol with the given shadowsocks cipher.

type TCPService

type TCPService interface {
	Start()
	Stop() error
}

TCPService is a Shadowsocks TCP service that can be started and stopped.

func NewTCPService

func NewTCPService(listener *net.TCPListener, ciphers *map[string]shadowaead.Cipher, m metrics.ShadowsocksMetrics) TCPService

NewTCPService creates a TCPService

type UDPService

type UDPService interface {
	Start()
	Stop() error
}

UDPService is a UDP shadowsocks service that can be started and stopped.

func NewUDPService

func NewUDPService(clientConn net.PacketConn, natTimeout time.Duration, cipherMap *map[string]shadowaead.Cipher, m metrics.ShadowsocksMetrics) UDPService

NewUDPService creates a UDPService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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