mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-24 03:57:27 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user