fix(subscribe): fix vmess+tcp+http subscription in general and singbox

This commit is contained in:
xboard
2025-08-24 18:39:00 +08:00
parent 84d5a4f005
commit 60f1fea356
2 changed files with 4 additions and 3 deletions

View File

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

View File

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