Commit graph

9 commits

Author SHA1 Message Date
Yong Tang
c08497adee Misspell correction (#826)
Did a `misspell . | grep -v ^vendor` and fixed
several typos.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-08-04 09:06:06 -07:00
Miek Gieben
8e86fa6f23 middleware/debug: add (#735)
* middleware/debug: add

Add a debug "middleware" that disables the recover() and just lets
CoreDNS crash; very useful for testing.

Fixes ##563

* fix test

* Feedback: check the value of Debug
2017-06-13 16:47:17 -06:00
Pat Moroney
92dd947c51 middleware/hosts for /etc/hosts parsing (#695)
* add hosts middleware

* forgot pointer receiver

* add appropriately modified hostsfile tests from golang repo

* remove test artifacts, separate hostsfile parsing from caching and opening, remove unused metrics references, move middleware up the chain

* refactored the logic for creating records and filtering ip address versions. also got PTR lookups working

* Add README.md. Modify config to be more concise. Add zones list to config. Filter PTR responses based on zones list.

* add Fallthrough and return correct dns response code otherwise

* Simplified Hostsfile to only store hosts in the zones we care about, and by ip version. Added handler tests and improved other tests.

* oops, goimports loaded a package from a different repo
2017-06-08 20:48:04 +01:00
Miek Gieben
830fdfd26d middlewware/startup|shutdown (#604)
Add middleware by directly linking it from caddy, i.e. without any code
changes. To be fair: this does not added a ServeHTTP, but does give
some nice features in the Corefile.
2017-03-18 07:47:01 +00:00
Miek Gieben
bfaf9e0aec core: add more transports (#574)
* core: add listening for other protocols

Allow CoreDNS to listen for TLS request coming over port 853. This can
be enabled with `tls://` in the config file.

Implement listening for grps:// as well.

a Corefile like:

~~~
. tls://.:1853 {
    whoami
    tls
}
~~~

Means we listen on 1853 for tls requests, the `tls` config item allows
configuration for TLS parameters. We *might* be tempted to use Caddy's
Let's Encrypt implementation here.

* Refactor coredns/grpc into CoreDNS

This makes gRPC a first class citizen in CoreDNS. Add defines as being
just another server.

* some cleanups

* unexport the servers

* Move protobuf dir

* Hook up TLS properly

* Fix test

* listen for TLS as well. README updates

* disable test, fix package

* fix test

* Fix tests

* Fix remaining test

* Some tests

* Make the test work

* Add grpc test from #580

* fix crash

* Fix tests

* Close conn

* README cleanups

* README

* link RFC
2017-03-13 20:24:37 +00:00
Miek Gieben
c5224b1048 Golint (#548)
* linter fixes

* Golint and format code

* fmt
2017-02-22 07:25:58 +00:00
Yong Tang
81af74aad0 Fix import path github.com/miekg/coredns -> github.com/coredns/coredns (#547)
This fix fixes import path from
`github.com/miekg/coredns`
->
`github.com/coredns/coredns`
2017-02-22 06:51:47 +00:00
Miek Gieben
ea38b642b8 All middleware equal (#535)
* all-middleware-equal

* Revert "all-middleware-equal"

This reverts commit ee77b2a981.

* middleware: treat external and local the same

Make the middleware generation simpler and also specify the local
middleware, meaning that it can now be removed as well. Simplify
the code a bit and regen everything.

* remove lineNR, not used
2017-02-19 20:34:29 +00:00
Bob Wasniak
439d8b8d12 middleware.cfg to configure middleware directives (#496)
* Use go generate to build middleware setup based on middleware.cfg
Init default config

* generated files

* Move gen to an isolated area

* rename files

* PR review updates

* undo readme
2017-01-31 17:25:02 +00:00