proxy

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddrIsNULL = errors.New("ip and port cannot be empty")

Functions

func HttpProxyDialerWithTimeout added in v0.2.0

func HttpProxyDialerWithTimeout(proxyAddr string, timeout time.Duration) fasthttp.DialFunc

func IsProxyInvalid added in v0.2.0

func IsProxyInvalid(err error) (string, bool)

func Socks5ProxyDialer added in v0.2.0

func Socks5ProxyDialer(proxyAddr string) fasthttp.DialFunc

Types

type ErrCode added in v0.2.0

type ErrCode uint8
const (
	ErrWrongFormatCode ErrCode = iota
	ErrUnknownProtocolCode
	ErrProxyExpiredCode
	ErrOnlyOneProxyIPCode
	ErrUnkownProxyIPCode
	ErrIPOrPortIsNullCode
	ErrEmptyProxyPoolCode
	ErrUnableToConnectCode
	ErrInvalidProxyCode
)

func (ErrCode) String added in v0.2.0

func (ec ErrCode) String() string

type ProxyErr added in v0.2.0

type ProxyErr struct {
	Code ErrCode
	Args map[string]string
	Msg  string
}

func (ProxyErr) Error added in v0.2.0

func (pe ProxyErr) Error() string

Jump to

Keyboard shortcuts

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