pub struct RecursorOptions {Show 13 fields
pub ns_cache_size: usize,
pub response_cache_size: u64,
pub recursion_limit: u8,
pub ns_recursion_limit: u8,
pub allow_answers: Vec<IpNet>,
pub deny_answers: Vec<IpNet>,
pub allow_server: Vec<IpNet>,
pub deny_server: Vec<IpNet>,
pub avoid_local_udp_ports: HashSet<u16>,
pub cache_policy: TtlConfig,
pub case_randomization: bool,
pub opportunistic_encryption: OpportunisticEncryption,
pub edns_payload_len: u16,
}recursor only.Expand description
Options for the Recursor
Fields§
§ns_cache_size: usizeMaximum nameserver cache size
response_cache_size: u64Maximum DNS response cache size
recursion_limit: u8Maximum recursion depth for queries
Setting to 0 will fail all requests requiring recursion.
ns_recursion_limit: u8Maximum recursion depth for building NS pools
Setting to 0 will fail all requests requiring recursion.
allow_answers: Vec<IpNet>Networks that will not be filtered from responses. This overrides anything present in deny_answers
deny_answers: Vec<IpNet>Networks that will be filtered from responses
allow_server: Vec<IpNet>Networks that will be queried during resolution
deny_server: Vec<IpNet>Networks that will not be queried during resolution
avoid_local_udp_ports: HashSet<u16>Local UDP ports to avoid when making outgoing queries
cache_policy: TtlConfigCaching policy, setting minimum and maximum TTLs
case_randomization: boolEnable case randomization.
Randomize the case of letters in query names, and require that responses preserve the case of the query name, in order to mitigate spoofing attacks. This is only applied over UDP.
This implements the mechanism described in draft-vixie-dnsext-dns0x20-00.
opportunistic_encryption: OpportunisticEncryptionConfigure RFC 9539 opportunistic encryption.
edns_payload_len: u16Configure the EDNS UDP payload size used in queries.
Trait Implementations§
Source§impl Clone for RecursorOptions
impl Clone for RecursorOptions
Source§fn clone(&self) -> RecursorOptions
fn clone(&self) -> RecursorOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RecursorOptions
impl Debug for RecursorOptions
Source§impl Default for RecursorOptions
impl Default for RecursorOptions
Source§impl<'de> Deserialize<'de> for RecursorOptions
impl<'de> Deserialize<'de> for RecursorOptions
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 RecursorOptions
impl PartialEq for RecursorOptions
impl Eq for RecursorOptions
impl StructuralPartialEq for RecursorOptions
Auto Trait Implementations§
impl Freeze for RecursorOptions
impl RefUnwindSafe for RecursorOptions
impl Send for RecursorOptions
impl Sync for RecursorOptions
impl Unpin for RecursorOptions
impl UnsafeUnpin for RecursorOptions
impl UnwindSafe for RecursorOptions
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more