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

@ -80,6 +80,11 @@ class V2rayN
$config['sni'] = $tlsSettings['serverName'];
}
}
if ((string)$server['network'] === 'tcp') {
$tcpSettings = $server['networkSettings'];
if (isset($tcpSettings['header']['type'])) $config['type'] = $tcpSettings['header']['type'];
if (isset($tcpSettings['header']['request']['path'][0])) $config['path'] = $tcpSettings['header']['request']['path'][0];
}
if ((string)$server['network'] === 'ws') {
$wsSettings = $server['networkSettings'];
if (isset($wsSettings['path'])) $config['path'] = $wsSettings['path'];