proxycheck

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

README

proxycheck

Language Golang Hex.pm codecov Go

Proxy list checker

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FeedEnd = errors.New("feed end")

Functions

func Action

func Action(c *cli.Context) error

func ProxyRequest added in v0.0.2

func ProxyRequest(target string, proxyURL *url.URL, timeout time.Duration) ([]byte, error)

ProxyRequest godoc

Performs an HTTP request through the proxy specified in the proxyUrl

Types

type AZEnvPhpJudge added in v0.0.2

type AZEnvPhpJudge struct {
}

func (AZEnvPhpJudge) TargetURL added in v0.0.2

func (j AZEnvPhpJudge) TargetURL() string

func (AZEnvPhpJudge) Timeout added in v0.0.2

func (j AZEnvPhpJudge) Timeout() time.Duration

type CheckResult added in v0.0.2

type CheckResult struct {
	Protocols []string
	Online    bool
	Err       map[string]error
	Speed     time.Duration
}

func Check added in v0.0.2

func Check(proxyAddr string, judge Judge) (result CheckResult)

type Feed added in v0.0.2

type Feed interface {
	Next() (string, error)
}

type FileFeed added in v0.0.2

type FileFeed struct {
	// contains filtered or unexported fields
}

FileFeed godoc

Proxy feed from file stream, like stdin, os file.

func NewFileFeed added in v0.0.2

func NewFileFeed(file *os.File) *FileFeed

func (FileFeed) Next added in v0.0.2

func (f FileFeed) Next() (string, error)

type Judge added in v0.0.2

type Judge interface {
	TargetURL() string
	Timeout() time.Duration
}

type SliceFeed added in v0.0.2

type SliceFeed struct {
	// contains filtered or unexported fields
}

SliceFeed godoc

Proxy feed from string slice like this []string{"108.20.30.1:500", "89.33.123.100:40", "50.73.100.1:55"}

func NewSliceFeed added in v0.0.2

func NewSliceFeed(slice []string) *SliceFeed

func (*SliceFeed) Next added in v0.0.2

func (f *SliceFeed) Next() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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