diff --git a/app/Utils/Clash.php b/app/Utils/Clash.php index 08092cbe..8c4091df 100644 --- a/app/Utils/Clash.php +++ b/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']) { diff --git a/app/Utils/Shadowrocket.php b/app/Utils/Shadowrocket.php index 504dbd24..fe562c93 100644 --- a/app/Utils/Shadowrocket.php +++ b/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);