Blocking error #347
Replies: 8 comments 2 replies
-
I can't test the config right now, but from the top of my head, it should look like this: upstream:
externalResolvers:
- 1.1.1.1
- 9.9.9.9
blocking:
blackLists:
ads:
- |
/^.*\.io$/
/^.*\.cn$/
clientGroupsBlock:
default:
- ads
port: 53
httpPort: 4000
logLevel: info The regex must be enclosed by Btw. You can test regex with this tool: https://regoio.herokuapp.com/ |
Beta Was this translation helpful? Give feedback.
-
Is it ok to see that on log INFO list_cache: file imported count=2 source=/^..io$/ |
Beta Was this translation helpful? Give feedback.
-
Yes, it is ok. This output should be replaced with something useful in case of regex |
Beta Was this translation helpful? Give feedback.
-
Cool, thanks. So this regex will block anything with ads/banner, right? blackLists: |
Beta Was this translation helpful? Give feedback.
-
if you want to block every domain name which contains ads, it should be |
Beta Was this translation helpful? Give feedback.
-
And what config must be if I want to add some domain within regex format into whitelist? Same question for the whole domain and subdomain to the blacklist. |
Beta Was this translation helpful? Give feedback.
-
This is the same format. Each regex must be enclosed with |
Beta Was this translation helpful? Give feedback.
-
upstream:
externalResolvers:
- 1.1.1.1
- 9.9.9.9
blocking:
whiteLists:
ads:
- |
# do not block domains with ".google.com"
/^.*\.google.com$/
blackLists:
ads:
- |
/^.*\.io$/
/^.*\.cn$/
clientGroupsBlock:
default:
- ads
port: 53
httpPort: 4000
logLevel: info |
Beta Was this translation helpful? Give feedback.
-
I want to block whole domain .io and .cn with regex support on config, but it doesn't work for me. Seems like I did something wrong on config, but it was copied from example config. Can you please provide right config for the blocking section to make it work?
P.S adding .io and .cn into blacklist.txt doesn't help me at all. And I'm using v0.17
Beta Was this translation helpful? Give feedback.
All reactions