Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
19d7d207
Commit
19d7d207
authored
Sep 15, 2017
by
Miek Gieben
Committed by
GitHub
Sep 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make proxy examples better (#1080)
parent
8e8ce6c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
20 deletions
+32
-20
plugin/proxy/README.md
plugin/proxy/README.md
+32
-20
No files found.
plugin/proxy/README.md
View file @
19d7d207
...
@@ -113,55 +113,67 @@ proxy example.org 127.0.0.1:9005
...
@@ -113,55 +113,67 @@ proxy example.org 127.0.0.1:9005
Load-balance all requests between three backends (using random policy):
Load-balance all requests between three backends (using random policy):
~~~
~~~
corefile
proxy . 10.0.0.10:53 10.0.0.11:1053 10.0.0.12
. {
proxy . 10.0.0.10:53 10.0.0.11:1053 10.0.0.12
}
~~~
~~~
Same as above, but round-robin style:
Same as above, but round-robin style:
~~~
~~~
corefile
proxy . 10.0.0.10:53 10.0.0.11:1053 10.0.0.12 {
. {
policy round_robin
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:
With health checks and proxy headers to pass hostname, IP, and scheme upstream:
~~~
~~~
corefile
proxy . 10.0.0.11:53 10.0.0.11:53 10.0.0.12:53 {
. {
policy round_robin
proxy . 10.0.0.11:53 10.0.0.11:53 10.0.0.12:53 {
health_check /health:8080
policy round_robin
health_check /health:8080
}
}
}
~~~
~~~
Proxy everything except requests to miek.nl or example.org
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:
~~~
~~~
corefile
proxy . /etc/resolv.conf {
. {
except miek.nl example.org
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`
.
~~~
~~~
corefile
proxy example.org 1.2.3.4:53 {
. {
protocol https_google
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
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`
.
another stanza that uses plain DNS to resolve names under
`example.org`
.
~~~
~~~
corefile
. {
. {
proxy . 1.2.3.4:53 {
proxy . 1.2.3.4:53 {
except example.org
except example.org
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment