update: Support TCP-HTTP sub rules

This commit is contained in:
Cp0204
2023-03-27 21:53:52 +08:00
parent d4ac203805
commit f9e79018d8
9 changed files with 49 additions and 0 deletions

View File

@ -129,6 +129,11 @@ class Clash
$array['servername'] = $tlsSettings['serverName'];
}
}
if ($server['network'] === 'tcp') {
$tcpSettings = $server['networkSettings'];
if (isset($tcpSettings['header']['type'])) $array['network'] = $tcpSettings['header']['type'];
if (isset($tcpSettings['header']['request']['path'][0])) $array['http-opts']['path'] = $tcpSettings['header']['request']['path'][0];
}
if ($server['network'] === 'ws') {
$array['network'] = 'ws';
if ($server['networkSettings']) {