mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-24 12:07:28 +08:00
feat: Trojan Reality support and protocol distribution optimizations
This commit is contained in:
@@ -199,8 +199,9 @@ class Clash extends AbstractProtocol
|
||||
|
||||
switch (data_get($protocol_settings, 'network')) {
|
||||
case 'tcp':
|
||||
$array['network'] = data_get($protocol_settings, 'network_settings.header.type');
|
||||
if (data_get($protocol_settings, 'network_settings.header.type', 'none') !== 'none') {
|
||||
$headerType = data_get($protocol_settings, 'network_settings.header.type', 'none');
|
||||
$array['network'] = ($headerType === 'http') ? 'http' : 'tcp';
|
||||
if ($headerType === 'http') {
|
||||
if ($httpOpts = array_filter([
|
||||
'headers' => data_get($protocol_settings, 'network_settings.header.request.headers'),
|
||||
'path' => data_get($protocol_settings, 'network_settings.header.request.path', ['/'])
|
||||
|
||||
Reference in New Issue
Block a user