From 9c40b0439248a7cadbaa357b32b1e9d5671aeb89 Mon Sep 17 00:00:00 2001 From: mercury Date: Sun, 18 Aug 2024 20:01:53 +0400 Subject: [PATCH] custom outbound for ruleset --- app/bot.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/bot.php b/app/bot.php index 5249d97..eafe572 100644 --- a/app/bot.php +++ b/app/bot.php @@ -963,7 +963,7 @@ class Bot if (!empty($s = trim($v))) { $t = explode(';', $s); if ($type == 'rulessetlist') { - if (preg_match('~^(?:direct|block|proxy):.+:https?://.+~', $t[0])) { + if (preg_match('~^.+:.+:https?://.+~', $t[0])) { $list[$t[0]] = (bool) $t[1]; } } else { @@ -2244,8 +2244,8 @@ DNS-over-HTTPS with IP: public function addInclude(string $domains, $type) { - if ($type == 'rulessetlist' && !preg_match('~^(?:direct|block|proxy):.+:https?://.+~', $domains)) { - $this->send($this->input['from'], 'wrong pattern, enter [direct|block|proxy]:time:URL'); + if ($type == 'rulessetlist' && !preg_match('~^.+:.+:https?://.+~', $domains)) { + $this->send($this->input['from'], 'wrong pattern, enter [direct|block|proxy|custom outbound]:time:URL'); return; } $domains = explode(',', $domains);