dialer

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: GPL-2.0 Imports: 21 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

func NewDetour

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

func NewResolvePacketConn

func NewResolvePacketConn(ctx context.Context, router adapter.Router, strategy dns.DomainStrategy, conn net.PacketConn) N.NetPacketConn

func NewRouter

func NewRouter(router adapter.Router) N.Dialer

func NewTLS

func NewTLS(dialer N.Dialer, serverAddress string, options option.OutboundTLSOptions) (N.Dialer, error)

func TLSClient added in v1.0.1

func TLSClient(ctx context.Context, conn net.Conn, tlsConfig *tls.Config) (*tls.Conn, error)

func TLSConfig added in v1.0.1

func TLSConfig(serverAddress string, options option.OutboundTLSOptions) (*tls.Config, error)

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

type ResolvePacketConn struct {
	net.PacketConn
	// contains filtered or unexported fields
}

func (*ResolvePacketConn) ReadPacket

func (w *ResolvePacketConn) ReadPacket(buffer *buf.Buffer) (M.Socksaddr, error)

func (*ResolvePacketConn) Upstream

func (w *ResolvePacketConn) Upstream() any

func (*ResolvePacketConn) WritePacket

func (w *ResolvePacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error

type ResolveUDPConn

type ResolveUDPConn struct {
	*net.UDPConn
	// contains filtered or unexported fields
}

func (*ResolveUDPConn) ReadPacket

func (w *ResolveUDPConn) ReadPacket(buffer *buf.Buffer) (M.Socksaddr, error)

func (*ResolveUDPConn) Upstream

func (w *ResolveUDPConn) Upstream() any

func (*ResolveUDPConn) WritePacket

func (w *ResolveUDPConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error

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

type TLSDialer

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

func (*TLSDialer) DialContext

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

func (*TLSDialer) ListenPacket

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

Jump to

Keyboard shortcuts

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