mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-28 14:57:22 +08:00
fix(subscribe): fix vmess+tcp+http subscription in general and singbox
This commit is contained in:
@@ -92,8 +92,8 @@ class General extends AbstractProtocol
|
|||||||
$config['type'] = data_get($protocol_settings, 'network_settings.header.type', 'http');
|
$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['path'] = Arr::random(data_get($protocol_settings, 'network_settings.header.request.path', ['/']));
|
||||||
$config['host'] =
|
$config['host'] =
|
||||||
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.headers.Host', ['/']), )
|
? Arr::random(data_get($protocol_settings, 'network_settings.header.request.headers.Host', ['/']), )
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -206,7 +206,8 @@ class SingBox extends AbstractProtocol
|
|||||||
$transport = match ($protocol_settings['network']) {
|
$transport = match ($protocol_settings['network']) {
|
||||||
'tcp' => data_get($protocol_settings, 'network_settings.header.type', 'none') !== 'none' ? [
|
'tcp' => data_get($protocol_settings, 'network_settings.header.type', 'none') !== 'none' ? [
|
||||||
'type' => 'http',
|
'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,
|
] : null,
|
||||||
'ws' => [
|
'ws' => [
|
||||||
'type' => 'ws',
|
'type' => 'ws',
|
||||||
|
|||||||
Reference in New Issue
Block a user