mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-24 03:57:27 +08:00
feat: add xhttp subscriptions, network monitoring, chart legend toggle and ticket sender labels
This commit is contained in:
@@ -36,6 +36,27 @@ class ClashMeta extends AbstractProtocol
|
||||
'http' => '0.0.0',
|
||||
'h2' => '0.0.0',
|
||||
'httpupgrade' => '0.0.0',
|
||||
'xhttp' => '0.0.0',
|
||||
],
|
||||
'strict' => true,
|
||||
],
|
||||
'*.vmess.protocol_settings.network' => [
|
||||
'whitelist' => [
|
||||
'tcp' => '0.0.0',
|
||||
'ws' => '0.0.0',
|
||||
'grpc' => '0.0.0',
|
||||
'http' => '0.0.0',
|
||||
'h2' => '0.0.0',
|
||||
'httpupgrade' => '0.0.0',
|
||||
],
|
||||
'strict' => true,
|
||||
],
|
||||
'*.trojan.protocol_settings.network' => [
|
||||
'whitelist' => [
|
||||
'tcp' => '0.0.0',
|
||||
'ws' => '0.0.0',
|
||||
'grpc' => '0.0.0',
|
||||
'httpupgrade' => '0.0.0',
|
||||
],
|
||||
'strict' => true,
|
||||
],
|
||||
@@ -468,6 +489,18 @@ class ClashMeta extends AbstractProtocol
|
||||
if ($host = data_get($protocol_settings, 'network_settings.host'))
|
||||
$array['ws-opts']['headers'] = ['Host' => $host];
|
||||
break;
|
||||
case 'xhttp':
|
||||
$array['network'] = 'xhttp';
|
||||
$xhttpOpts = [];
|
||||
if ($path = data_get($protocol_settings, 'network_settings.path'))
|
||||
$xhttpOpts['path'] = $path;
|
||||
if ($host = data_get($protocol_settings, 'network_settings.host'))
|
||||
$xhttpOpts['host'] = $host;
|
||||
if ($mode = data_get($protocol_settings, 'network_settings.mode'))
|
||||
$xhttpOpts['mode'] = $mode;
|
||||
if (!empty($xhttpOpts))
|
||||
$array['xhttp-opts'] = $xhttpOpts;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user