From de18cfe596ae3371d2591d7e874c495a32eec76a Mon Sep 17 00:00:00 2001 From: Xboard <147830212+cedar2025@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:45:12 +0800 Subject: [PATCH] fix: resolve hy2 speed limit dispatch issue in Singbox client --- app/Protocols/SingBox.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Protocols/SingBox.php b/app/Protocols/SingBox.php index 3c79a01..1db6d8c 100644 --- a/app/Protocols/SingBox.php +++ b/app/Protocols/SingBox.php @@ -310,6 +310,8 @@ class SingBox $array['tag'] = $server['name']; $array['type'] = 'hysteria2'; $array['password'] = $password; + $array['up_mbps'] = $user->speed_limit ? min($server['down_mbps'], $user->speed_limit) : $server['down_mbps']; + $array['down_mbps'] = $user->speed_limit ? min($server['up_mbps'], $user->speed_limit) : $server['up_mbps']; if ($server['is_obfs']) { $array['obfs']['type'] = 'salamander';