txthinking/brook · error

--bypassDomainList must be with absolute path

Error message

--bypassDomainList must be with absolute path

What it means

A startup validation guard in the dnsserveroverbrook subcommand: --bypassDomainList was given as a relative path (and not an http:// or https:// URL), so the command aborts before starting the DNS server because the bypass list must resolve unambiguously regardless of working directory. The input at fault is the relative --bypassDomainList value.

Source

Thrown at cli/brook/main.go:1478

					Name:  "udpTimeout",
					Value: 60,
					Usage: "time (s)",
				},
				&cli.BoolFlag{
					Name:  "example",
					Usage: "Show a minimal example of usage",
				},
			},
			Action: func(c *cli.Context) error {
				if c.Bool("example") {
					fmt.Println("brook dnsserveroverbrook --server 1.2.3.4:9999 --password hello --listen 127.0.0.1:53")
					return nil
				}
				if c.String("listen") == "" || (c.String("server") == "" && c.String("link") == "") {
					return cli.ShowSubcommandHelp(c)
				}
				if c.String("bypassDomainList") != "" && !strings.HasPrefix(c.String("bypassDomainList"), "http://") && !strings.HasPrefix(c.String("bypassDomainList"), "https://") && !filepath.IsAbs(c.String("bypassDomainList")) {
					return errors.New("--bypassDomainList must be with absolute path")
				}
				if c.String("blockDomainList") != "" && !strings.HasPrefix(c.String("blockDomainList"), "http://") && !strings.HasPrefix(c.String("blockDomainList"), "https://") && !filepath.IsAbs(c.String("blockDomainList")) {
					return errors.New("--blockDomainList must be with absolute path")
				}
				if c.String("blockDomainList") != "" || c.String("bypassDomainList") != "" || c.Bool("disableA") || c.Bool("disableAAAA") {
					p, err := thedns.NewTheDNS(c.String("blockDomainList"), c.String("bypassDomainList"), c.String("dnsForBypass"), c.Bool("disableA"), c.Bool("disableAAAA"), "")
					if err != nil {
						return err
					}
					p.TouchBrook()
				}
				var link = ""
				if c.String("server") != "" {
					kind := "server"
					if strings.HasPrefix(c.String("server"), "ws://") {
						kind = "wsserver"
					}
					if strings.HasPrefix(c.String("server"), "wss://") {

View on GitHub (pinned to 5cd13ef3b1)

Solutions

  1. Pass an absolute path, e.g. --bypassDomainList /etc/brook/bypass.txt
  2. Use an http:// or https:// URL if the list is served remotely
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/brook/main.go:1478 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/b22891abc31f9cc6. Report an issue: GitHub.