{"record":{"id":"ed2d05eacb90133f","repo":"txthinking/brook","slug":"can-not-fetch-addr","errorCode":null,"errorMessage":"Can not fetch ${addr}","messagePattern":"Can not fetch (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"list.go","lineNumber":175,"sourceCode":"\t\t\t\t\th, p, err := net.SplitHostPort(addr)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\ts, err := Resolve6(h)\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\tc, err := net.Dial(network, net.JoinHostPort(s, p))\n\t\t\t\t\t\tif err == nil {\n\t\t\t\t\t\t\treturn c, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ts, err = Resolve4(h)\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\tc, err := net.Dial(network, net.JoinHostPort(s, p))\n\t\t\t\t\t\tif err == nil {\n\t\t\t\t\t\t\treturn c, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn nil, errors.New(\"Can not fetch \" + addr)\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t\tr, err := c.Get(url)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer r.Body.Close()\n\t\tdata, err = io.ReadAll(r.Body)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif !strings.HasPrefix(url, \"http://\") && !strings.HasPrefix(url, \"https://\") {\n\t\tdata, err = os.ReadFile(url)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/txthinking/brook/blob/5cd13ef3b1fb574e88ebf2c1b5d95f2ebe1342c8/list.go#L157-L193","documentation":"Sentinel failure of the custom dialer used when fetching remote lists (e.g. block/bypass domain lists): both Resolve6 and Resolve4 failed to resolve the host of addr, or every resolved dial attempt failed, so the HTTP fetch of the URL cannot proceed. The input at fault is addr (host:port) whose host is unresolvable or unreachable through the configured proxy path.","triggerScenarios":"Thrown at list.go:175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify DNS resolution works for the host in addr","Check network/proxy connectivity to the target","Retry later if the failure is transient, or fetch the list via a plain (non-proxied) path"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5cd13ef3b1fb574e88ebf2c1b5d95f2ebe1342c8","analyzedAt":"2026-09-06T04:35:00.432Z","contentChangedAt":"2026-09-06T04:35:00.432Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}