no message

This commit is contained in:
hellcat 2026-08-11 14:11:21 +08:00
parent 5fb187fd19
commit 9c03ad1eb6

View File

@ -149,7 +149,7 @@ class ServiceFnPoolV2rayTo
}
$aTransport = [];
if (isset($aCustom["type"]) && $aCustom["type"] != "none" && $aCustom["type"] != "tcp" && $aCustom["type"] != "raw") {
if (isset($aCustom["type"]) && $aCustom["type"] != "none" && $aCustom["type"] != "raw") {
$aTransport["type"] = $aCustom["type"];
if ($aCustom["type"] == "ws" && isset($aTls["server_name"])) {
$aTransport["headers"]["Host"] = $aTls["server_name"];
@ -159,6 +159,9 @@ class ServiceFnPoolV2rayTo
$aTransport["path"] = rawurldecode($aCustom["path"]);
}
if (!empty($aTransport)) {
if (empty($aTransport["type"])) {
$aTransport["type"] = "tcp";
}
$aNode["transport"] = $aTransport;
}
@ -291,7 +294,7 @@ class ServiceFnPoolV2rayTo
$aNode["alter_id"] = (int) $aNode["alter_id"];
$aTransport = [];
if (isset($aConfig["net"]) && $aConfig["net"] != "tcp" && $aConfig["net"] != "none" && $aConfig["net"] != "raw") {
if (isset($aConfig["net"]) && $aConfig["net"] != "none" && $aConfig["net"] != "raw") {
$aTransport["type"] = $aConfig["net"];
}
if (isset($aConfig["path"])) {
@ -301,6 +304,9 @@ class ServiceFnPoolV2rayTo
$aTransport["headers"]["Host"] = $aConfig["host"];
}
if (!empty($aTransport)) {
if (empty($aTransport["type"])) {
$aTransport["type"] = "tcp";
}
$aNode["transport"] = $aTransport;
}
@ -362,7 +368,7 @@ class ServiceFnPoolV2rayTo
$aTransport = [];
if (isset($aCustom["type"]) && $aCustom["type"] != "tcp" && $aCustom["type"] != "raw") {
if (isset($aCustom["type"]) && $aCustom["type"] != "raw") {
$aTransport["type"] = $aCustom["type"];
}
if (isset($aCustom["headerType"]) && $aCustom["headerType"] == "http") {
@ -378,6 +384,9 @@ class ServiceFnPoolV2rayTo
$aTransport["service_name"] = $aCustom["serviceName"];
}
if (!empty($aTransport)) {
if (empty($aTransport["type"])) {
$aTransport["type"] = "tcp";
}
$aNode["transport"] = $aTransport;
}