-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add middleware/hosts (for reading entries from /etc/hosts file) #678
Comments
[ Quoting <notifications@github.com> in "[coredns/coredns] How can I read my..." ]
My settings like this
~~~
proxy . 127.0.0.1:5454 {
policy round_robin
fail_timeout 3s
## lookup custom hosts file (ads block like, 0.0.0.0 ssl.google.com)
spray
protocol https_google
}
cache 160
log stdout
errors stdout
~~~
What's the question? You want to be able to block specific sites and getting
that info from the /etc/hosts file? I think we should do that in a separate
middleware, like `hosts` or something that does a lookup in the hosts file
first.
An actual blocking middleware might also be possible, but a `hosts` middleware
seems more useful at the moment, allthough a host file can only deal with a/aaaa
and ptr lookups.
/Miek
…--
Miek Gieben
|
Yap, sorry for my english |
my solution from now I just use dnsmasq(my hosts file) then forward upstream to coredns |
I'll open an issue for having a hosts middleware, seems like a nice
addition and maybe someone will have some fun adding it.
On 29 May 2017 12:13 pm, "Oo Kang Zheng" <notifications@github.com> wrote:
my solution from now I just dnsmasq then forward upstream to coredns
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#678 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAVkW4aj2Bb6yspH_o-94HyKE01SKqbuks5r-qhfgaJpZM4NpA8s>
.
|
Add a new middleware like this is also a good way to get started with coding in CoreDNS |
Specifically the middleware should:
|
example ads block hosts file |
I worked on this a bit last night. Thank's for suggesting this on twitter, I wanted to get involved and this is a good starting point. |
Feel free to put a gist online (or on actual PR) so we can easily discuss the code. Awesome getting you onboard! |
We have the hosts middleware now |
My settings like this
proxy . 127.0.0.1:5454 {
policy round_robin
fail_timeout 3s
*** lookup custom hosts file (ads block like, 0.0.0.0 ssl.google.com)
spray
protocol https_google
}
cache 160
log stdout
errors stdout
The text was updated successfully, but these errors were encountered: