Fixed Vmess TCP

This commit is contained in:
NekoCareLab 2025-01-12 23:16:55 +08:00
parent 51664a4da0
commit 676e6bc57c
No known key found for this signature in database

View File

@ -82,9 +82,11 @@ class General implements ProtocolInterface
switch ($protocol_settings['network']) {
case 'tcp':
$config['type'] = 'http';
if (data_get($protocol_settings, 'network_settings.header.type', 'none') !== 'none') {
$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'),['/']) : null;
$config['host'] = data_get($protocol_settings, 'network_settings.headers.Host') ? \Arr::random(data_get($protocol_settings, 'network_settings.headers.Host'), ['/']) : null;
}
break;
case 'ws':
$config['type'] = 'ws';