Documentation ¶
Index ¶
- 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
- type Dispatcher
- type PacketConnWrapper
- type PipeConnWrapper
- type XrayDialer
- type 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyPacketConn ¶
func ReturnError ¶
func ToDestination ¶
func ToSocksaddr ¶
func ToSocksaddr(destination net.Destination) M.Socksaddr
Types ¶
type Conn ¶
func (*Conn) ReadMultiBuffer ¶
func (c *Conn) ReadMultiBuffer() (buf.MultiBuffer, error)
func (*Conn) ReadMultiBufferTimeout ¶
func (*Conn) WriteMultiBuffer ¶
func (c *Conn) WriteMultiBuffer(bufferList buf.MultiBuffer) error
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(dispatcher routing.Dispatcher, newErrorFunc func(values ...any) *errors.Error) *Dispatcher
func (*Dispatcher) NewConnection ¶
func (*Dispatcher) NewPacketConnection ¶
func (d *Dispatcher) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error
type PacketConnWrapper ¶
type PacketConnWrapper struct { buf.Reader buf.Writer net.Conn Dest net.Destination // contains filtered or unexported fields }
func (*PacketConnWrapper) Close ¶
func (w *PacketConnWrapper) Close() error
func (*PacketConnWrapper) ReadPacket ¶
func (*PacketConnWrapper) WritePacket ¶
type PipeConnWrapper ¶
func (*PipeConnWrapper) Close ¶
func (w *PipeConnWrapper) Close() error
type XrayDialer ¶
func NewDialer ¶
func NewDialer(dialer internet.Dialer) *XrayDialer
func (*XrayDialer) DialContext ¶
func (*XrayDialer) ListenPacket ¶
func (d *XrayDialer) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)
type XrayLogger ¶
type XrayLogger struct {
// contains filtered or unexported fields
}
func (*XrayLogger) Debug ¶
func (l *XrayLogger) Debug(args ...any)
func (*XrayLogger) DebugContext ¶
func (l *XrayLogger) DebugContext(ctx context.Context, args ...any)
func (*XrayLogger) Error ¶
func (l *XrayLogger) Error(args ...any)
func (*XrayLogger) ErrorContext ¶
func (l *XrayLogger) ErrorContext(ctx context.Context, args ...any)
func (*XrayLogger) Fatal ¶
func (l *XrayLogger) Fatal(args ...any)
func (*XrayLogger) FatalContext ¶
func (l *XrayLogger) FatalContext(ctx context.Context, args ...any)
func (*XrayLogger) Info ¶
func (l *XrayLogger) Info(args ...any)
func (*XrayLogger) InfoContext ¶
func (l *XrayLogger) InfoContext(ctx context.Context, args ...any)
func (*XrayLogger) Panic ¶
func (l *XrayLogger) Panic(args ...any)
func (*XrayLogger) PanicContext ¶
func (l *XrayLogger) PanicContext(ctx context.Context, args ...any)
func (*XrayLogger) Trace ¶
func (l *XrayLogger) Trace(args ...any)
func (*XrayLogger) TraceContext ¶
func (l *XrayLogger) TraceContext(ctx context.Context, args ...any)
func (*XrayLogger) Warn ¶
func (l *XrayLogger) Warn(args ...any)
func (*XrayLogger) WarnContext ¶
func (l *XrayLogger) WarnContext(ctx context.Context, args ...any)
type XrayOutboundDialer ¶
type XrayOutboundDialer struct {
// contains filtered or unexported fields
}
func NewOutboundDialer ¶
func NewOutboundDialer(outbound proxy.Outbound, dialer internet.Dialer) *XrayOutboundDialer
func (*XrayOutboundDialer) DialContext ¶
func (*XrayOutboundDialer) ListenPacket ¶
func (d *XrayOutboundDialer) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)
Click to show internal directories.
Click to hide internal directories.