diff --git a/app/Protocols/V2rayNG.php b/app/Protocols/V2rayNG.php index a91deeb7..9166fa60 100644 --- a/app/Protocols/V2rayNG.php +++ b/app/Protocols/V2rayNG.php @@ -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( ['+', '/', '='],