mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update: protocol match rule
This commit is contained in:
commit
4c06c0cd51
@ -23,7 +23,7 @@ class ClientController extends Controller
|
||||
$servers = $serverService->getAvailableServers($user);
|
||||
$this->setSubscribeInfoToServers($servers, $user);
|
||||
if ($flag) {
|
||||
foreach (glob(app_path('Http//Controllers//Client//Protocols') . '/*.php') as $file) {
|
||||
foreach (array_reverse(glob(app_path('Http//Controllers//Client//Protocols') . '/*.php')) as $file) {
|
||||
$file = 'App\\Http\\Controllers\\Client\\Protocols\\' . basename($file, '.php');
|
||||
$class = new $file($user, $servers);
|
||||
if (strpos($flag, $class->flag) !== false) {
|
||||
|
@ -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) {
|
||||
|
@ -68,6 +68,9 @@ class ClashMeta
|
||||
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) {
|
||||
|
@ -75,6 +75,9 @@ class Stash
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user