From 1db1e885c20dbbfdc87c8e6673ea772a51f9d288 Mon Sep 17 00:00:00 2001 From: xboard Date: Thu, 8 May 2025 21:29:07 +0800 Subject: [PATCH] fix(stash): resolve incorrect ports deployment --- app/Protocols/Stash.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Protocols/Stash.php b/app/Protocols/Stash.php index 4d2522c..16a4747 100644 --- a/app/Protocols/Stash.php +++ b/app/Protocols/Stash.php @@ -283,6 +283,9 @@ class Stash implements ProtocolInterface if ($serverName = data_get($protocol_settings, 'tls.server_name')) { $array['sni'] = $serverName; } + if (isset($server['ports'])) { + $array['ports'] = $server['ports']; + } switch (data_get($protocol_settings, 'version')) { case 1: $array['type'] = 'hysteria'; @@ -294,7 +297,6 @@ class Stash implements ProtocolInterface $array['type'] = 'hysteria2'; $array['auth'] = $password; $array['fast-open'] = true; - $array['ports'] = data_get($protocol_settings, 'ports'); break; } return $array;