From 0ecfbd4ce4ffd4072f738d0bd7860d3d091e681c Mon Sep 17 00:00:00 2001 From: Cyrix126 <58007246+Cyrix126@users.noreply.github.com> Date: Sat, 8 Feb 2025 12:26:13 +0100 Subject: [PATCH] fix: regex to detect new pool --- src/utils/regex.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/utils/regex.rs b/src/utils/regex.rs index 33da3b5..c7dbb60 100644 --- a/src/utils/regex.rs +++ b/src/utils/regex.rs @@ -157,12 +157,8 @@ pub fn nb_current_shares(s: &str) -> Option<u32> { None } pub fn detect_pool_xmrig(s: &str, proxy_port: u16, p2pool_port: u16) -> Option<Pool> { - static CURRENT_SHARE: Lazy<Regex> = Lazy::new(|| { - Regex::new( - r"(use pool|new job from) (?P<pool>(?:[0-9]{1,3}\.){3}[0-9]{1,3}:\d{1,5})(| diff)", - ) - .unwrap() - }); + static CURRENT_SHARE: Lazy<Regex> = + Lazy::new(|| Regex::new(r"(use pool|new job from) (?P<pool>.*:\d{1,5})(| diff)").unwrap()); if let Some(c) = CURRENT_SHARE.captures(s) { if let Some(m) = c.name("pool") { match m.as_str() {