looterz / grimd

:zap: fast dns proxy that can run anywhere, built to black-hole internet advertisements and malware servers
MIT License
1.39k stars 108 forks source link

grimd and subdomains #18

Open myxalov opened 7 years ago

myxalov commented 7 years ago

Our blacklist has domains such as "*.google.com" Grimd don't understand this form as subdomains. Also if domain listed as "google.com", and domain "www.google.com" is working.

looterz commented 7 years ago

Sorry the response has taken so long on this issue. It is a fairly annoying issue to deal with, but something I would like to fix for an upcoming release. I will look into some methods for pattern matching domain names and see what I can come up with.

emdioh commented 7 years ago

I have a tentative implementation. Myxalov: can you clarify what you mean with your last line: Also if domain listed as "google.com", and domain "www.google.com" is working. ? Thanks.

emdioh commented 7 years ago

24 adds support for globs

myxalov commented 7 years ago

Sorry, I meaned that domain "www.google.com" isn't working if domain listed as "google.com".

emdioh commented 7 years ago

I see. I'm not sure that it should, though: iiuc both google.com and www.google.com are valid domain names and could correspond to different services. Would the globbing support solve your usecase?

elico commented 5 years ago

@emdioh @looterz I think that using .google.com should catch all while google.com should catch only google.com with a switch. to turn this function on and off.

photostorm commented 5 years ago

Is this still a issue or was it fixed with globs support?

elico commented 4 years ago

@looterz I have seen something interesting about such a subject: *.google.com would catch 111.google.com 11.google.com but not 1.111.google.com

And: **.google.com would catch any subdomain in any level.

What do you think? @photostorm ?

xgocn commented 3 years ago

I have "sub.abc.com" in the whilelists and "*.abc.com" in the blacklists, what would happen?