-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
I think It would be pretty useful if you could read/write "raw" data from/into responses.
- Read data
[groups.nocache]
type = "ttl-modifier"
ttl-max = 1 # 0 doesnt seem to work yet
resolvers = [ "cloudflare" ] # this doesnt run if called by "dnsflag"
[group.dnsflag]
type = "raw-read"
resolvers = [ "cloudflare" ] # get the response
match = { dns-flags = [ "QR", "RD", "RA", "AD" ] } # if: response contains AD
action = [ "nocache" ] # then: do this
- Write data
[groups.ednsflag]
type = "raw-write"
resolvers = [ "cloudflare" ] # get the response
add = { edns-flags = [ "DO" ] } # add/overwrite
rem = { type = "RRSIG" } # remove if exists
Both could be combined to do something like this:
# Turn SERVFAIL into NXDOMAIN
[groups.nxdomain-write]
type = "raw-write"
resolvers = [ "cloudflare" ]
add = { status = "NXDOMAIN" }
rem = { error = "EDE" }
[group.servfail-read]
type = "raw-read"
resolvers = [ "cloudflare" ]
match = { status = "SERVFAIL" }
action = [ "nxdomain-write" ]
In this example you could also just use static-responder
though.
Metadata
Metadata
Assignees
Labels
No labels