Skip to content

Commit f1d6450

Browse files
committed
bugfix: acl rule pattern match error for tree rule, which causes heavy regex set match
1 parent 79d5c46 commit f1d6450

File tree

1 file changed

+1
-1
lines changed
  • crates/shadowsocks-service/src/acl

1 file changed

+1
-1
lines changed

crates/shadowsocks-service/src/acl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl ParsingRules {
192192
fn add_regex_rule(&mut self, mut rule: String) {
193193
static TREE_SET_RULE_EQUIV: Lazy<Regex> = Lazy::new(|| {
194194
RegexBuilder::new(
195-
r#"^(?:(?:\((?:\?:)?\^\|\\\.\)|(?:\^\.(?:\+|\*))?\\\.)((?:[\w-]+(?:\\\.)?)+)|\^((?:[\w-]+(?:\\\.)?)+))\$$"#,
195+
r#"^(?:(?:\((?:\?:)?\^\|\\\.\)|(?:\^\.(?:\+|\*))?\\\.)((?:[\w-]+(?:\\\.)?)+)|\^((?:[\w-]+(?:\\\.)?)+))$"#,
196196
)
197197
.unicode(false)
198198
.build()

0 commit comments

Comments
 (0)