dialer

package
v1.11.0-alpha.15 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: GPL-2.0 Imports: 22 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WgControlFns []control.Func

Functions

func DialParallelNetwork

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

func DialSerialNetwork(ctx context.Context, dialer ParallelInterfaceDialer, 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

func ListenSerialNetworkPacket(ctx context.Context, dialer ParallelInterfaceDialer, 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) (N.Dialer, error)

func NewDefaultOutbound

func NewDefaultOutbound(outboundManager adapter.OutboundManager) N.Dialer

func NewDetour

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

func NewResolveDialer

func NewResolveDialer(router adapter.Router, dialer N.Dialer, parallel bool, strategy dns.DomainStrategy, fallbackDelay time.Duration) N.Dialer

Types

type DefaultDialer

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

func NewDefault

func NewDefault(networkManager adapter.NetworkManager, 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

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

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

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

func (*DefaultOutboundDialer) DialContext

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

func (*DefaultOutboundDialer) ListenPacket

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

func (*DefaultOutboundDialer) Upstream

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

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

func NewResolveParallelInterfaceDialer

func NewResolveParallelInterfaceDialer(router adapter.Router, dialer ParallelInterfaceDialer, parallel bool, strategy dns.DomainStrategy, fallbackDelay time.Duration) ParallelInterfaceDialer

type ParallelNetworkDialer

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