From 62158369261d583c6109ae4cb7eaf4a5df9350bb Mon Sep 17 00:00:00 2001 From: mercury Date: Wed, 23 Oct 2024 03:01:10 +0400 Subject: [PATCH] fix empty route rules for singbox --- app/bot.php | 8 ++++++++ version | 2 ++ 2 files changed, 10 insertions(+) diff --git a/app/bot.php b/app/bot.php index 9bb6277..9b89cf4 100644 --- a/app/bot.php +++ b/app/bot.php @@ -5043,6 +5043,14 @@ DNS-over-HTTPS with IP: } $json['routing']['rules'] = array_values($json['routing']['rules']); } + if (!empty($json['route']['rules'])) { + foreach ($json['route']['rules'] as $k => $v) { + if (count($v) < 2) { + unset($json['route']['rules'][$k]); + } + } + $json['route']['rules'] = array_values($json['route']['rules']); + } return json_encode($json); } diff --git a/version b/version index 3862666..8759827 100644 --- a/version +++ b/version @@ -1,3 +1,5 @@ +23.10.2024 v1.80 +- фикс пустых правил для singbox 23.10.2024 v1.79 - улучшение процесса обновления 23.10.2024 v1.78