chain

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAtLeastOneChainDialerRequired = errors.New("at least one chain dialer is required")
)

Functions

This section is empty.

Types

type ChainDialer

type ChainDialer interface {
	Dialer
	ProxyAddress() string
}

ChainDialer represents a single proxy hop in a chain.

A ChainDialer must be able to:

  • establish a fresh connection to a target with DialContext
  • extend an existing connection to the next hop with DialConnContext

ProxyAddress must return an address suitable for dialing the proxy as the next hop in the chain, typically in host:port form.

type Dialer added in v0.1.4

type Dialer interface {
	socksnet.Dialer
	socksnet.ConnDialer
}

Dialer is a chain dialer that can either establish a new connection from scratch or extend an existing one.

func New

func New(chainDialers ...ChainDialer) (Dialer, error)

New creates a multi-hop proxy dialer from the provided chain dialers.

Jump to

Keyboard shortcuts

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