{"record":{"id":"d6b5e7c909190940","repo":"XTLS/Xray-core","slug":"cannot-understand-address","errorCode":null,"errorMessage":"cannot understand address","messagePattern":"cannot understand address","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/geodata/download.go","lineNumber":75,"sourceCode":"\nfunc newDownloader(ctx context.Context, dispatcher routing.Dispatcher, outbound string) *downloader {\n\treturn &downloader{\n\t\tctx:         ctx,\n\t\thttpClient:  newClient(ctx, dispatcher, outbound, false),\n\t\thttpsClient: newClient(ctx, dispatcher, outbound, true),\n\t}\n}\n\nfunc newClient(baseCtx context.Context, dispatcher routing.Dispatcher, outbound string, isHTTPS bool) *http.Client {\n\tdial := func(ctx context.Context, network, address string) (net.Conn, error) {\n\t\tvar conn net.Conn\n\t\terr := task.Run(ctx, func() error {\n\t\t\tif tagged.Dialer == nil {\n\t\t\t\treturn errors.New(\"tagged dialer is not initialized\")\n\t\t\t}\n\t\t\tdest, err := net.ParseDestination(network + \":\" + address)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.New(\"cannot understand address\").Base(err)\n\t\t\t}\n\t\t\tc, err := tagged.Dialer(baseCtx, dispatcher, dest, outbound)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.New(\"cannot dial remote address \", dest).Base(err)\n\t\t\t}\n\t\t\tconn = c\n\t\t\treturn nil\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, errors.New(\"cannot finish connection\").Base(err)\n\t\t}\n\t\treturn &idleConn{\n\t\t\tConn: conn,\n\t\t}, nil\n\t}\n\tif isHTTPS {\n\t\treturn &http.Client{\n\t\t\tTransport: &http2.Transport{","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/app/geodata/download.go#L57-L93","documentation":"The geodata downloader's custom HTTP dialer joins network and address into one string and passes it to net.ParseDestination; if that parse fails the destination is un-understandable and dialing cannot proceed. It wraps the underlying parse error with .Base(err).","triggerScenarios":"http.Client invokes DialContext with an address that is not host:port (or a network scheme net.ParseDestination rejects), e.g. a URL whose authority lacks a port while using the plain http branch, or an address with unexpected formatting.","commonSituations":"Misconfigured geodata asset URL (e.g. 'geosite.dat' without scheme/host parsed into a bogus address); unusual proxy environment rewriting addresses; a bug in whatever constructed the request URL.","solutions":["Verify the geodata asset URLs in config are fully qualified, e.g. https://raw.githubusercontent.com/.../geosite.dat","Print the underlying Base error to see exactly which string failed to parse, then fix the URL that produced it","Check that no outbound/tagged dialer middleware is rewriting the destination address"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate asset URLs before handing them to the downloader:\nu, err := url.Parse(assetURL)\nif err != nil || u.Host == \"\" {\n    return fmt.Errorf(\"invalid geodata asset URL: %s\", assetURL)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always configure fully qualified https:// asset URLs","Lint geodata asset entries in config validation pipelines","Log the chained Base error to capture the exact string ParseDestination rejected"],"tags":["network","geodata","address-parsing","download"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}