reformat
This commit is contained in:
+1
-1
@@ -115,7 +115,7 @@ pub async fn save_proxies(
|
||||
.wrap_err_with(move || {
|
||||
format!(
|
||||
"failed to lookup {exit_ip_addr} in ASN \
|
||||
database"
|
||||
database"
|
||||
)
|
||||
})?
|
||||
} else {
|
||||
|
||||
+7
-7
@@ -4,17 +4,17 @@ use color_eyre::eyre::WrapErr as _;
|
||||
|
||||
pub static PROXY_REGEX: LazyLock<fancy_regex::Regex> = LazyLock::new(|| {
|
||||
fancy_regex::RegexBuilder::new(
|
||||
r"(?:^|[^0-9A-Za-z])(?:(?P<protocol>https?|socks[45]):\/\/)?(?:(?P<username>[\dA-Za-z]+):(?P<password>[\dA-Za-z]+)@)?(?P<host>[A-Za-z][\-\.A-Za-z]*[A-Za-z]|[A-Za-z]|(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}):(?P<port>[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(?=[^0-9A-Za-z]|$)",
|
||||
)
|
||||
.case_insensitive(true)
|
||||
.backtrack_limit(usize::MAX)
|
||||
.build()
|
||||
.unwrap()
|
||||
r"(?:^|[^0-9A-Za-z])(?:(?P<protocol>https?|socks[45]):\/\/)?(?:(?P<username>[\dA-Za-z]+):(?P<password>[\dA-Za-z]+)@)?(?P<host>[A-Za-z][\-\.A-Za-z]*[A-Za-z]|[A-Za-z]|(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}):(?P<port>[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(?=[^0-9A-Za-z]|$)",
|
||||
)
|
||||
.case_insensitive(true)
|
||||
.backtrack_limit(usize::MAX)
|
||||
.build()
|
||||
.unwrap()
|
||||
});
|
||||
|
||||
static IPV4_REGEX: LazyLock<fancy_regex::Regex> = LazyLock::new(|| {
|
||||
fancy_regex::Regex::new(
|
||||
r"^\s*(?:[0-9:A-Fa-f]+,)?\s*(?P<host>(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3})(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?\s*$"
|
||||
r"^\s*(?:[0-9:A-Fa-f]+,)?\s*(?P<host>(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3})(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?\s*$",
|
||||
)
|
||||
.unwrap()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user