update: clash remove proxies empty group

This commit is contained in:
v2board 2023-03-08 02:26:10 +08:00
parent 9a28d27082
commit e745c2a5be

View File

@ -78,6 +78,10 @@ class Clash
if ($isFilter) continue; if ($isFilter) continue;
$config['proxy-groups'][$k]['proxies'] = array_merge($config['proxy-groups'][$k]['proxies'], $proxies); $config['proxy-groups'][$k]['proxies'] = array_merge($config['proxy-groups'][$k]['proxies'], $proxies);
} }
$config['proxy-groups'] = array_filter($config['proxy-groups'], function($group) {
return $group['proxies'];
});
// Force the current subscription domain to be a direct rule // Force the current subscription domain to be a direct rule
$subsDomain = $_SERVER['HTTP_HOST']; $subsDomain = $_SERVER['HTTP_HOST'];
if ($subsDomain) { if ($subsDomain) {