MCPcopy Create free account
hub / github.com/Le0nsec/SecCrawler / proxyClient

Function proxyClient

utils/utils.go:47–58  ·  view source on GitHub ↗
(timeout uint8)

Source from the content-addressed store, hash-verified

45}
46
47func proxyClient(timeout uint8) *http.Client {
48 proxy := func(_ *http.Request) (*url.URL, error) {
49 return url.Parse(config.Cfg.Proxy.ProxyUrl)
50 }
51
52 transport := &http.Transport{Proxy: proxy}
53 client := &http.Client{
54 Transport: transport,
55 Timeout: time.Duration(timeout) * time.Second,
56 }
57 return client
58}
59
60func CrawlerClient() *http.Client {
61 if config.Cfg.Proxy.CrawlerProxyEnabled {

Callers 2

CrawlerClientFunction · 0.85
BotClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected