mirror of
https://github.com/Hopiu/lychee.git
synced 2026-04-07 23:10:59 +00:00
29 lines
721 B
Rust
29 lines
721 B
Rust
use regex::RegexSet;
|
|
|
|
/// Exclude configuration for the link checker.
|
|
/// You can ignore links based on regex patterns or pre-defined IP ranges.
|
|
#[derive(Clone, Debug)]
|
|
pub struct Excludes {
|
|
pub regex: Option<RegexSet>,
|
|
/// Example: 192.168.0.1
|
|
pub private_ips: bool,
|
|
/// Example: 169.254.0.0
|
|
pub link_local_ips: bool,
|
|
/// For IPv4: 127.0. 0.1/8
|
|
/// For IPv6: ::1/128
|
|
pub loopback_ips: bool,
|
|
/// Example: octocat@github.com
|
|
pub mail: bool,
|
|
}
|
|
|
|
impl Default for Excludes {
|
|
fn default() -> Self {
|
|
Self {
|
|
regex: None,
|
|
private_ips: false,
|
|
link_local_ips: false,
|
|
loopback_ips: false,
|
|
mail: false,
|
|
}
|
|
}
|
|
}
|