Abstract the caddy call and make it simpler.
See #3261 for some part of the discussion.
Go from:
~~~ go
func init() {
caddy.RegisterPlugin("any", caddy.Plugin{
ServerType: "dns",
Action: setup,
})
}
~~~
To:
~~~ go
func init() { plugin.Register("any", setup) }
~~~
This requires some external documents in coredns.io to be updated as
well; the old way still works, so it's backwards compatible.
Signed-off-by: Miek Gieben <miek@miek.nl>
Update all documentation in the tree to use example.org as an example
configuration (in so far possible). As to get out of the just use "."
and fallthrough and things would be fine.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Run go mod -tidy
Tidy up and fix the require of x/net to the hash used in miekg/dns, this
seems to fix the "incompatible version bla bla"
Signed-off-by: Miek Gieben <miek@miek.nl>
* Run go mod tidy
Signed-off-by: Miek Gieben <miek@miek.nl>
When there is no Corefile found we load the default. Add the log plugin
to it, so you can see queries actually landing in CoreDNS.
Signed-off-by: Miek Gieben <miek@miek.nl>
See https://github.com/coredns/coredns/pull/3209#issuecomment-525016357
for the previous issues, also see https://github.com/Azure/go-autorest/issues/414
for some further background.
Basically go mod has some issue when multiple tags exists (as main module and submodule)
within the same repo. That was fixed in go-autorest very recently, though
azure-sdk-for-go has not been fully updated yet.
This fix is a temporarily one with `replace` fix. Once azure-sdk-for-go
is updated then we could drop the `replace fix`
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* use all local IPs
* mult/bind ips
* gofmt + boundIPs fix
* fix no matching endpoint case
* don't duplicate NS records in answer
* fix answer dedup
* fix comment
* add multi local ip test case
OWNERS file was padded, remove empty lines. Fix code block in README,
and set codeblock type to 'corefile' without the upper case C.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Add plugin ACL for source ip filtering
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Allow all arguments to be optional and support multiple qtypes in a single policy
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Add newline before third party imports
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Use camel instead of underscore in method name
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Start with an upper case letter in t.Errorf()
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Use the qtype parse logic in miekg/dns
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Use third party trie implementation as the ip filter
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Update based on rdrozhdzh's comment
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Change the type of action to int
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Add IPv6 support
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Update plugin.cfg
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Remove file functionality
Signed-off-by: An Xiao <hac@zju.edu.cn>
* Update
Signed-off-by: Xiao An <hac@zju.edu.cn>
* Update README
Signed-off-by: Xiao An <hac@zju.edu.cn>
* remove comments
Signed-off-by: Xiao An <hac@zju.edu.cn>
* update
Signed-off-by: Xiao An <hac@zju.edu.cn>
* Update dependency
Signed-off-by: Xiao An <hac@zju.edu.cn>
* Update
Signed-off-by: Xiao An <hac@zju.edu.cn>
* Update test
Signed-off-by: Xiao An <hac@zju.edu.cn>
* Add OWNERS
Signed-off-by: Xiao An <hac@zju.edu.cn>
* Refactor shouldBlock and skip useless check
Signed-off-by: Xiao An <hac@zju.edu.cn>
* Introduce ActionNone
Signed-off-by: Xiao An <hac@zju.edu.cn>
* Update label name
Signed-off-by: Xiao An <hac@zju.edu.cn>
* Avoid capitalizing private types
Signed-off-by: Xiao An <hac@zju.edu.cn>
* Notes update for the release.
acl might not make tomorrow (plan to release then), so remove it for
now. Add other PRs that got merged and flesh it out some more.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Remove xfr highlight for k8s
Signed-off-by: Miek Gieben <miek@miek.nl>
* Small tweaks while preparing the release
Signed-off-by: Miek Gieben <miek@miek.nl>
* startup: add logo
As discussed in #3225, lets add a little logo. This PR incorperates this
in the startup text. It also removes the logging output as this outputs
identical lines of text, but for no clear reason. This means --quiet now
means "no output on startup at all".
Currently it looks like this:
~~~
.:1053
______ ____ _ _______
/ ____/___ ________ / __ \/ | / / ___/ CoreDNS-1.6.2
/ / / __ \/ ___/ _ \/ / / / |/ /\__ \ linux/amd64, go1.12.9,
/ /___/ /_/ / / / __/ /_/ / /| /___/ /
\____/\____/_/ \___/_____/_/ |_//____/
~~~
We have 2 lines extra on the right if we need to print more (no ideas
come to mind currently).
Signed-off-by: Miek Gieben <miek@miek.nl>
* Add distinct marker for grep and cut purposes
Signed-off-by: Miek Gieben <miek@miek.nl>