feat(protocols): add support for ss obfs, ss2022, and vless reality

- Clash and Clash Meta: Added support for Shadowsocks (SS) with obfs.
- Loon: Added support for SS2022 and obfs.
- Stash: Added support for SS2022, obfs, and VLESS Reality.
This commit is contained in:
xboard
2025-05-16 06:43:58 +08:00
parent bbeede8dbc
commit e49f88d311
5 changed files with 49 additions and 26 deletions
+8
View File
@@ -153,6 +153,7 @@ class ClashMeta implements ProtocolInterface
public static function buildShadowsocks($password, $server)
{
$protocol_settings = $server['protocol_settings'];
$array = [];
$array['name'] = $server['name'];
$array['type'] = 'ss';
@@ -161,6 +162,13 @@ class ClashMeta implements ProtocolInterface
$array['cipher'] = data_get($server['protocol_settings'], 'cipher');
$array['password'] = data_get($server, 'password', $password);
$array['udp'] = true;
if (data_get($protocol_settings, 'obfs') == 'http') {
$array['plugin'] = 'obfs';
$array['plugin-opts'] = [
'mode' => 'http',
'host' => data_get($protocol_settings, 'obfs.host'),
];
}
return $array;
}