shawn1m / overture

A customized DNS relay server
MIT License
1.79k stars 284 forks source link

regex-list mismatch or what's the working mode? #227

Closed jemyzhang closed 4 years ago

jemyzhang commented 4 years ago

google related records in domain_primary:

cat domain_primary_sample| grep google.com    
dugoogle.com
imags-google.com
ns-google.com
adservice.google.com
c.android.clients.google.com
cache.pack.google.com
dl.google.com
dl.l.google.com
kh.google.com
khm.google.com
khm0.google.com
khm1.google.com
khm2.google.com
khm3.google.com
khmdb.google.com
pagead-googlehosted.l.google.com
safebrowsing-cache.google.com
ssl-google-analytics.l.google.com
toolbarqueries.google.com
tools.google.com
tools.l.google.com
www-googletagmanager.l.google.com

while looking up domain of hangouts.google.com , expect not in the primary domain, but matched in fact

DEBU[2020-04-20 11:03:08] Question from 127.0.0.1: ;hangouts.google.com.    IN   A 
DEBU[2020-04-20 11:03:08] Matched                                       DNS=Primary domain=hangouts.google.com question=hangouts.google.com
DEBU[2020-04-20 11:03:08] Finally use Primary DNS                                    
jemyzhang commented 4 years ago

got it, google.com matched le.com

Matching le.com: www3.l.google.com true :rofl:

jemyzhang commented 4 years ago

vi replace to fix this issue

%s/^/((.*\\.)|^)/g