outbound

package
v0.0.0-...-f74919f Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: GPL-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithTag

func ContextWithTag(ctx context.Context, outboundTag string) context.Context

func CopyEarlyConn

func CopyEarlyConn(ctx context.Context, conn net.Conn, serverConn net.Conn) error

func New

func New(ctx context.Context, router adapter.Router, tag string, yousuocanshu option.Outbound) (adapter.Outbound, error)

func NewConnection

func NewConnection(ctx context.Context, this N.Dialer, conn net.Conn, metadata adapter.InboundContext) error

func NewDirectConnection

func NewDirectConnection(ctx context.Context, router adapter.Router, this N.Dialer, conn net.Conn, metadata adapter.InboundContext, domainStrategy dns.DomainStrategy) error

func NewDirectPacketConnection

func NewDirectPacketConnection(ctx context.Context, router adapter.Router, this N.Dialer, conn N.PacketConn, metadata adapter.InboundContext, domainStrategy dns.DomainStrategy) error

func NewError

func NewError(logger log.ContextLogger, ctx context.Context, err error)

func NewPacketConnection

func NewPacketConnection(ctx context.Context, this N.Dialer, conn N.PacketConn, metadata adapter.InboundContext) error

func TagFromContext

func TagFromContext(ctx context.Context) (string, bool)

Types

type Block

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

func NewBlock

func NewBlock(tag string) *Block

func (*Block) Dependencies

func (a *Block) Dependencies() []string

func (*Block) DialContext

func (h *Block) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func (*Block) ListenPacket

func (h *Block) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

func (*Block) Network

func (a *Block) Network() []string

func (*Block) NewConnection

func (h *Block) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*Block) NewError

func (a *Block) NewError(ctx context.Context, err error)

func (*Block) NewPacketConnection

func (h *Block) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*Block) Tag

func (a *Block) Tag() string

func (*Block) Type

func (a *Block) Type() string

type DNS

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

func NewDNS

func NewDNS(router adapter.Router, tag string) *DNS

func (*DNS) Dependencies

func (a *DNS) Dependencies() []string

func (*DNS) DialContext

func (d *DNS) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func (*DNS) ListenPacket

func (d *DNS) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

func (*DNS) Network

func (a *DNS) Network() []string

func (*DNS) NewConnection

func (d *DNS) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*DNS) NewError

func (a *DNS) NewError(ctx context.Context, err error)

func (*DNS) NewPacketConnection

func (d *DNS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*DNS) Tag

func (a *DNS) Tag() string

func (*DNS) Type

func (a *DNS) Type() string

type Direct

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

func NewDirect

func NewDirect(router adapter.Router, tag string, yousuocanshu option.DirectOutboundOptions) (*Direct, error)

func (*Direct) Dependencies

func (a *Direct) Dependencies() []string

func (*Direct) DialContext

func (h *Direct) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func (*Direct) DialParallel

func (h *Direct) DialParallel(ctx context.Context, network string, destination M.Socksaddr, destinationAddresses []netip.Addr) (net.Conn, error)

func (*Direct) ListenPacket

func (h *Direct) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

func (*Direct) Network

func (a *Direct) Network() []string

func (*Direct) NewConnection

func (h *Direct) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*Direct) NewError

func (a *Direct) NewError(ctx context.Context, err error)

func (*Direct) NewPacketConnection

func (h *Direct) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*Direct) Tag

func (a *Direct) Tag() string

func (*Direct) Type

func (a *Direct) Type() string

type ProxyListener

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

func NewProxyListener

func NewProxyListener(ctx context.Context, dialer N.Dialer) *ProxyListener

func (*ProxyListener) Close

func (l *ProxyListener) Close() error

func (*ProxyListener) NewConnection

func (l *ProxyListener) NewConnection(ctx context.Context, conn net.Conn, upstreamMetadata M.Metadata) error

func (*ProxyListener) NewPacketConnection

func (l *ProxyListener) NewPacketConnection(ctx context.Context, conn N.PacketConn, upstreamMetadata M.Metadata) error

func (*ProxyListener) Password

func (l *ProxyListener) Password() string

func (*ProxyListener) Port

func (l *ProxyListener) Port() uint16

func (*ProxyListener) Start

func (l *ProxyListener) Start() error

func (*ProxyListener) Username

func (l *ProxyListener) Username() string

type VLESS

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

func NewVLESS

func NewVLESS(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, yousuocanshu option.VLESSOutboundOptions) (*VLESS, error)

func (*VLESS) Close

func (h *VLESS) Close() error

func (*VLESS) Dependencies

func (a *VLESS) Dependencies() []string

func (*VLESS) DialContext

func (h *VLESS) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func (*VLESS) InterfaceUpdated

func (h *VLESS) InterfaceUpdated()

func (*VLESS) ListenPacket

func (h *VLESS) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

func (*VLESS) Network

func (a *VLESS) Network() []string

func (*VLESS) NewConnection

func (h *VLESS) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*VLESS) NewError

func (a *VLESS) NewError(ctx context.Context, err error)

func (*VLESS) NewPacketConnection

func (h *VLESS) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*VLESS) Tag

func (a *VLESS) Tag() string

func (*VLESS) Type

func (a *VLESS) Type() string

type VMess

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

func NewVMess

func NewVMess(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, yousuocanshu option.VMessOutboundOptions) (*VMess, error)

func (*VMess) Close

func (h *VMess) Close() error

func (*VMess) Dependencies

func (a *VMess) Dependencies() []string

func (*VMess) DialContext

func (h *VMess) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func (*VMess) InterfaceUpdated

func (h *VMess) InterfaceUpdated()

func (*VMess) ListenPacket

func (h *VMess) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

func (*VMess) Network

func (a *VMess) Network() []string

func (*VMess) NewConnection

func (h *VMess) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error

func (*VMess) NewError

func (a *VMess) NewError(ctx context.Context, err error)

func (*VMess) NewPacketConnection

func (h *VMess) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error

func (*VMess) Tag

func (a *VMess) Tag() string

func (*VMess) Type

func (a *VMess) Type() string

Jump to

Keyboard shortcuts

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