viaproxy

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: MIT Imports: 11 Imported by: 0 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.

README

Go Report Card GoDoc Build status

viaproxy

viaproxy is a proxy connection library.

It provides the interface Connector and two implementations: viaSOCKS5 and viaNoProxy.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector interface {
	AddProxyAddr(addr ...string)
	GetProxyAddr() string
	RemoveProxyAddr(addr string)
	ErrorsCount(addr string, inc bool) int
	DoRequest(method string, url string, body io.Reader, timeout time.Duration) (Response, error)
}

Connector is a proxy connector

func NewViaNoProxy

func NewViaNoProxy(headers http.Header) Connector

NewViaNoProxy returns a new proxy connector via no proxy

func NewViaSOCKS5

func NewViaSOCKS5(headers http.Header) Connector

NewViaSOCKS5 returns a new proxy connector via SOCKS5

type Response

type Response struct {
	*http.Response

	// ProxyAddr is a proxy address via which a request was performed
	ProxyAddr string
}

Response is a response for a request

Jump to

Keyboard shortcuts

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