MCPcopy
hub / github.com/shadow1ng/fscan / Inithttp

Function Inithttp

webscan/lib/Client.go:39–52  ·  view source on GitHub ↗

Inithttp 初始化HTTP客户端配置

(cfg *common.Config)

Source from the content-addressed store, hash-verified

37
38// Inithttp 初始化HTTP客户端配置
39func Inithttp(cfg *common.Config) error {
40 // 获取POC并发数,默认20
41 pocNum := cfg.POC.Num
42 if pocNum == 0 {
43 pocNum = 20
44 }
45
46 // 初始化HTTP客户端
47 err := InitHTTPClient(pocNum, cfg.Network.HTTPProxy, cfg.Network.WebTimeout, cfg.Network.MaxRedirects, &cfg.Network)
48 if err != nil {
49 return fmt.Errorf("HTTP客户端初始化失败: %w", err)
50 }
51 return nil
52}
53
54// configureHTTPProxy 统一配置HTTP代理(SOCKS5优先于HTTP代理)
55func configureHTTPProxy(tr *http.Transport, legacyProxy string, networkConfig *common.NetworkConfig) error {

Callers 1

RunScanFunction · 0.92

Calls 1

InitHTTPClientFunction · 0.85

Tested by

no test coverage detected