client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultSelector is the default client selector.
	DefaultSelector gosocks5.Selector = &clientSelector{}
)

Functions

func Dial

func Dial(addr string, options ...DialOption) (net.Conn, error)

Dial connects to the SOCKS5 server.

func DialContext added in v0.0.3

func DialContext(ctx context.Context, addr string, options ...DialOption) (net.Conn, error)

DialContext connects to the SOCKS5 server with the given context.

func NewClientSelector

func NewClientSelector(user *url.Userinfo, methods ...uint8) gosocks5.Selector

Types

type DialOption

type DialOption func(opts *DialOptions)

DialOption allows a common way to set dial options.

func SelectorDialOption

func SelectorDialOption(selector gosocks5.Selector) DialOption

func TimeoutDialOption

func TimeoutDialOption(timeout time.Duration) DialOption

type DialOptions

type DialOptions struct {
	Selector gosocks5.Selector
	Timeout  time.Duration
}

DialOptions describes the options for Transporter.Dial.

Jump to

Keyboard shortcuts

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