routedns icon indicating copy to clipboard operation
routedns copied to clipboard

Have a continue option on routers/routes or/and a type=return group

Open cbuijs opened this issue 3 years ago • 3 comments

Today the routes on routers while execute a rule (route) when there is a hit, and that is the end of processing on that bit, which is fine.

But sometimes, you might want to hit multiple rules. So instead of ending the routers section/entity, go process the next rule.

A continue option would be great, value would be false by default. When true, when the rule is executed, the next rule(s) will be processed after.

I don't think this is "easy" as the processing is linear between the entities, right? So there is no notion of a return unless provides as options (turning into a "sub-routine" or something).

That said, maybe a groups of type = "return" (similar to drop) would do the trick, and things can still be chained together with resolvers? Maybe doing this, the continue is not even necessary (but I prefer to have it, as it is just clear)?

cbuijs avatar May 31 '22 07:05 cbuijs

Since multiple paths can be executed this way, it really comes down to what to do with the responses. For example there would be two responses, but only one of them can be returned to the caller. It is possible to "detach" the first pipeline and just drop the response if continue=true or something. Utility of this seems quite limited though, Do you have a use-case for it?

folbricht avatar May 31 '22 20:05 folbricht

Not a strong one, but it makes duplicated instances less for example. One that I would use is to resolve local domains, do a "replace" action adding a local (search domain), and then still want go through filtering for security purposes keeping "the same code".

cbuijs avatar Jun 05 '22 09:06 cbuijs

I might have a case, but in a different way and demand.

For blocklist testing/debugging, it would be awesome if you could introduce a logonly = true configuration option for blocklist-v2 type. Either per source or in generally. Basically what happens if it is a "match", logging happens as usual, but no action.

cbuijs avatar Sep 14 '22 17:09 cbuijs

Too complex.

cbuijs avatar Aug 22 '23 10:08 cbuijs