diff options
author | 2017-09-15 11:30:10 +0100 | |
---|---|---|
committer | 2017-09-15 11:30:10 +0100 | |
commit | 19d7d207d3152b416c195a2be15b21b5be15ceed (patch) | |
tree | f0db2de00677e17edab5ef7baf7c77772b0b5462 | |
parent | 8e8ce6c3e15e15ce967993d6cb0015aa70232cac (diff) | |
download | coredns-19d7d207d3152b416c195a2be15b21b5be15ceed.tar.gz coredns-19d7d207d3152b416c195a2be15b21b5be15ceed.tar.zst coredns-19d7d207d3152b416c195a2be15b21b5be15ceed.zip |
Make proxy examples better (#1080)
-rw-r--r-- | plugin/proxy/README.md | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/plugin/proxy/README.md b/plugin/proxy/README.md index 3cccf05ee..484a2e7ae 100644 --- a/plugin/proxy/README.md +++ b/plugin/proxy/README.md @@ -113,55 +113,67 @@ proxy example.org 127.0.0.1:9005 Load-balance all requests between three backends (using random policy): -~~~ -proxy . 10.0.0.10:53 10.0.0.11:1053 10.0.0.12 +~~~ corefile +. { + proxy . 10.0.0.10:53 10.0.0.11:1053 10.0.0.12 +} ~~~ Same as above, but round-robin style: -~~~ -proxy . 10.0.0.10:53 10.0.0.11:1053 10.0.0.12 { - policy round_robin +~~~ corefile +. { + proxy . 10.0.0.10:53 10.0.0.11:1053 10.0.0.12 { + policy round_robin + } } ~~~ With health checks and proxy headers to pass hostname, IP, and scheme upstream: -~~~ -proxy . 10.0.0.11:53 10.0.0.11:53 10.0.0.12:53 { - policy round_robin - health_check /health:8080 +~~~ corefile +. { + proxy . 10.0.0.11:53 10.0.0.11:53 10.0.0.12:53 { + policy round_robin + health_check /health:8080 + } } ~~~ Proxy everything except requests to miek.nl or example.org ~~~ -proxy . 10.0.0.10:1234 { - except miek.nl example.org +. { + proxy . 10.0.0.10:1234 { + except miek.nl example.org + } } ~~~ -Proxy everything except example.org using the host resolv.conf nameservers: +Proxy everything except `example.org` using the host's `resolv.conf`'s nameservers: -~~~ -proxy . /etc/resolv.conf { - except miek.nl example.org +~~~ corefile +. { + proxy . /etc/resolv.conf { + except miek.nl example.org + } } ~~~ -Proxy all requests within example.org to Google's dns.google.com. +Proxy all requests within `example.org` to Google's `dns.google.com`. -~~~ -proxy example.org 1.2.3.4:53 { - protocol https_google +~~~ corefile +. { + proxy example.org 1.2.3.4:53 { + protocol https_google + } } ~~~ Proxy everything with HTTPS to `dns.google.com`, except `example.org`. Then have another proxy in another stanza that uses plain DNS to resolve names under `example.org`. -~~~ +~~~ corefile . { proxy . 1.2.3.4:53 { except example.org |