0xERR0R / blocky

Fast and lightweight DNS proxy as ad-blocker for local network with many features
https://0xERR0R.github.io/blocky/
Apache License 2.0
4.65k stars 205 forks source link

Show the rule which is the cause of blocked request #1458

Closed zc-devs closed 2 months ago

zc-devs commented 5 months ago

Recently I've added a few converted AGH lists to Blocky (v0.23) and hub.docker.com started to being blocked.

I have blocking request BLOCKED CNAME (ads), but there is no link to the rule, which is the cause. I had to bisect my lists. It was dandelion_sprouts_anti_malware_list. But it doesn't contain docker, dckr, elb.us-east-1.amazonaws.com.

It would be great if the rule is showed in the logs:

DEBUG blacklist_resolver: blocking request 'BLOCKED CNAME (ads: *.docler.com)'
INFO queryLog: query resolved ... question_name=hub.docker.com. question_type=A response_code=NXDOMAIN response_reason=BLOCKED CNAME (ads) block_rule=*.docler.com response_type=BLOCKED

or even point to the list and rule number:

DEBUG blacklist_resolver: blocking request 'BLOCKED CNAME (ads: anti_malware_list:100500)'
INFO queryLog: query resolved ... question_name=hub.docker.com. question_type=A response_code=NXDOMAIN response_reason=BLOCKED CNAME (ads) block_rule=anti_malware_list:100500 response_type=BLOCKED

hub.docker.com-blocky.log

Problem are getting worse, if we use a bunch of regex rules, I think.


Searched how lists are processed, found #558. So, this is duplicate and probably should be closed.

kwitsch commented 5 months ago

It's not a full duplicate since you requested the rule which is way easier to achieve than the list or line number since those relations are currently not preserved during aggregation.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 months ago

This issue was closed because it has been stalled for 5 days with no activity.