socksproxy

package
v4.14.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Apache-2.0 Imports: 6 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SocksProxy

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

SocksProxy holds the proxy address and wether to use it

func NewSocksProxy

func NewSocksProxy(useProxy bool, proxyAddress string) SocksProxy

NewSocksProxy returns a new socks proxy instance

func (*SocksProxy) GetHTTPClient

func (socksProxy *SocksProxy) GetHTTPClient() (*http.Client, error)

GetHTTPClient returns a http client. Requests made with this client are proxied, if useProxy is true.

func (*SocksProxy) GetTCPProxyDialer

func (socksProxy *SocksProxy) GetTCPProxyDialer() (proxy.Dialer, error)

GetTCPProxyDialer returns a tcp connection. The connection is proxied, if useProxy is true.

Jump to

Keyboard shortcuts

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