fix: resolve hy2 speed limit dispatch issue in Singbox client

This commit is contained in:
Xboard 2024-12-09 18:45:12 +08:00 committed by GitHub
parent f86ccae28c
commit de18cfe596
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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';