shadowsocks

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: GPL-2.0 Imports: 13 Imported by: 44

README

sing-shadowsocks

Lightweight and efficient shadowsocks implementation with sing.

Documentation

Index

Constants

View Source
const MethodNone = "none"

Variables

View Source
var (
	ErrBadKey          = E.New("bad key")
	ErrMissingPassword = E.New("missing password")
)

Functions

func Key

func Key(password []byte, keySize int) []byte

Types

type Handler

type Handler interface {
	N.TCPConnectionHandler
	N.UDPConnectionHandler
	E.Handler
}

type Method

type Method interface {
	Name() string
	DialConn(conn net.Conn, destination M.Socksaddr) (net.Conn, error)
	DialEarlyConn(conn net.Conn, destination M.Socksaddr) net.Conn
	DialPacketConn(conn net.Conn) N.NetPacketConn
}

func NewNone

func NewNone() Method

type NoneMethod

type NoneMethod struct{}

func (*NoneMethod) DialConn

func (m *NoneMethod) DialConn(conn net.Conn, destination M.Socksaddr) (net.Conn, error)

func (*NoneMethod) DialEarlyConn

func (m *NoneMethod) DialEarlyConn(conn net.Conn, destination M.Socksaddr) net.Conn

func (*NoneMethod) DialPacketConn

func (m *NoneMethod) DialPacketConn(conn net.Conn) N.NetPacketConn

func (*NoneMethod) Name

func (m *NoneMethod) Name() string

type NoneService

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

func (*NoneService) Name

func (s *NoneService) Name() string

func (*NoneService) NewConnection

func (s *NoneService) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error

func (*NoneService) NewError

func (s *NoneService) NewError(ctx context.Context, err error)

func (*NoneService) NewPacket

func (s *NoneService) NewPacket(ctx context.Context, conn N.PacketConn, buffer *buf.Buffer, metadata M.Metadata) error

func (*NoneService) Password

func (s *NoneService) Password() string

func (*NoneService) WriteIsThreadUnsafe

func (s *NoneService) WriteIsThreadUnsafe()

type ServerConnError

type ServerConnError struct {
	net.Conn
	Source M.Socksaddr
	Cause  error
}

func (*ServerConnError) Close

func (e *ServerConnError) Close() error

func (*ServerConnError) Error

func (e *ServerConnError) Error() string

func (*ServerConnError) Unwrap

func (e *ServerConnError) Unwrap() error

type ServerPacketError

type ServerPacketError struct {
	Source M.Socksaddr
	Cause  error
}

func (*ServerPacketError) Error

func (e *ServerPacketError) Error() string

func (*ServerPacketError) Unwrap

func (e *ServerPacketError) Unwrap() error

type Service

type Service interface {
	Name() string
	Password() string
	N.TCPConnectionHandler
	N.UDPHandler
	E.Handler
}

func NewNoneService

func NewNoneService(udpTimeout int64, handler Handler) Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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