client

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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