dnsbl on connect (m_dnsbl-style, ipv4+ipv6, own module), cache + parallelize resolver, group connect notices before cap
This commit is contained in:
parent
296d87726a
commit
e736188378
9 changed files with 440 additions and 47 deletions
|
|
@ -71,6 +71,9 @@ pub struct Config {
|
|||
pub amu: AntiMixedCfg, // antimixedutf8 module config
|
||||
pub resolve_hosts: bool, // reverse-DNS clients on connect (default on)
|
||||
pub use_resolved_host: bool, // put the resolved hostname in the hostmask (default on)
|
||||
pub dnsbl_zones: Vec<String>, // DNS blocklist zones to check on connect
|
||||
pub dnsbl_action: String, // mark | kline | gline | zline (on a hit)
|
||||
pub dnsbl_reason: String, // ban reason for a DNSBL hit
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
|
|
@ -94,6 +97,9 @@ impl Default for Config {
|
|||
amu: AntiMixedCfg::default(),
|
||||
resolve_hosts: true,
|
||||
use_resolved_host: true,
|
||||
dnsbl_zones: Vec::new(),
|
||||
dnsbl_action: "mark".to_string(),
|
||||
dnsbl_reason: "Your host is listed in a DNS blocklist".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -219,6 +225,13 @@ impl Config {
|
|||
"off" | "false" | "no" | "0"
|
||||
)
|
||||
}
|
||||
"dnsbl" | "dnsbl_zone" => {
|
||||
if !v.is_empty() {
|
||||
c.dnsbl_zones.push(v.to_string());
|
||||
}
|
||||
}
|
||||
"dnsbl_action" => c.dnsbl_action = v.to_ascii_lowercase(),
|
||||
"dnsbl_reason" => c.dnsbl_reason = v.to_string(),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue