-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does regexp on response-blocklist-name works on any record type? #341
Comments
It supports a subset of record types. You can see the list here https://github.com/folbricht/routedns/blob/master/response-blocklist-name.go#L77-L86 Should be easy to add something if necessary. |
Ah! Wait. I think we discussed this before :-). I think it is probably okay and not a lot of work to at least the following record-types as well, where the last field in the answer is "text" and to be considered parseable (the other fields require more work I guess, but less relevant anyway):
Not sure if the DNS Lib provide those fields as "text" as the |
Can you try out the |
COOL! I had this issue with Will try/test later (probably tomorrow, swamped today). |
Just updated it to join with whitespace |
Seems not to work. I didn't spend too much time on it. Looks like the example:
Result should be that all |
I think (wild guess) is that Same for |
The issue is that "Target" is just the target string, i.e. just |
Not working still (using same example config above):
|
Did you update from the branch before testing? I just tried it again and it seems to be working. Logs
Config [groups.cloudflare-blocklist]
type = "response-blocklist-name"
resolvers = ["cloudflare-dot"]
blocklist-format = "regexp"
blocklist= [
'^.*ipv[46]hint.*$',
] Output
|
Cool. Will do a rebuild and test again in the next couple of days and let you know. |
Something I will be creating another ticket for but that just popped in my mind reading this all. Would be cool that we can somehow use the existing block features by defining a regex where to match against. For example For example if we take the above example, and we want to match
The parentheses bit will be captured into Hope this is clear. |
Just tested after rebuild and it works: |
Thanks for checking it out. Merged |
Should
response-blocklist-name
when usingregexp
hit anything in the answer, regarrdless record-type? Like HTTPS and SVCB records as well?For example, I want to block an HTTPS record like below:
blah.company.com. 120 IN HTTPS 1 . ipv4hint=\"1.2.3.4\" ipv6hint=\"1234:1:2:3::4\"
By using an regexp like this (stupid/simple example):
^ipv4hint
It seems to work on
CNAME
and the more traditional records only?The text was updated successfully, but these errors were encountered: