From 97e2db378111385486ff4935b9bc967cf8a331ca Mon Sep 17 00:00:00 2001 From: taamarin <71506581+taamarin@users.noreply.github.com> Date: Sun, 20 Jul 2025 01:50:53 +0700 Subject: [PATCH] fix(box): remove all '0:, 10: and :999' prefixes from package list in Clash(tun) config --- box/scripts/box.service | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/box/scripts/box.service b/box/scripts/box.service index 8c97097..7c696ae 100755 --- a/box/scripts/box.service +++ b/box/scripts/box.service @@ -347,10 +347,8 @@ prepare_clash() { sed -i "s/include-package:.*/include-package: []/g" "${clash_config}" if [ -n "${list_package}" ]; then - # Remove the "0:" then combine them into one line of commas - list_package_clean=$(echo "$list_package" | cut -d':' -f2 | paste -sd, -) + list_package_clean=$(echo "$list_package" | sed 's/999://g' | sed 's/10://g' | sed 's/0://g' | paste -sd, -) - # Insert into configuration file sed -i "s/${mode}-package:.*/${mode}-package: [\"${list_package_clean//,/\",\"}\"]/g" "${clash_config}" fi