mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-22 10:38:14 -05:00
Merge pull request #312 from NekoCareLab/new
Fixed Multiplt Vmess+TCP bugs for shadowrocket
This commit is contained in:
commit
fd4dc9064f
@ -96,8 +96,11 @@ class Shadowrocket implements ProtocolInterface
|
||||
|
||||
switch (data_get($protocol_settings, 'network')) {
|
||||
case 'tcp':
|
||||
$config['obfs'] = data_get($protocol_settings, 'network_settings.header.type');
|
||||
$config['path'] = \Arr::ra(data_get($protocol_settings, 'network_settings.header.request.path', ['/']));
|
||||
if (data_get($protocol_settings, 'network_settings.header.type', 'none') !== 'none') {
|
||||
$config['obfs'] = data_get($protocol_settings, 'network_settings.header.type');
|
||||
$config['path'] = \Arr::random(data_get($protocol_settings, 'network_settings.header.request.path', ['/']));
|
||||
$config['obfsParam'] = \Arr::random(data_get($protocol_settings, 'network_settings.header.request.headers.Host', ['www.example.com']));
|
||||
}
|
||||
break;
|
||||
case 'ws':
|
||||
$config['obfs'] = "websocket";
|
||||
@ -161,13 +164,18 @@ class Shadowrocket implements ProtocolInterface
|
||||
}
|
||||
switch (data_get($protocol_settings, 'network')) {
|
||||
case 'tcp':
|
||||
$config['obfs'] = data_get($protocol_settings, 'network_settings.header.type');
|
||||
$config['path'] = \Arr::random(data_get($protocol_settings, 'network_settings.header.request.path', ['/']));
|
||||
$config['obfsParam'] = \Arr::random(data_get($protocol_settings, 'network_settings.header.request.headers.Host', ['/']));
|
||||
if (data_get($protocol_settings, 'network_settings.header.type', 'none') !== 'none') {
|
||||
$config['obfs'] = data_get($protocol_settings, 'network_settings.header.type');
|
||||
$config['path'] = \Arr::random(data_get($protocol_settings, 'network_settings.header.request.path', ['/']));
|
||||
$config['obfsParam'] = \Arr::random(data_get($protocol_settings, 'network_settings.header.request.headers.Host', ['www.example.com']));
|
||||
}
|
||||
break;
|
||||
case 'ws':
|
||||
$config['obfs'] = "websocket";
|
||||
$config['path'] = data_get($protocol_settings, 'network_settings.path');
|
||||
if (data_get($protocol_settings, 'network_settings.path')) {
|
||||
$config['path'] = data_get($protocol_settings, 'network_settings.path');
|
||||
}
|
||||
|
||||
if ($host = data_get($protocol_settings, 'network_settings.headers.Host')) {
|
||||
$config['obfsParam'] = $host;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user