Versions in this module Expand all Collapse all v1 v1.8.16 Jul 1, 2024 v1.8.11 Jul 1, 2024 Changes in this version + func CopyConn(ctx context.Context, inboundConn net.Conn, link *transport.Link, ...) error + func CopyPacketConn(ctx context.Context, inboundConn net.Conn, link *transport.Link, ...) error + func ReturnError(err error) error + func ToDestination(socksaddr M.Socksaddr, network net.Network) net.Destination + func ToNetwork(network string) net.Network + func ToSocksaddr(destination net.Destination) M.Socksaddr + type Conn struct + func NewConn(conn net.Conn) *Conn + func (c *Conn) ReadMultiBuffer() (buf.MultiBuffer, error) + func (c *Conn) ReadMultiBufferTimeout(duration time.Duration) (buf.MultiBuffer, error) + func (c *Conn) WriteMultiBuffer(bufferList buf.MultiBuffer) error + type Dispatcher struct + func NewDispatcher(dispatcher routing.Dispatcher, newErrorFunc func(values ...any) *errors.Error) *Dispatcher + func (d *Dispatcher) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error + func (d *Dispatcher) NewError(ctx context.Context, err error) + func (d *Dispatcher) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error + type PacketConnWrapper struct + Dest net.Destination + func (w *PacketConnWrapper) Close() error + func (w *PacketConnWrapper) ReadPacket(buffer *B.Buffer) (M.Socksaddr, error) + func (w *PacketConnWrapper) WritePacket(buffer *B.Buffer, destination M.Socksaddr) error + type PipeConnWrapper struct + R io.Reader + W buf.Writer + func (w *PipeConnWrapper) Close() error + func (w *PipeConnWrapper) Read(b []byte) (n int, err error) + func (w *PipeConnWrapper) Write(p []byte) (n int, err error) + type XrayDialer struct + func NewDialer(dialer internet.Dialer) *XrayDialer + func (d *XrayDialer) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (d *XrayDialer) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) + type XrayLogger struct + func NewLogger(newErrorFunc func(values ...any) *errors.Error) *XrayLogger + func (l *XrayLogger) Debug(args ...any) + func (l *XrayLogger) DebugContext(ctx context.Context, args ...any) + func (l *XrayLogger) Error(args ...any) + func (l *XrayLogger) ErrorContext(ctx context.Context, args ...any) + func (l *XrayLogger) Fatal(args ...any) + func (l *XrayLogger) FatalContext(ctx context.Context, args ...any) + func (l *XrayLogger) Info(args ...any) + func (l *XrayLogger) InfoContext(ctx context.Context, args ...any) + func (l *XrayLogger) Panic(args ...any) + func (l *XrayLogger) PanicContext(ctx context.Context, args ...any) + func (l *XrayLogger) Trace(args ...any) + func (l *XrayLogger) TraceContext(ctx context.Context, args ...any) + func (l *XrayLogger) Warn(args ...any) + func (l *XrayLogger) WarnContext(ctx context.Context, args ...any) + type XrayOutboundDialer struct + func NewOutboundDialer(outbound proxy.Outbound, dialer internet.Dialer) *XrayOutboundDialer + func (d *XrayOutboundDialer) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) + func (d *XrayOutboundDialer) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)