feat: 增加surge的hy2下发、添加clash meta、shadowrocket、stash订阅hy2端口跳跃的下发

This commit is contained in:
xboard
2024-05-14 21:57:36 +08:00
parent 227f50b9d1
commit 5a0e59b103
7 changed files with 107 additions and 74 deletions

View File

@@ -24,10 +24,13 @@ class ClashMeta
$user = $this->user;
$appName = admin_setting('app_name', 'XBoard');
$defaultConfig = base_path() . '/resources/rules/default.clash.yaml';
$customConfig = base_path() . '/resources/rules/custom.clash.yaml';
$customClashConfig = base_path() . '/resources/rules/custom.clash.yaml';
$customConfig = base_path() . '/resources/rules/custom.clashmeta.yaml';
if (\File::exists($customConfig)) {
$config = Yaml::parseFile($customConfig);
} else {
} elseif(\File::exists($customClashConfig)) {
$config = Yaml::parseFile($customClashConfig);
} else{
$config = Yaml::parseFile($defaultConfig);
}
$proxy = [];
@@ -310,6 +313,7 @@ class ClashMeta
$array['obfs'] = 'salamander';
$array['obfs-password'] = $server['server_key'];
}
if(isset($server['ports'])) $array['ports'] = $server['ports'];
break;
}