no message

This commit is contained in:
hellcat 2026-08-11 14:59:58 +08:00
parent 9c03ad1eb6
commit c95266e799
3 changed files with 1084 additions and 12 deletions

View File

@ -55,7 +55,7 @@ class ServiceFnPoolV2rayTo
return $aNode; return $aNode;
} }
private function mod_to_socks($aV2ray) private function mod_to_socks__($aV2ray)
{ {
$sConfig = $aV2ray["config"] ?? ''; $sConfig = $aV2ray["config"] ?? '';
@ -149,19 +149,26 @@ class ServiceFnPoolV2rayTo
} }
$aTransport = []; $aTransport = [];
if (isset($aCustom["type"]) && $aCustom["type"] != "none" && $aCustom["type"] != "raw") { if ($aCustom["type"] == "ws" && isset($aTls["server_name"])) {
$aTransport["type"] = $aCustom["type"]; $aTransport["headers"]["Host"] = $aTls["server_name"];
if ($aCustom["type"] == "ws" && isset($aTls["server_name"])) {
$aTransport["headers"]["Host"] = $aTls["server_name"];
}
} }
// if (isset($aCustom["type"]) && $aCustom["type"] != "tcp" && $aCustom["type"] != "none" && $aCustom["type"] != "raw") {
// $aTransport["type"] = $aCustom["type"];
// if ($aCustom["type"] == "ws" && isset($aTls["server_name"])) {
// $aTransport["headers"]["Host"] = $aTls["server_name"];
// }
// }
if (isset($aCustom["path"])) { if (isset($aCustom["path"])) {
$aTransport["path"] = rawurldecode($aCustom["path"]); $aTransport["path"] = rawurldecode($aCustom["path"]);
} }
if (!empty($aTransport)) { if (!empty($aTransport)) {
if (empty($aTransport["type"])) { if (isset($aCustom["type"]) && $aCustom["type"] != "none" && $aCustom["type"] != "raw") {
$aTransport["type"] = "tcp"; $aTransport["type"] = $aCustom["type"];
} }
// if (empty($aTransport["type"])) {
// $aTransport["type"] = "tcp";
// }
$aNode["transport"] = $aTransport; $aNode["transport"] = $aTransport;
} }
@ -170,7 +177,7 @@ class ServiceFnPoolV2rayTo
return $aV2ray; return $aV2ray;
} }
private function mod_to_hysteria2($aV2ray) private function mod_to_hysteria2__($aV2ray)
{ {
$sConfig = $aV2ray["config"] ?? ''; $sConfig = $aV2ray["config"] ?? '';
@ -278,7 +285,7 @@ class ServiceFnPoolV2rayTo
return $aV2ray; return $aV2ray;
} }
private function mod_to_vmess($aV2ray) private function mod_to_vmess__($aV2ray)
{ {
$aNode = []; $aNode = [];
$aConfig = $aV2ray["config"]; $aConfig = $aV2ray["config"];
@ -327,7 +334,7 @@ class ServiceFnPoolV2rayTo
return $aV2ray; return $aV2ray;
} }
private function mod_to_vless($aV2ray) private function mod_to_vless__($aV2ray)
{ {
$sConfig = $aV2ray['config'] ?? ''; $sConfig = $aV2ray['config'] ?? '';

View File

@ -47,7 +47,9 @@
{ {
"type": "selector", "type": "selector",
"tag": "default", "tag": "default",
"outbounds": [] "outbounds": [
"test"
]
}, },
{ {
"type": "direct", "type": "direct",
@ -56,6 +58,25 @@
{ {
"type": "block", "type": "block",
"tag": "block" "tag": "block"
},
{
"type": "trojan",
"tag": "test",
"server": "119.246.1.143",
"server_port": 443,
"password": "BxceQaOe",
"tls": {
"server_name": "t.me",
"insecure": true,
"utls": {
"fingerprint": "chrome",
"enabled": true
},
"enabled": true
},
"transport": {
"type": "http"
}
} }
], ],
"route": { "route": {

File diff suppressed because it is too large Load Diff