From 5fb187fd198d37937df603a6c4766b41ecb08c21 Mon Sep 17 00:00:00 2001 From: hellcat Date: Tue, 11 Aug 2026 13:32:59 +0800 Subject: [PATCH] no message --- app/Services/ServiceFnPoolV2rayTo.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/Services/ServiceFnPoolV2rayTo.php b/app/Services/ServiceFnPoolV2rayTo.php index ec1b4533..a7d8134c 100644 --- a/app/Services/ServiceFnPoolV2rayTo.php +++ b/app/Services/ServiceFnPoolV2rayTo.php @@ -70,13 +70,13 @@ class ServiceFnPoolV2rayTo $aTmp = explode(":", $sConfig, 2); $sAddr = $aTmp[0] ?? ''; - $iPort = (int) $aTmp[1] ?? ''; + $iPort = $aTmp[1] ?? ''; $aNode = [ "type" => "socks", "tag" => $aV2ray['country'] ?? '', "server"=> $sAddr, - "server_port" => $iPort, + "server_port" => (int) $iPort, "username" => $sUser, "password" => $sPwd ]; @@ -100,13 +100,13 @@ class ServiceFnPoolV2rayTo $aTmp = explode(":", $sAddrFull, 2); $sAddr = $aTmp[0] ?? ''; - $iPort = (int) $aTmp[1] ?? ''; + $iPort = $aTmp[1] ?? ''; $aNode = [ "type" => "trojan", "tag" => $aV2ray['country'] ?? '', "server"=> $sAddr, - "server_port" => $iPort, + "server_port" => (int) $iPort, "password" => $sPwd ]; @@ -180,7 +180,7 @@ class ServiceFnPoolV2rayTo $sConfig = $aTmp[1] ?? ''; $aTmp = explode(":", $sAddrFull, 2); $sAddr = $aTmp[0] ?? ''; - $iPort = (int) $aTmp[1] ?? ''; + $iPort = $aTmp[1] ?? ''; $cCustom = explode("&", $sConfig); $aCustom = []; @@ -195,7 +195,7 @@ class ServiceFnPoolV2rayTo "type" => "hysteria2", "tag" => $aV2ray['country'] ?? '', "server"=> $sAddr, - "server_port" => $iPort, + "server_port" => (int) $iPort, "password" => $sPwd ]; @@ -243,7 +243,7 @@ class ServiceFnPoolV2rayTo $aTmp = explode(":", $sConfig, 2); $sAddr = $aTmp[0] ?? ''; - $iPort = (int) $aTmp[1] ?? ''; + $iPort = $aTmp[1] ?? ''; // 推荐的现代化 SS 算法白名单 $aAllowedCiphers = [ @@ -265,7 +265,7 @@ class ServiceFnPoolV2rayTo "type" => "shadowsocks", "tag" => $aV2ray['country'] ?? '', "server" => $sAddr, - "server_port" => $iPort, + "server_port" => (int) $iPort, "method" => $sPwdType, "password" => $sPwd, ]; @@ -283,10 +283,12 @@ class ServiceFnPoolV2rayTo $aNode["type"] = "vmess"; $aNode["tag"] = $aV2ray['country'] ?? ''; $aNode["server"] = $aConfig["add"] ?? ''; - $aNode["server_port"] = (int) $aConfig["port"] ?? ''; + $aNode["server_port"] = $aConfig["port"] ?? ''; // Cannot access offset of type string on string + $aNode["server_port"] = (int) $aNode["server_port"]; $aNode["uuid"] = $aConfig["id"] ?? ''; $aNode["security"] = $aConfig["scy"] ?? 'auto'; - $aNode["alter_id"] = (int) $aConfig["aid"] ?? 0; // 猜的 + $aNode["alter_id"] = $aConfig["aid"] ?? 0; // 猜的 + $aNode["alter_id"] = (int) $aNode["alter_id"]; $aTransport = []; if (isset($aConfig["net"]) && $aConfig["net"] != "tcp" && $aConfig["net"] != "none" && $aConfig["net"] != "raw") {