{"record":{"id":"7605b3ad627f831a","repo":"cloudflare/cloudflared","slug":"dns-proxy-feature-is-no-longer-supported","errorCode":null,"errorMessage":"dns-proxy feature is no longer supported","messagePattern":"dns-proxy feature is no longer supported","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cloudflared/proxydns/cmd.go","lineNumber":26,"sourceCode":"\n\t\"github.com/cloudflare/cloudflared/cmd/cloudflared/cliutil\"\n\t\"github.com/cloudflare/cloudflared/logger\"\n)\n\nconst removedMessage = \"dns-proxy feature is no longer supported\"\n\nfunc Command() *cli.Command {\n\treturn &cli.Command{\n\t\tName:            \"proxy-dns\",\n\t\tAction:          cliutil.ConfiguredAction(Run),\n\t\tUsage:           removedMessage,\n\t\tSkipFlagParsing: true,\n\t}\n}\n\nfunc Run(c *cli.Context) error {\n\tlog := logger.CreateLoggerFromContext(c, logger.EnableTerminalLog)\n\terr := errors.New(removedMessage)\n\tlog.Error().Msg(\"DNS Proxy is no longer supported since version 2026.2.0 (https://developers.cloudflare.com/changelog/2025-11-11-cloudflared-proxy-dns/). As an alternative consider using https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/dns-over-https-client/\")\n\n\treturn err\n}\n\n// Old flags used by the proxy-dns command, only kept to not break any script that might be setting these flags\nfunc ConfigureProxyDNSFlags(shouldHide bool) []cli.Flag {\n\treturn []cli.Flag{\n\t\taltsrc.NewBoolFlag(&cli.BoolFlag{\n\t\t\tName: \"proxy-dns\",\n\t\t}),\n\t\taltsrc.NewIntFlag(&cli.IntFlag{\n\t\t\tName: \"proxy-dns-port\",\n\t\t}),\n\t\taltsrc.NewStringFlag(&cli.StringFlag{\n\t\t\tName: \"proxy-dns-address\",\n\t\t}),\n\t\taltsrc.NewStringSliceFlag(&cli.StringSliceFlag{","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/cmd/cloudflared/proxydns/cmd.go#L8-L44","documentation":"The `cloudflared proxy-dns` command was removed in cloudflared 2026.2.0. Run() now unconditionally logs a removal notice and returns this error so scripts relying on the old local DNS proxy fail loudly instead of silently doing nothing. It also links to Cloudflare's recommended DNS-over-HTTPS client alternative.","triggerScenarios":"Any invocation of `cloudflared proxy-dns` (with or without old flags like --upstream or --port) on version 2026.2.0 or later.","commonSituations":"Systemd/init scripts or Docker images that still start `cloudflared proxy-dns`; documentation or dotfiles carrying over the old local DNS resolver setup after upgrading cloudflared.","solutions":["Upgrade your setup to use a DNS-over-HTTPS client as recommended by Cloudflare (e.g. cloudflared's successor tooling per the changelog link).","Remove `proxy-dns` from startup scripts/systemd units and replace with the alternative DoH client.","Pin an older cloudflared version only as a temporary measure while migrating.","If you used proxy-dns alongside tunnels, run the tunnel without the removed subcommand — tunnels are unaffected."],"exampleFix":"# before (systemd unit)\nExecStart=/usr/local/bin/cloudflared proxy-dns --port 53 --upstream https://1.1.1.1/dns-query\n# after\nExecStart=/usr/local/bin/doh-client --listen 127.0.0.1:53 --upstream https://1.1.1.1/dns-query","handlingStrategy":"fallback","validationCode":"if strings.HasPrefix(args[0], \"proxy-dns\") {\n    return errors.New(\"proxy-dns was removed in 2026.2.0; use a DNS-over-HTTPS client instead\")\n}","typeGuard":null,"tryCatchPattern":"if err := runCloudflared(ctx, \"proxy-dns\"); err != nil {\n    if strings.Contains(err.Error(), \"no longer supported\") {\n        log.Warn(\"migrating to DoH client\")\n        return runDohClient(ctx)\n    }\n    return err\n}","preventionTips":["Audit startup scripts/systemd units after every cloudflared upgrade.","Subscribe to cloudflared changelog/release notes for feature removals.","Pin cloudflared versions in images and update deliberately, not in-place."],"tags":["cli","deprecated","dns","removed-feature"],"backgroundTag":"deprecated-api-usage","analyzedSha":"2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f","analyzedAt":"2026-09-06T04:14:33.757Z","contentChangedAt":"2026-09-06T04:14:33.757Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}