txthinking/brook · error

Can not fetch ${addr}

Error message

Can not fetch ${addr}

What it means

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.

Source

Thrown at list.go:175

					h, p, err := net.SplitHostPort(addr)
					if err != nil {
						return nil, err
					}
					s, err := Resolve6(h)
					if err == nil {
						c, err := net.Dial(network, net.JoinHostPort(s, p))
						if err == nil {
							return c, nil
						}
					}
					s, err = Resolve4(h)
					if err == nil {
						c, err := net.Dial(network, net.JoinHostPort(s, p))
						if err == nil {
							return c, nil
						}
					}
					return nil, errors.New("Can not fetch " + addr)
				},
			},
		}
		r, err := c.Get(url)
		if err != nil {
			return nil, err
		}
		defer r.Body.Close()
		data, err = io.ReadAll(r.Body)
		if err != nil {
			return nil, err
		}
	}
	if !strings.HasPrefix(url, "http://") && !strings.HasPrefix(url, "https://") {
		data, err = os.ReadFile(url)
		if err != nil {
			return nil, err
		}

View on GitHub (pinned to 5cd13ef3b1)

Solutions

  1. Verify DNS resolution works for the host in addr
  2. Check network/proxy connectivity to the target
  3. Retry later if the failure is transient, or fetch the list via a plain (non-proxied) path
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at list.go:175 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of txthinking/brook@5cd13ef3b1 (2026-09-06). Data as JSON: /api/errors/ed2d05eacb90133f. Report an issue: GitHub.