Commit graph

14 commits

Author SHA1 Message Date
Richard Hillmann
61afc6dbad Add middleware reverse (#452) 2017-02-09 19:39:48 +00:00
Miek Gieben
123a76c91e middleware/proxy: absorb httpproxy (#481)
* 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
2017-02-06 19:32:48 +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
John Belamaric
bc301be5ee Add tracing option (#487)
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.
2017-01-23 15:40:47 -05:00
Miek Gieben
53ac25d1c3 Add middleware/erratic (#471)
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.
2017-01-06 09:42:30 +00:00
Miek Gieben
96222927a3 middleware/httpproxy: Add (#439)
This PR adds a middleware that talks to dns.google.com over HTTPS,
meaning all your DNS traffic is encrypted when traversing your ISP and
the internet.

The `dns.google.com` address is re-resolved every 30 seconds.
2016-11-26 17:57:22 +00:00
Miek Gieben
d536272201 middleware/auto: add (#333)
Add auto-load middleware that automatically picks up zones.

Every X seconds it will scan for new zones.
Add tests and documentation.

Make 'make test' use -race.
2016-10-17 18:37:56 +01:00
Miek Gieben
710c9b111f middleware/root: add it (#330)
This PR adds the *root* middleware that specifies a path where
all zone file (the *file* middleware is the only consumer now) can
be found. It works the same as in Caddy.

Documentation can be found in the README.md of the middleware.

Fixes #307
2016-10-11 20:42:28 +01:00
Miek Gieben
de0fa53379 Doc: add package docs (#296)
* Doc: add package docs

Add short package level docs to make godoc looks nicer.
Add some badges to the README.

* correct url
2016-09-25 08:39:20 +01:00
Miek Gieben
31851c6acd coredns: default Corefile (#265)
When no Corefile is given, default to loading the whoami middleware on
the default port (2053).  Also add back the -port flag that allows you
to override the default port.

Further cleanup the startup messages and use caddy's OnStartupComplete()
to blurp out which zones and ports we have.  These can be suppressed
with the -quiet flag.

Normal startup:

miek.nl.:1053
miek.nl2.:1053
example.org.:1054
2016/09/17 20:41:19 [INFO] CoreDNS-001 starting
CoreDNS-001 starting

with the -quiet flag:

2016/09/17 20:41:34 [INFO] CoreDNS-001 starting
2016-09-17 21:24:39 +01:00
Miek Gieben
30fd224504 middleware/whoami: add (#264)
Add a new middleware that tells you who you are; IP, port and transport
is echoed back.

Also some various cleanup and documentation improvements while at it:

* ResponseWriter: improve the documentation of these helper functions.
* And add an NextHandler for use in tests. Make chaos_test.go and
* whoam_test.go use it.
2016-09-17 17:09:05 +01:00
Miek Gieben
2dd8a687b3 Startup notification (#250)
Stop the caddy message and start our own init notifications.
Log the version of CoreDNS when starting up.
Fix all middleware's setup functions so that return the error prefixed
with *which* middleware was failing; leads to better debuggable errors
when starting up.
2016-09-10 09:16:25 +01:00
Miek Gieben
416603383d Cleanup and fixes (#223)
* Set version to 001
* Remove k8stest, test fails is k8s is not there: touch luck
* Remove server directory: not used anymore
* Disable k8s test (for now)
* gometalinter changes
2016-08-20 23:03:36 +01:00
Miek Gieben
9ac3cab1b7 Make CoreDNS a server type plugin for Caddy (#220)
* Make CoreDNS a server type plugin for Caddy

Remove code we don't need and port all middleware over. Fix all tests
and rework the documentation.

Also make `go generate` build a caddy binary which we then copy into
our directory. This means `go build`-builds remain working as-is.

And new etc instances in each etcd test for better isolation.
Fix more tests and rework test.Server with the newer support Caddy offers.

Fix Makefile to support new mode of operation.
2016-08-19 17:14:17 -07:00