shadowsocks_2022

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSettings

type ClientSettings struct {
	Address    net.Address
	PortPicker i.PortSelector
	Key        string
	Dialer     i.Dialer
	Method     string
}

type Inbound

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

func NewServer

func NewServer(config *ServerConfig) (*Inbound, error)

func (*Inbound) Network

func (i *Inbound) Network() []net.Network

func (*Inbound) NewConnection

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

func (*Inbound) NewError

func (i *Inbound) NewError(ctx context.Context, err error)

func (*Inbound) NewPacketConnection

func (i *Inbound) NewPacketConnection(ctx context.Context,
	conn N.PacketConn, metadata M.Metadata) error

func (*Inbound) Process

func (i *Inbound) Process(ctx context.Context, conn net.Conn) error

type Outbound

type Outbound struct {
	*ClientSettings
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *ClientSettings) (*Outbound, error)

func (*Outbound) HandleFlow

func (o *Outbound) HandleFlow(ctx context.Context, dst net.Destination,
	rw buf.ReaderWriter) error

func (*Outbound) HandlePacketConn

func (o *Outbound) HandlePacketConn(ctx context.Context, dst net.Destination,
	p udp.PacketReaderWriter) error

type PacketReaderAdaptor

type PacketReaderAdaptor struct {
	network.PacketReader
}

func (*PacketReaderAdaptor) ReadPacket

func (a *PacketReaderAdaptor) ReadPacket() (*udp.Packet, error)

type PacketWriterAdaptor

type PacketWriterAdaptor struct {
	network.PacketWriter
}

func (*PacketWriterAdaptor) WritePacket

func (rw *PacketWriterAdaptor) WritePacket(p *udp.Packet) error

type ServerConfig

type ServerConfig struct {
	Method  string
	User    i.User
	Network []net.Network
	Handler i.Handler
}

Jump to

Keyboard shortcuts

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