feat: Support Shadowsocks obfs config

This commit is contained in:
ishkong 2024-07-21 13:58:22 +08:00 committed by GitHub
parent c7b15e6b8b
commit dd8267097e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,6 +161,11 @@ class ServerService
$userKey = Helper::uuidToBase64($user['uuid'], $config['userKeySize']);
$shadowsocks[$key]['password'] = "{$serverKey}:{$userKey}";
}
if ($v['obfs'] === 'http') {
$shadowsocks[$key]['obfs'] = 'http';
$shadowsocks[$key]['obfs-host'] = $v['obfs_settings']['host'];
$shadowsocks[$key]['obfs-path'] = $v['obfs_settings']['path'];
}
$servers[] = $shadowsocks[$key]->toArray();
}
return $servers;