{"record":{"id":"b22891abc31f9cc6","repo":"txthinking/brook","slug":"bypassdomainlist-must-be-with-absolute-path","errorCode":null,"errorMessage":"--bypassDomainList must be with absolute path","messagePattern":"--bypassDomainList must be with absolute path","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/brook/main.go","lineNumber":1478,"sourceCode":"\t\t\t\t\tName:  \"udpTimeout\",\n\t\t\t\t\tValue: 60,\n\t\t\t\t\tUsage: \"time (s)\",\n\t\t\t\t},\n\t\t\t\t&cli.BoolFlag{\n\t\t\t\t\tName:  \"example\",\n\t\t\t\t\tUsage: \"Show a minimal example of usage\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tAction: func(c *cli.Context) error {\n\t\t\t\tif c.Bool(\"example\") {\n\t\t\t\t\tfmt.Println(\"brook dnsserveroverbrook --server 1.2.3.4:9999 --password hello --listen 127.0.0.1:53\")\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\tif c.String(\"listen\") == \"\" || (c.String(\"server\") == \"\" && c.String(\"link\") == \"\") {\n\t\t\t\t\treturn cli.ShowSubcommandHelp(c)\n\t\t\t\t}\n\t\t\t\tif c.String(\"bypassDomainList\") != \"\" && !strings.HasPrefix(c.String(\"bypassDomainList\"), \"http://\") && !strings.HasPrefix(c.String(\"bypassDomainList\"), \"https://\") && !filepath.IsAbs(c.String(\"bypassDomainList\")) {\n\t\t\t\t\treturn errors.New(\"--bypassDomainList must be with absolute path\")\n\t\t\t\t}\n\t\t\t\tif c.String(\"blockDomainList\") != \"\" && !strings.HasPrefix(c.String(\"blockDomainList\"), \"http://\") && !strings.HasPrefix(c.String(\"blockDomainList\"), \"https://\") && !filepath.IsAbs(c.String(\"blockDomainList\")) {\n\t\t\t\t\treturn errors.New(\"--blockDomainList must be with absolute path\")\n\t\t\t\t}\n\t\t\t\tif c.String(\"blockDomainList\") != \"\" || c.String(\"bypassDomainList\") != \"\" || c.Bool(\"disableA\") || c.Bool(\"disableAAAA\") {\n\t\t\t\t\tp, err := thedns.NewTheDNS(c.String(\"blockDomainList\"), c.String(\"bypassDomainList\"), c.String(\"dnsForBypass\"), c.Bool(\"disableA\"), c.Bool(\"disableAAAA\"), \"\")\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tp.TouchBrook()\n\t\t\t\t}\n\t\t\t\tvar link = \"\"\n\t\t\t\tif c.String(\"server\") != \"\" {\n\t\t\t\t\tkind := \"server\"\n\t\t\t\t\tif strings.HasPrefix(c.String(\"server\"), \"ws://\") {\n\t\t\t\t\t\tkind = \"wsserver\"\n\t\t\t\t\t}\n\t\t\t\t\tif strings.HasPrefix(c.String(\"server\"), \"wss://\") {","sourceCodeStart":1460,"sourceCodeEnd":1496,"githubUrl":"https://github.com/txthinking/brook/blob/5cd13ef3b1fb574e88ebf2c1b5d95f2ebe1342c8/cli/brook/main.go#L1460-L1496","documentation":"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.","triggerScenarios":"Thrown at cli/brook/main.go:1478 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass an absolute path, e.g. --bypassDomainList /etc/brook/bypass.txt","Use an http:// or https:// URL if the list is served remotely"],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}