dialer

package
v1.12.4 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: GPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WgControlFns []control.Func

Functions

func DialParallelNetwork added in v1.12.4

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.12.4

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

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

func InitializeDetour added in v1.12.4

func InitializeDetour(dialer N.Dialer) error

func ListenSerialNetworkPacket added in v1.12.4

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)

TODO: merge with NewWithOptions

func NewDefaultOutbound added in v1.12.4

func NewDefaultOutbound(ctx context.Context) N.Dialer

func NewDetour

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

func NewWithOptions added in v1.12.4

func NewWithOptions(options Options) (N.Dialer, error)

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.12.4

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

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

func (*DefaultDialer) ListenSerialInterfacePacket added in v1.12.4

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.12.4

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

func (*DefaultOutboundDialer) DialContext added in v1.12.4

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

func (*DefaultOutboundDialer) ListenPacket added in v1.12.4

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

func (*DefaultOutboundDialer) Upstream added in v1.12.4

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) Upstream

func (d *DetourDialer) Upstream() any

type DirectDialer added in v1.12.4

type DirectDialer interface {
	IsEmpty() bool
}

type Options added in v1.12.4

type Options struct {
	Context          context.Context
	Options          option.DialerOptions
	RemoteIsDomain   bool
	DirectResolver   bool
	ResolverOnDetour bool
	NewDialer        bool
	LegacyDNSDialer  bool
	DirectOutbound   bool
}

type ParallelInterfaceDialer added in v1.12.4

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 added in v1.12.4

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

type ParallelNetworkDialer added in v1.12.4

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, server string, queryOptions adapter.DNSQueryOptions, fallbackDelay time.Duration) ResolveDialer

type WireGuardListener

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