Browse Source

update: custom v2ray alter id

Tokumeikoi 4 years ago
parent
commit
e030ed8d80
2 changed files with 3 additions and 2 deletions
  1. 1 1
      app/Utils/Clash.php
  2. 2 1
      app/Utils/Shadowrocket.php

+ 1 - 1
app/Utils/Clash.php

@@ -26,7 +26,7 @@ class Clash
         $array['server'] = $server['host'];
         $array['port'] = $server['port'];
         $array['uuid'] = $uuid;
-        $array['alterId'] = 2;
+        $array['alterId'] = $server['alter_id'];
         $array['cipher'] = 'auto';
         $array['udp'] = true;
         if ($server['tls']) {

+ 2 - 1
app/Utils/Shadowrocket.php

@@ -20,7 +20,8 @@ class Shadowrocket
     {
         $userinfo = base64_encode('auto:' . $uuid . '@' . $server['host'] . ':' . $server['port']);
         $config = [
-            'remark' => $server['name']
+            'remark' => $server['name'],
+            'alterId' => $server['alter_id']
         ];
         if ($server['tls']) {
             $tlsSettings = json_decode($server['tlsSettings'], true);