dialer

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConnectivityTestFailedErr = fmt.Errorf("connectivity test failed")
	UnexpectedFieldErr        = fmt.Errorf("unexpected field")
	InvalidParameterErr       = fmt.Errorf("invalid parameters")
)
View Source
var FullconeDirect = NewDirect(true)
View Source
var SymmetricDirect = NewDirect(false)

Functions

func FromClashRegister

func FromClashRegister(name string, creator FromClashCreator)

func FromLinkRegister

func FromLinkRegister(name string, creator FromLinkCreator)

func NewDirect

func NewDirect(fullCone bool) proxy.Dialer

Types

type ContextDialer

type ContextDialer struct {
	Dialer proxy.Dialer
}

func (*ContextDialer) DialContext

func (d *ContextDialer) DialContext(ctx context.Context, network, addr string) (c net.Conn, err error)

type Dialer

type Dialer struct {
	proxy.Dialer
	// contains filtered or unexported fields
}

func NewDialer

func NewDialer(dialer proxy.Dialer, supportUDP bool, name string, protocol string, link string) *Dialer

func NewFromClash

func NewFromClash(clashObj *yaml.Node) (dialer *Dialer, err error)
func NewFromLink(name string, link string) (dialer *Dialer, err error)
func (d *Dialer) Link() string

func (*Dialer) Name

func (d *Dialer) Name() string

func (*Dialer) Protocol

func (d *Dialer) Protocol() string

func (*Dialer) SupportUDP

func (d *Dialer) SupportUDP() bool

func (*Dialer) Test

func (d *Dialer) Test(ctx context.Context) (bool, error)

type FromClashCreator

type FromClashCreator func(clashObj *yaml.Node) (dialer *Dialer, err error)

type FromLinkCreator

type FromLinkCreator func(link string) (dialer *Dialer, err error)

Directories

Path Synopsis
transport
tls
ws

Jump to

Keyboard shortcuts

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