|
|
@@ -3,6 +3,8 @@
|
|
|
namespace App\Http\Controllers\Client\Protocols;
|
|
|
|
|
|
|
|
|
+use App\Utils\Helper;
|
|
|
+
|
|
|
class V2rayN
|
|
|
{
|
|
|
public $flag = 'v2rayn';
|
|
|
@@ -37,6 +39,16 @@ class V2rayN
|
|
|
|
|
|
public static function buildShadowsocks($password, $server)
|
|
|
{
|
|
|
+ if ($server['cipher'] === '2022-blake3-aes-128-gcm') {
|
|
|
+ $serverKey = Helper::getShadowsocksServerKey($server['created_at'], 16);
|
|
|
+ $userKey = Helper::uuidToBase64($password, 16);
|
|
|
+ $password = "{$serverKey}:{$userKey}";
|
|
|
+ }
|
|
|
+ if ($server['cipher'] === '2022-blake3-aes-256-gcm') {
|
|
|
+ $serverKey = Helper::getShadowsocksServerKey($server['created_at'], 32);
|
|
|
+ $userKey = Helper::uuidToBase64($password, 32);
|
|
|
+ $password = "{$serverKey}:{$userKey}";
|
|
|
+ }
|
|
|
$name = rawurlencode($server['name']);
|
|
|
$str = str_replace(
|
|
|
['+', '/', '='],
|