修复V2rayNG的SS2022订阅

This commit is contained in:
wyx2685 2023-10-13 09:28:50 +09:00
parent 30e2f156a3
commit dffe39b6d9
No known key found for this signature in database
GPG Key ID: 8827A30FF1DB1379

View File

@ -41,6 +41,16 @@ class V2rayNG
public static function buildShadowsocks($password, $server)
{
if ($server['cipher'] === '2022-blake3-aes-128-gcm') {
$serverKey = Helper::getServerKey($server['created_at'], 16);
$userKey = Helper::uuidToBase64($password, 16);
$password = "{$serverKey}:{$userKey}";
}
if ($server['cipher'] === '2022-blake3-aes-256-gcm') {
$serverKey = Helper::getServerKey($server['created_at'], 32);
$userKey = Helper::uuidToBase64($password, 32);
$password = "{$serverKey}:{$userKey}";
}
$name = rawurlencode($server['name']);
$str = str_replace(
['+', '/', '='],