pub struct BlocklistConfig {
pub wildcard_match: bool,
pub min_wildcard_depth: u8,
pub lists: Vec<String>,
pub sinkhole_ipv4: Option<Ipv4Addr>,
pub sinkhole_ipv6: Option<Ipv6Addr>,
pub ttl: u32,
pub block_message: Option<String>,
pub consult_action: BlocklistConsultAction,
}blocklist only.Expand description
Configuration for file based zones
Fields§
§wildcard_match: boolSupport wildcards? Defaults to true. If set to true, block list entries containing asterisks will be expanded to match queries.
min_wildcard_depth: u8Minimum wildcard depth. Defaults to 2. Any wildcard entries without at least this many static elements will not be expanded (e.g., *.com has a depth of 1; *.example.com has a depth of two.) This is meant as a safeguard against an errant block list entry, such as * or *.com that might block many more hosts than intended.
lists: Vec<String>Block lists to load. These should be specified as relative (to the server zone directory) paths in the config file.
sinkhole_ipv4: Option<Ipv4Addr>IPv4 sinkhole IP. This is the IP that is returned when a blocklist entry is matched for an A query. If unspecified, an implementation-provided default will be used.
sinkhole_ipv6: Option<Ipv6Addr>IPv6 sinkhole IP. This is the IP that is returned when a blocklist entry is matched for a AAAA query. If unspecified, an implementation-provided default will be used.
ttl: u32Block TTL. This is the length of time a block response should be stored in the requesting resolvers cache, in seconds. Defaults to 86,400 seconds.
block_message: Option<String>Block message to return to the user. This is an optional message that, if configured, will be returned as a TXT record in the additionals section when a blocklist entry is matched for a query.
consult_action: BlocklistConsultActionThe consult action controls how the blocklist handles queries where another authority has already provided an answer. By default, it ignores any such queries (“Disabled”,) however it can be configured to log blocklist matches for those queries (“Log”,) or can be configured to overwrite the previous responses (“Enforce”.)
Trait Implementations§
Source§impl Clone for BlocklistConfig
impl Clone for BlocklistConfig
Source§fn clone(&self) -> BlocklistConfig
fn clone(&self) -> BlocklistConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlocklistConfig
impl Debug for BlocklistConfig
Source§impl Default for BlocklistConfig
impl Default for BlocklistConfig
Source§impl<'de> Deserialize<'de> for BlocklistConfigwhere
BlocklistConfig: Default,
impl<'de> Deserialize<'de> for BlocklistConfigwhere
BlocklistConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for BlocklistConfig
impl PartialEq for BlocklistConfig
impl Eq for BlocklistConfig
impl StructuralPartialEq for BlocklistConfig
Auto Trait Implementations§
impl Freeze for BlocklistConfig
impl RefUnwindSafe for BlocklistConfig
impl Send for BlocklistConfig
impl Sync for BlocklistConfig
impl Unpin for BlocklistConfig
impl UnwindSafe for BlocklistConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.