Documentation
¶
Index ¶
- Constants
- func DomainOf(url string) (domain string)
- func HTTPGet(link string, headers map[string]string, px *types.ProxyServer, ...) (res *http.Response, e error)
- func HTTPGetResponse(link string, headers map[string]string, useMasterProxy, rotateAgent bool) (res *http.Response, e error)
- func PickGlobalProxy() (proxy *types.ProxyServer, e error)
- func PickProxy() (proxy *types.ProxyServer, e error)
- func UpdateProxyScore(p *types.ProxyServer, success bool)
- func UpdateProxyScoreGlobal(p *types.ProxyServer, success bool)
- func ValidateProxy(stype, host, port, link, keyword string, probeTimeout int) bool
Constants ¶
View Source
const RETRY int = 3
Variables ¶
This section is empty.
Functions ¶
func HTTPGet ¶
func HTTPGet(link string, headers map[string]string, px *types.ProxyServer, cookies ...*http.Cookie) (res *http.Response, e error)
HTTPGet initiates HTTP get request and returns its response
func HTTPGetResponse ¶
func HTTPGetResponse(link string, headers map[string]string, useMasterProxy, rotateAgent bool) (res *http.Response, e error)
HTTPGetResponse initiates HTTP get request and returns its response
func PickGlobalProxy ¶
func PickGlobalProxy() (proxy *types.ProxyServer, e error)
PickGlobalProxy randomly chooses a global proxy from database.
func PickProxy ¶
func PickProxy() (proxy *types.ProxyServer, e error)
PickProxy randomly chooses a proxy from database.
func UpdateProxyScore ¶
func UpdateProxyScore(p *types.ProxyServer, success bool)
UpdateProxyScore for the specified proxy.
func UpdateProxyScoreGlobal ¶
func UpdateProxyScoreGlobal(p *types.ProxyServer, success bool)
UpdateProxyScoreGlobal updates globa score for the specified proxy.
func ValidateProxy ¶
ValidateProxy checks the status of remote listening port, and further checks if it's a valid proxy server
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.