{"record":{"id":"5cf3547c62a3d650","repo":"shadow1ng/fscan","slug":"webscan-proxy-url-parse-failed","errorCode":"webscan_proxy_url_parse_failed","errorMessage":"webscan_proxy_url_parse_failed: %w","messagePattern":"webscan_proxy_url_parse_failed: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"webscan/lib/Client.go","lineNumber":124,"sourceCode":"\tif httpProxyURL != \"\" {\n\t\t// 处理快捷代理配置\n\t\tif httpProxyURL == ProxyShortcutBurp {\n\t\t\thttpProxyURL = ProxyBurpURL\n\t\t} else if httpProxyURL == ProxyShortcutSocks5 {\n\t\t\thttpProxyURL = ProxySocks5URL\n\t\t} else if !strings.Contains(httpProxyURL, \"://\") {\n\t\t\thttpProxyURL = normalizeHTTPProxyURL(httpProxyURL)\n\t\t}\n\n\t\t// 验证代理类型\n\t\tif !strings.HasPrefix(httpProxyURL, \"socks5://\") && !strings.HasPrefix(httpProxyURL, \"http://\") && !strings.HasPrefix(httpProxyURL, \"https://\") {\n\t\t\treturn fmt.Errorf(\"%s: %s\", i18n.GetText(\"webscan_unsupported_proxy_type\"), httpProxyURL)\n\t\t}\n\n\t\t// 解析代理URL\n\t\tparsedURL, err := url.Parse(httpProxyURL)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"%s: %w\", i18n.GetText(\"webscan_proxy_url_parse_failed\"), err)\n\t\t}\n\t\ttr.Proxy = http.ProxyURL(parsedURL)\n\t\treturn nil\n\t}\n\n\t// 无代理配置\n\treturn nil\n}\n\nfunc normalizeHTTPProxyURL(proxyURL string) string {\n\tif _, err := strconv.Atoi(proxyURL); err == nil {\n\t\treturn \"http://127.0.0.1:\" + proxyURL\n\t}\n\treturn \"http://\" + proxyURL\n}\n\n// InitHTTPClient 创建HTTP客户端\nfunc InitHTTPClient(ThreadsNum int, DownProxy string, Timeout time.Duration, maxRedirects int, networkConfig *common.NetworkConfig) error {","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/webscan/lib/Client.go#L106-L142","documentation":"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.","triggerScenarios":"Thrown at webscan/lib/Client.go:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct syntax errors in the proxy URL (port, userinfo escaping, IPv6 brackets)","URL-encode special characters in the proxy password","Test the URL with a standard HTTP client"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}