lixingcong / dnsmasq-regex

dnsmasq with regex match module(libpcre v8.45, the older version)
66 stars 15 forks source link

Regex rules override all other allow rules, even if the regex is at the end #14

Closed elyahw closed 8 months ago

elyahw commented 8 months ago

In my dnsmasq.conf file, I have two rules:

# Allow address:
server=/firebaseio.com/#

# Block any address containing 4 numbers:
address=/:.*[0-9]{4,4}.*:/

Now if I do dig firebaseio.com, I get the correct server IP address. But if I do dig s-usc1a-nss-2026.firebaseio.com (which is covered by the regex), then I get a NXDOMAIN/127.0.0.1 response.

Since the first rule exists before the second, logically it should override the regex. But it seems like it is not doing so. Is this the expected behaviour?

lixingcong commented 8 months ago

Try to read README.md again, it explained:

If the domain matched normal and regex servers, DNS query will be forwarded to the normal one.

lixingcong commented 8 months ago

No plan for fix it.

Any pull requests are welcome.