You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to override how checkFunction works, for example, i want to fail a healthcheck if a specific domain does not return a REFUSED response.
Usecase
I have an adblocking backend, but if I exceed a quota, it starts working transparently, without blocking ads, i then want to mark that pool as "offline" and move on to the next pool.
functioncheckAdblocking(qname, qtype, qclass, dh)
-- magic?returntrueendnewServer({
name="adblocker1",
address="2001:db8::1",
tls="openssl",
subjectName="a.example.com",
validateCertificates=true,
pool="adblocker1",
checkFunction=checkAdblocking
})
newServer({
name="adblocker2",
address="2001:db8::2",
tls="openssl",
subjectName="b.example.com",
validateCertificates=true,
pool="adblocker2",
checkFunction=checkAdblocking
})
newServer({
name="generic1",
address="2001:db8::3",
tls="openssl",
subjectName="c.example.com",
validateCertificates=true,
pool="generic1"
})
-- I want these pools to be marked "down" if the query for-- bad_domain.example.com starts responding anything other than REFUSED.addAction(PoolAvailableRule("adblocker1"), PoolAction("adblocker1"))
addAction(PoolAvailableRule("adblocker2"), PoolAction("adblocker2"))
-- Fallback pool if all of the above are "down"addAction(PoolAvailableRule("generic1"), PoolAction("generic1"))
-- All pools down?addAction(AllRule(), RCodeAction(DNSRCode.REFUSED))
Hi! Thank you for filing this feature request!
We cannot modify the semantics of checkFunction without breaking existing configurations, which I would like to avoid, but we can take a new, optional function that takes information about the response and returns a boolean to indicate whether the response should be considered valid or not.
Setting the milestone to 2.1 since 2.0 is already well on its way and I don't think we will have the time to tackle this, but if someone is willing to contribute the code 2.0 might be doable.
Short description
I want to override how checkFunction works, for example, i want to fail a healthcheck if a specific domain does not return a REFUSED response.
Usecase
I have an adblocking backend, but if I exceed a quota, it starts working transparently, without blocking ads, i then want to mark that pool as "offline" and move on to the next pool.
Description
Related discussion: #15055
Seems fairly straightforwards?
Modify checkFunction to allow boolean responses, and if boolean then use that as a result instead of a qname?
The text was updated successfully, but these errors were encountered: