Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ProxyTypes = []string{"http", "socks5", "socks4", "socks4a"}
)
Functions ¶
func ClientFromProxy ¶
ClientFromProxy returns a http.Client with the transport set Proxy types are http, socks4, socks4a, socks5
func ClientFromTransport ¶
ClientFromTransport returns a http.Client with the transport set
Types ¶
type ProxyManager ¶
func NewProxyManager ¶
func NewProxyManager() ProxyManager
NewProxyManager returns a new ProxyManager
func (*ProxyManager) GetRandomProxy ¶
func (pm *ProxyManager) GetRandomProxy() Proxy
GetRandomProxy returns a random proxy from the list
func (*ProxyManager) GetRandomTransport ¶
func (pm *ProxyManager) GetRandomTransport() (*http.Transport, error)
GetRandomTransport returns a transport using the GetRandomProxy function
func (*ProxyManager) LoadFromFile ¶
func (pm *ProxyManager) LoadFromFile(filename string, proxyType string) (int, error)
LoadFromFile loads a list of proxies from a file Proxy types are http, socks4, socks4a, socks5
Click to show internal directories.
Click to hide internal directories.