shadow1ng/fscan · error

webscan_http_client_init_failed

webscan_http_client_init_failed

Error message

webscan_http_client_init_failed: %w

What it means

Guard in Inithttp: InitHTTPClient (client construction plus proxy/timeout configuration) returned an error, so the shared web-scan HTTP clients (redirect, no-redirect, GM variants) were never populated and any subsequent web scanning would use nil clients.

Source

Thrown at webscan/lib/Client.go:58

	ClientNoRedirect   *http.Client      // 不自动跟随重定向的HTTP客户端
	ClientGM           *http.Client      // 国密TLS HTTP客户端
	ClientNoRedirectGM *http.Client      // 国密TLS 不跟随重定向
	dialTimeout        = 5 * time.Second // 连接超时时间
	keepAlive          = 5 * time.Second // 连接保持时间
)

// Inithttp 初始化HTTP客户端配置
func Inithttp(cfg *common.Config) error {
	// 获取POC并发数,默认20
	pocNum := cfg.POC.Num
	if pocNum == 0 {
		pocNum = 20
	}

	// 初始化HTTP客户端
	err := InitHTTPClient(pocNum, cfg.Network.HTTPProxy, cfg.Network.WebTimeout, cfg.Network.MaxRedirects, &cfg.Network)
	if err != nil {
		return fmt.Errorf("%s: %w", i18n.GetText("webscan_http_client_init_failed"), err)
	}
	return nil
}

// configureHTTPProxy 统一配置HTTP代理(SOCKS5优先于HTTP代理)
func configureHTTPProxy(tr *http.Transport, legacyProxy string, networkConfig *common.NetworkConfig) error {
	// 优先使用SOCKS5代理(与服务扫描保持一致)
	if networkConfig.Socks5Proxy != "" {
		proxyConfig := &proxy.ProxyConfig{
			Type:    proxy.ProxyTypeSOCKS5,
			Timeout: time.Second * 10,
		}

		// 解析SOCKS5 URL以提取认证信息
		socks5URL := networkConfig.Socks5Proxy
		if !strings.HasPrefix(socks5URL, "socks5://") {
			socks5URL = "socks5://" + socks5URL
		}

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Inspect the wrapped error to see if proxy configuration or transport creation failed
  2. Fix the proxy settings in the network config
  3. Retry initialization after correcting configuration
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at webscan/lib/Client.go:58 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06). Data as JSON: /api/errors/c9f7e8d4d16266eb. Report an issue: GitHub.