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