diff --git a/app/Http/Controllers/Client/Protocols/Clash.php b/app/Http/Controllers/Client/Protocols/Clash.php index 03446b12..cd245c04 100644 --- a/app/Http/Controllers/Client/Protocols/Clash.php +++ b/app/Http/Controllers/Client/Protocols/Clash.php @@ -78,6 +78,10 @@ class Clash if ($isFilter) continue; $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 $subsDomain = $_SERVER['HTTP_HOST']; if ($subsDomain) {