From 60f1fea356136067f9fefa29b5b30fecb55a21af Mon Sep 17 00:00:00 2001 From: xboard Date: Sun, 24 Aug 2025 18:39:00 +0800 Subject: [PATCH] fix(subscribe): fix vmess+tcp+http subscription in general and singbox --- app/Protocols/General.php | 4 ++-- app/Protocols/SingBox.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Protocols/General.php b/app/Protocols/General.php index 7b23fd1..9945926 100644 --- a/app/Protocols/General.php +++ b/app/Protocols/General.php @@ -92,8 +92,8 @@ class General extends AbstractProtocol $config['type'] = data_get($protocol_settings, 'network_settings.header.type', 'http'); $config['path'] = Arr::random(data_get($protocol_settings, 'network_settings.header.request.path', ['/'])); $config['host'] = - data_get($protocol_settings, 'network_settings.headers.Host') - ? Arr::random(data_get($protocol_settings, 'network_settings.headers.Host', ['/']), ) + data_get($protocol_settings, 'network_settings.header.request.headers.Host') + ? Arr::random(data_get($protocol_settings, 'network_settings.header.request.headers.Host', ['/']), ) : null; } break; diff --git a/app/Protocols/SingBox.php b/app/Protocols/SingBox.php index 533726c..5f42500 100644 --- a/app/Protocols/SingBox.php +++ b/app/Protocols/SingBox.php @@ -206,7 +206,8 @@ class SingBox extends AbstractProtocol $transport = match ($protocol_settings['network']) { 'tcp' => data_get($protocol_settings, 'network_settings.header.type', 'none') !== 'none' ? [ 'type' => 'http', - 'path' => Arr::random(data_get($protocol_settings, 'network_settings.header.request.path', ['/'])) + 'path' => Arr::random(data_get($protocol_settings, 'network_settings.header.request.path', ['/'])), + 'host' => data_get($protocol_settings, 'network_settings.header.request.headers.Host', []) ] : null, 'ws' => [ 'type' => 'ws',