How to configure multiple upstream endpoints with `cloudflared --proxy-dns`?

cloudflared proxy-dns --help indicates that it is possible:

   --upstream value            Upstream endpoint URL, you can specify multiple endpoints for redundancy. (default: "https://1.1.1.1/dns-query", "https://1.0.0.1/dns-query")                                                                                                     (accepts multiple inputs) [$TUNNEL_DNS_UPSTREAM]

However it doesn’t state how. Is it --upstream value value, or --upstream value --upstream value, or --upstream value,value, or some other thing.

And I assume for $TUNNEL_DNS_UPSTREAM, that despite its name, because it was mentioned in the proxy-dns --help it can be used to specify the upstream for proxy-dns, and if so, does it support multiple endpoints? if so, how?

Tracking it down through the source code:

It uses a tool which uses SliceFlags, which are --flag value --flag value

Is this working for you now?

Will report back next week.

1 Like