shadowsocks

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
}

func NewTCPService

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

type UDPService

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

func NewUDPService

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

Jump to

Keyboard shortcuts

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