merge: sync upstream/master preserving local changes
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,
|
||||
],
|
||||
@@ -568,6 +589,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;
|
||||
}
|
||||
@@ -602,8 +635,8 @@ class ClashMeta extends AbstractProtocol
|
||||
];
|
||||
break;
|
||||
default: // Standard TLS
|
||||
$array['skip-cert-verify'] = (bool) data_get($protocol_settings, 'tls_settings.allow_insecure', data_get($protocol_settings, 'allow_insecure', false));
|
||||
if ($serverName = data_get($protocol_settings, 'tls_settings.server_name', data_get($protocol_settings, 'server_name'))) {
|
||||
$array['skip-cert-verify'] = (bool) data_get($protocol_settings, 'tls_settings.allow_insecure', false);
|
||||
if ($serverName = data_get($protocol_settings, 'tls_settings.server_name')) {
|
||||
$array['sni'] = $serverName;
|
||||
}
|
||||
self::appendEch($array, data_get($protocol_settings, 'tls_settings.ech'));
|
||||
|
||||
Reference in New Issue
Block a user