Miek Gieben
25cf16af0e
Use dns.IsSubDomain ( #112 )
...
For the match function use the proper thing from go dns. Fix all
callers and tests to use this.
Fixes : #107
2016-04-12 22:34:44 +01:00
Miek Gieben
27ff83e70f
Stub forward/proxy tests ( #108 )
...
Test the handling of EDNS0 payloads and forwarding to stubzones
servers.
2016-04-12 21:30:08 +01:00
Miek Gieben
9f651a397b
All (non etcd) tests are now local ( #105 )
...
We don't need to network to do tests, we up enough local servers
to we don't need to forward to,s say 8.8.8.8
2016-04-11 15:56:22 +01:00
Miek Gieben
4829b40efa
Rename middleware/testing ( #103 )
...
Rename to test and name the toplevel tests dir to test for consitency.
2016-04-11 07:56:38 +01:00
Miek Gieben
ad221f4b2a
correct EDNS responses ( #96 )
...
Tests updated as well and all the middleware. And Prometheus renamed to
metrics (directive is still prometheus).
2016-04-09 16:17:53 +01:00
Miek Gieben
efcb5cddbc
Various cleanups and fixes ( #88 )
...
Add port number to health check. Add tests the rewrite
middleware.
Fixes #36
2016-04-07 17:42:35 +01:00
Miek Gieben
84dfdab584
Cache elements of State
...
Cache the size and the do bit whenever someone asked for it. We can
probably add more:
PASS
BenchmarkStateDo-4 100000000 11.9 ns/op
BenchmarkStateSize-4 5000000 265 ns/op
ok github.com/miekg/coredns/middleware 2.828s
PASS
BenchmarkStateDo-4 1000000000 2.86 ns/op
BenchmarkStateSize-4 500000000 3.10 ns/op
ok github.com/miekg/coredns/middleware 5.032s
This PR also includes some testing cleanups as well.
2016-04-04 08:19:06 +01:00
Matt Layher
453a8a1982
middleware: change documentation filenames to README.md
2016-04-01 18:26:18 -04:00
Miek Gieben
5a919198ac
Merge pull request #45 from miekg/etcd-stub
...
Etcd stub
2016-03-28 10:18:08 +01:00
Miek Gieben
ebef64280a
Support SkyDNS' stubzones
...
This implements stubzones in the same way as SkyDNS. This
also works with multiple configured domains and has tests.
Also add more configuration parameters for TLS and path prefix and
enabling stubzones. Run StubUpdates as a startup command to keep up to
date with the list in etcd.
2016-03-26 16:29:35 +00:00
Miek Gieben
90f73c50cf
Add Scrub function
...
This function will make the message fit for the client's buffer, or
set the TC bit.
2016-03-26 09:26:54 +00:00
Miek Gieben
16e50ec5f8
Add state.SizeAndDo()
...
This methods returns an OPT record which can be used to create a new
message with the same bufsize and Do bit as the original one.
2016-03-25 17:23:06 +00:00
Miek Gieben
1a7f0deadd
More cleanup - needs to think a little about NewSOA()
2016-03-22 10:29:48 +00:00
Miek Gieben
22dade9e12
It compiles; wont work obviously
2016-03-22 08:30:30 +00:00
Miek Gieben
e985af7870
some fixes
2016-03-21 21:22:23 +00:00
Miek Gieben
740178c83f
more stuff; insight: use proxy for upstream queries
2016-03-21 21:21:29 +00:00
Miek Gieben
c3e951818f
Update docs
2016-03-19 20:59:10 +00:00
Miek Gieben
47fca9a8fc
Proxy cleanups
...
Remove things not supported, fix docs.
2016-03-19 20:53:37 +00:00
Miek Gieben
78432f78a9
Fix upstream tests
2016-03-19 16:11:30 +00:00
Miek Gieben
39dbd447b5
Fix middleware log
2016-03-19 11:16:08 +00:00
Miek Gieben
f907311cdf
Use context.Context
...
Rename the old Context to State and use context.Context in the
middleware for intra-middleware communication and more.
2016-03-19 07:32:50 +00:00
Miek Gieben
3ec0d9fe6b
First commit
2016-03-18 20:57:35 +00:00