From a1f9c3ff08d55ed96d5e93a83c55461d250298ee Mon Sep 17 00:00:00 2001 From: Student Main Date: Wed, 21 Oct 2020 17:17:04 +0000 Subject: [PATCH] Update abp.js --- shadowsocks-csharp/Data/abp.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shadowsocks-csharp/Data/abp.js b/shadowsocks-csharp/Data/abp.js index 1d5bcdcf..432a6385 100644 --- a/shadowsocks-csharp/Data/abp.js +++ b/shadowsocks-csharp/Data/abp.js @@ -10,15 +10,16 @@ var userrules = []; var rules = []; // convert to abp grammar +var re = /^(@@)?\|\|.*?[^\^]$/; for (var i = 0; i < __RULES__.length; i++) { var s = __RULES__[i]; - if (s.substring(0, 2) == "||") s += "^"; + if (s.match(re)) s += "^"; rules.push(s); } for (var i = 0; i < __USERRULES__.length; i++) { var s = __USERRULES__[i]; - if (s.substring(0, 2) == "||") s += "^"; + if (s.match(re)) s += "^"; userrules.push(s); }