cloudflare / cloudflare/cloudflared
Run a DoH JSON API client with proxy-dns option
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
Cloudflare's DoH endpoint supports POST and GET for [UDP wireformat](https://datatracker.ietf.org/doc/html/rfc8484), and GET for [JSON format](https://datatracker.ietf.org/doc/html/rfc8427). We can run a DoH DNS wireformat client with [cloudflared](https://developers.cloudflare.com/1.1.1.1/dns-over-https/cloudflared-proxy).
How about running a DoH JSON API client?
```shell
[root@xx doh]# cloudflared --version
cloudflared version 2021.8.7 (built 2021-08-28-1749 UTC)
[root@xx doh]# systemctl status cloudflared
Unit cloudflared.service could not be found.
[root@xx doh]# cloudflared proxy-dns --help
NAME:
cloudflared proxy-dns - Run a DNS over HTTPS proxy server.
USAGE:
cloudflared proxy-dns [command options]
OPTIONS:
--metrics value Listen address for metrics reporting. (default: "localhost:") [$TUNNEL_METRICS]
--address value Listen address for the DNS over HTTPS proxy server. (default: "localhost") [$TUNNEL_DNS_ADDRESS]
--port value Listen on given port for the DNS over HTTPS proxy server. (default: 53) [$TUNNEL_DNS_PORT]
--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]
--bootstrap value bootstrap endpoint URL, you can specify multiple endpoints for redundancy. (default: "https://162.159.36.1/dns-query", "https://162.159.46.1/dns-query", "https://[2606:4700:4700::1111]/dns-query", "https://[2606:4700:4700::1001]/dns-query") (accepts multiple inputs) [$TUNNEL_DNS_BOOTSTRAP]
--max-upstream-conns value Maximum concurrent connections to upstream. Setting to 0 means unlimited. (default: 5) [$TUNNEL_DNS_MAX_UPSTREAM_CONNS]
--help, -h show help (default: false)
```
Contributor guide
Assessment
This issue has not been assessed yet.