{"record":{"id":"71de0190d7f12175","repo":"projectdiscovery/nuclei","slug":"could-not-open-proxy-file-w","errorCode":null,"errorMessage":"could not open proxy file: %w","messagePattern":"could not open proxy file: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/runner/proxy.go","lineNumber":30,"sourceCode":"\tfileutil \"github.com/projectdiscovery/utils/file\"\n\tproxyutils \"github.com/projectdiscovery/utils/proxy\"\n)\n\nconst (\n\tHTTP_PROXY_ENV = \"HTTP_PROXY\"\n)\n\n// loadProxyServers load list of proxy servers from file or comma separated\nfunc loadProxyServers(options *types.Options) error {\n\tif len(options.Proxy) == 0 {\n\t\treturn nil\n\t}\n\tproxyList := []string{}\n\tfor _, p := range options.Proxy {\n\t\tif fileutil.FileExists(p) {\n\t\t\tfile, err := os.Open(p)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"could not open proxy file: %w\", err)\n\t\t\t}\n\t\t\tdefer func() {\n\t\t\t\t_ = file.Close()\n\t\t\t}()\n\t\t\tscanner := bufio.NewScanner(file)\n\t\t\tfor scanner.Scan() {\n\t\t\t\tproxy := scanner.Text()\n\t\t\t\tif strings.TrimSpace(proxy) == \"\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tproxyList = append(proxyList, proxy)\n\t\t\t}\n\t\t} else {\n\t\t\tproxyList = append(proxyList, p)\n\t\t}\n\t}\n\taliveProxy, err := proxyutils.GetAnyAliveProxy(options.Timeout, proxyList...)\n\tif err != nil {","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/internal/runner/proxy.go#L12-L48","documentation":"Error \"could not open proxy file: %w\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at internal/runner/proxy.go:30 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}