{ "getCacheHitResponseRule", true, "selector", "Return the cache-hit response rule corresponding to the selector, if any" },
{ "getCacheInsertedResponseRule", true, "selector", "Return the cache-inserted response rule corresponding to the selector, if any" },
{ "getCurrentTime", true, "", "returns the current time" },
+ { "getDynamicBlocks", true, "", "returns a table of the current network-based dynamic blocks" },
+ { "getSMTDynamicBlocks", true, "", "returns a table of the current suffix-based dynamic blocks" },
{ "getDNSCryptBind", true, "n", "return the `DNSCryptContext` object corresponding to the bind `n`" },
{ "getDNSCryptBindCount", true, "", "returns the number of DNSCrypt listeners" },
{ "getDOHFrontend", true, "n", "returns the DOH frontend with index n" },
Remove all current dynamic blocks.
+.. function:: getDynamicBlocks()
+
+ .. versionadded:: 1.9.0
+
+ Return an associative table of active network-based dynamic blocks. The keys are the network IP or range that are blocked, the value are :class:`DynBlock` objects.
+
+.. function:: getSMTDynamicBlocks()
+
+ .. versionadded:: 1.9.0
+
+ Return an associative table of active domain-based (Suffix Match Tree or SMT) dynamic blocks. The keys are the domains that are blocked, the values are :class:`DynBlock` objects.
+
.. function:: showDynBlocks()
List all dynamic blocks in effect.
:param int sec: The interval between two runs of the cleaning algorithm, in seconds. Default is 60 (1 minute), 0 means disabled.
+.. class:: DynBlock
+
+ .. versionadded:: 1.9.0
+
+ Represent the current state of a dynamic block.
+
+ .. attribute:: DynBlock.action
+
+ The action of this block, as an integer representing a :ref:`DNSAction <DNSAction>`.
+
+ .. attribute:: DynBlock.blocks
+
+ The number of queries blocked.
+
+ .. attribute:: DynBlock.bpf
+
+ Whether this block is using eBPF, as a boolean.
+
+ .. attribute:: DynBlock.domain
+
+ The domain that is blocked, as a string, for Suffix Match Tree blocks.
+
+ .. attribute:: DynBlock.reason
+
+ The reason why this block was inserted, as a string.
+
+ .. attribute:: DynBlock.until
+
+ The time (in seconds since Epoch) at which the block will expire.
+
+ .. attribute:: DynBlock.warning
+
+ Whether this block is only a warning one (true) or is really enforced (false).
+
.. _exceedfuncs:
Getting addresses that exceeded parameters