dialer

package
v1.12.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: GPL-2.0 Imports: 25 Imported by: 42

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WgControlFns []control.Func

Functions

func DialParallelNetwork added in v1.11.0

func DialParallelNetwork(ctx context.Context, dialer ParallelInterfaceDialer, network string, destination M.Socksaddr, destinationAddresses []netip.Addr, preferIPv6 bool, strategy *C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.Conn, error)

func DialSerialNetwork added in v1.11.0

func DialSerialNetwork(ctx context.Context, dialer N.Dialer, network string, destination M.Socksaddr, destinationAddresses []netip.Addr, strategy *C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.Conn, error)

func DialSlowContext added in v1.1.0

func DialSlowContext(dialer *tcpDialer, ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func ListenSerialNetworkPacket added in v1.11.0

func ListenSerialNetworkPacket(ctx context.Context, dialer N.Dialer, destination M.Socksaddr, destinationAddresses []netip.Addr, strategy *C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.PacketConn, netip.Addr, error)

func New

func New(ctx context.Context, options option.DialerOptions, remoteIsDomain bool) (N.Dialer, error)

func NewDefaultOutbound added in v1.11.0

func NewDefaultOutbound(ctx context.Context) N.Dialer

func NewDetour

func NewDetour(outboundManager adapter.OutboundManager, detour string) N.Dialer

Types

type DefaultDialer

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

func NewDefault

func NewDefault(ctx context.Context, options option.DialerOptions) (*DefaultDialer, error)

func (*DefaultDialer) DialContext

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

func (*DefaultDialer) DialParallelInterface added in v1.11.0

func (d *DefaultDialer) DialParallelInterface(ctx context.Context, network string, address M.Socksaddr, strategy *C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.Conn, error)

func (*DefaultDialer) ListenPacket

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

func (*DefaultDialer) ListenPacketCompat added in v1.8.0

func (d *DefaultDialer) ListenPacketCompat(network, address string) (net.PacketConn, error)

func (*DefaultDialer) ListenSerialInterfacePacket added in v1.11.0

func (d *DefaultDialer) ListenSerialInterfacePacket(ctx context.Context, destination M.Socksaddr, strategy *C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.PacketConn, error)

type DefaultOutboundDialer added in v1.11.0

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

func (*DefaultOutboundDialer) DialContext added in v1.11.0

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

func (*DefaultOutboundDialer) ListenPacket added in v1.11.0

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

func (*DefaultOutboundDialer) Upstream added in v1.11.0

func (d *DefaultOutboundDialer) Upstream() any

type DetourDialer

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

func (*DetourDialer) DialContext

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

func (*DetourDialer) Dialer

func (d *DetourDialer) Dialer() (N.Dialer, error)

func (*DetourDialer) ListenPacket

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

func (*DetourDialer) Start

func (d *DetourDialer) Start() error

func (*DetourDialer) Upstream

func (d *DetourDialer) Upstream() any

type ParallelInterfaceDialer added in v1.11.0

type ParallelInterfaceDialer interface {
	N.Dialer
	DialParallelInterface(ctx context.Context, network string, destination M.Socksaddr, strategy *C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.Conn, error)
	ListenSerialInterfacePacket(ctx context.Context, destination M.Socksaddr, strategy *C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.PacketConn, error)
}

type ParallelInterfaceResolveDialer

type ParallelInterfaceResolveDialer interface {
	ParallelInterfaceDialer
	QueryOptions() adapter.DNSQueryOptions
}

func NewResolveParallelInterfaceDialer added in v1.11.0

func NewResolveParallelInterfaceDialer(ctx context.Context, dialer ParallelInterfaceDialer, parallel bool, queryOptions adapter.DNSQueryOptions, fallbackDelay time.Duration) ParallelInterfaceResolveDialer

type ParallelNetworkDialer added in v1.11.0

type ParallelNetworkDialer interface {
	DialParallelNetwork(ctx context.Context, network string, destination M.Socksaddr, destinationAddresses []netip.Addr, strategy *C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.Conn, error)
	ListenSerialNetworkPacket(ctx context.Context, destination M.Socksaddr, destinationAddresses []netip.Addr, strategy *C.NetworkStrategy, interfaceType []C.InterfaceType, fallbackInterfaceType []C.InterfaceType, fallbackDelay time.Duration) (net.PacketConn, netip.Addr, error)
}

type ResolveDialer

type ResolveDialer interface {
	N.Dialer
	QueryOptions() adapter.DNSQueryOptions
}

func NewResolveDialer

func NewResolveDialer(ctx context.Context, dialer N.Dialer, parallel bool, queryOptions adapter.DNSQueryOptions, fallbackDelay time.Duration) ResolveDialer

type WireGuardListener added in v1.8.0

type WireGuardListener interface {
	ListenPacketCompat(network, address string) (net.PacketConn, error)
}

Jump to

Keyboard shortcuts

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