custom outbound for ruleset
This commit is contained in:
+3
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user