shadow1ng/fscan · error

webscan_proxy_url_parse_failed

webscan_proxy_url_parse_failed

Error message

webscan_proxy_url_parse_failed: %w

What it means

Guard in configureHTTPProxy: the scheme passed validation but url.Parse rejected the proxy URL (malformed host, bad escapes, bad credentials). The transport cannot be configured with an unparseable proxy address.

Source

Thrown at webscan/lib/Client.go:124

	if httpProxyURL != "" {
		// 处理快捷代理配置
		if httpProxyURL == ProxyShortcutBurp {
			httpProxyURL = ProxyBurpURL
		} else if httpProxyURL == ProxyShortcutSocks5 {
			httpProxyURL = ProxySocks5URL
		} else if !strings.Contains(httpProxyURL, "://") {
			httpProxyURL = normalizeHTTPProxyURL(httpProxyURL)
		}

		// 验证代理类型
		if !strings.HasPrefix(httpProxyURL, "socks5://") && !strings.HasPrefix(httpProxyURL, "http://") && !strings.HasPrefix(httpProxyURL, "https://") {
			return fmt.Errorf("%s: %s", i18n.GetText("webscan_unsupported_proxy_type"), httpProxyURL)
		}

		// 解析代理URL
		parsedURL, err := url.Parse(httpProxyURL)
		if err != nil {
			return fmt.Errorf("%s: %w", i18n.GetText("webscan_proxy_url_parse_failed"), err)
		}
		tr.Proxy = http.ProxyURL(parsedURL)
		return nil
	}

	// 无代理配置
	return nil
}

func normalizeHTTPProxyURL(proxyURL string) string {
	if _, err := strconv.Atoi(proxyURL); err == nil {
		return "http://127.0.0.1:" + proxyURL
	}
	return "http://" + proxyURL
}

// InitHTTPClient 创建HTTP客户端
func InitHTTPClient(ThreadsNum int, DownProxy string, Timeout time.Duration, maxRedirects int, networkConfig *common.NetworkConfig) error {

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Correct syntax errors in the proxy URL (port, userinfo escaping, IPv6 brackets)
  2. URL-encode special characters in the proxy password
  3. Test the URL with a standard HTTP client
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at webscan/lib/Client.go:124 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/5cf3547c62a3d650. Report an issue: GitHub.