dialer

package
v0.0.0-...-890cd7e Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialSlowContext

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

func New

func New(router adapter.Router, options option.DialerOptions) N.Dialer

func NewDetour

func NewDetour(router adapter.Router, detour string) N.Dialer

func NewRouter

func NewRouter(router adapter.Router) N.Dialer

func RedirectDialerFrom

func RedirectDialerFrom(ctx context.Context) N.Dialer

RedirectDialerFrom returns the redirecting dialer from context.

func WithRedirectDialer

func WithRedirectDialer(ctx context.Context, dialer N.Dialer) context.Context

WithRedirectDialer attaches a redirecting dialer to context.

Types

type DefaultDialer

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

func NewDefault

func NewDefault(router adapter.Router, options option.DialerOptions) *DefaultDialer

func (*DefaultDialer) DialContext

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

func (*DefaultDialer) ListenPacket

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

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 RedirectableDialer

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

RedirectableDialer is a dialer that can be redirected.

func NewRedirectable

func NewRedirectable(dialer N.Dialer) *RedirectableDialer

NewRedirectable returns a redirectable dialer.

func (*RedirectableDialer) DialContext

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

DialContext implements N.Dialer.

func (*RedirectableDialer) ListenPacket

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

ListenPacket implements N.Dialer.

type ResolveDialer

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

func NewResolveDialer

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

func (*ResolveDialer) DialContext

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

func (*ResolveDialer) ListenPacket

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

func (*ResolveDialer) Upstream

func (d *ResolveDialer) Upstream() any

type RouterDialer

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

func (*RouterDialer) DialContext

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

func (*RouterDialer) ListenPacket

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

func (*RouterDialer) Upstream

func (d *RouterDialer) Upstream() any

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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