* checkpoint
* Pass context through ServeDNS, enable gRPC tracing
* Fix types and make tracer available to proxy. go fmt
* Fix imports
* Use the DoNotStartTrace option
* Change to SpanFilter from DoNotStartTrace
* Use new name (IncludeSpan)
* Final names
* Add tests; fix possible client/conn leaks in grpc
* go fmt
* middleware/metrics: survive restart
Keep the handler running during restart. Stopping and starting the
handler results in "address in use" - sometimes, meaning the reload
will be flaky. In turn this behavior means any changes to the monitor
stanza are not picked up.
* remove resync
* Document fallthrough and fix *reverse*
While documenting the fallthrough behavior and testing it I noticed
the did not properly work. This PR does a tiny bit too much as it
- Documents fallthrough
- Fixes fallthrough in reverse
- Makes directives_generate complain on duplicate priorities
- Moved reverse *before* file in middleware.cfg
- Add a test that tests the reverse fallthrough behavior with a file
backend
Fixes#515
* ....and fix the tests
* WIP: Client-side of gRPC proxy
* Add tests
* gofmt
* Implement OnShutdown; add a little logging
* Update for context in Exchange change
* go fmt
* Update README
* Review comments
* Compiling is good
* More README improvements
* middleware/proxy: give Exchange a context
Make context.Context the first paramater in the Exchange method.
This is inline with all other query functions.
* up the version
* middleware/reverse: random updates
Make the documentation somewhat shorter (and hopefully clearer in the
process). Also to be on-par with the *auto* middleware, start counting
the referenced zones from 1 (instead of 0).
Some variable cleanups and use the NextOrFailure in the ServeDNS
function.
* More TODOs
Fix the except keyword usage - the config would allow it, but it was
not enforced in the code.
Turns out that **FROM** was also not enforced, fix both, by (basically)
copying the code from Caddy.
Update the README and tests.
Locally test as well, shows that this works:
~~~
.:1053 {
proxy miek.nl 8.8.8.8:53 {
except a.miek.nl
}
proxy a.miek.nl 8.8.4.4:53
errors stdout
log stdout
}
~~~
And gives the desired results, not having a proxy line for `a.miek.nl`
results in a SERVFAIL (as expected).
Fixes#502
* middleware/proxy: absorb httpproxy
Move the httproxy into proxy. This adds and Exchanger interface which
is used to exchange the messages with the upstream.
The https_google upstream will re-resolve itself and update the upstream
hosts used every 300s.
* Remove and add TODO
* add cidrs opt
* remove state data from middleware object
* update k8s docs
* Add integration tests
* add unit tests for cidr and pods config
* more README fixes, separate dev notes
* adjust section headers
* fix typo
Adds a middleware to enable tracing with OpenTracing/OpenZipkin.
Enabling tracing will have a large impact on performance so it is
not advisable in production.
By defining and using an proxy.Exchanger interface we make the proxy
more generic and we can then fold back httproxy into proxy.
This overrides #463 and #473 and should make futures extensions rather
trivial
* Add docs that talk about `protocol` and how to set it.
* middleware/proxy: rename New to NewLookup
It's used as a Lookup mechanism not as a completely new proxy,
reflect that in the name.
* Set maxfails to 3 by default when looking up names.
Most of the changes have been copied
from https://github.com/johnbelamaric/coredns/pull/1/files
* dont require/allow "_" prefix for srv wildcard fields
* streamline parse/validation of req name
* removing nametemplate
* error when zone not found, loopify unit tests
* Use common TLS parsing routine for etcd
Change to use the new common routine, and update the docs to reflect
the different options for passing TLS configuration.
* Move middleware/tls to middleware/pkg/tls
This was put in the wrong place originally.
Create a small speedup running the tests:
PASS
ok github.com/miekg/coredns/test 10.329s
PASS
ok github.com/miekg/coredns/test 6.079s
Skip the etcd ones. Doing the middleware/*/*_test ones doesn't yield
any speedup as these are still done on a per directory basis.
Add deadline to break the connection. We use the default of 5 seconds.
After this the backend is marked unhealthy and not used for some time.
Fixes#467
* Add common TLS config routines
These routines can be used to load TLS configs based upon the
args in the Corefile.
* Add common routine for Corefile arg handling
Add the NewTLSConfigFromArgs routine so that you can just pass
in the Corefile args and get a tls.Config. This ensures the
parameters are handled consistently across middleware.
* Change to varargs style params
Change to use args ...string instead of []string. Add
documentation of what each call means.
This middleware allows playing with responses. Only one type is
implemented: it allows you to drop queries. I.e. withhold the response
from the client.
This checks if the next middleware to be called is nil, and if so returns
ServerFailure and an error. This makes the next calling more robust and
saves some lines of code.
Also prefix the error with the name of the middleware to aid in
debugging.