From 631bbfcb0179b0d9ac48840a44fb625ea80b73b2 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Wed, 2 Jul 2025 18:29:07 +0800 Subject: [PATCH] no message --- app/Http/Controllers/CronController.php | 6 +- app/Services/Github/Github.php | 5 +- app/Services/Github/Mod/FreeNode/A.php | 89 +++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 2 deletions(-) create mode 100755 app/Services/Github/Mod/FreeNode/A.php diff --git a/app/Http/Controllers/CronController.php b/app/Http/Controllers/CronController.php index 8c9363d..0e2c85c 100755 --- a/app/Http/Controllers/CronController.php +++ b/app/Http/Controllers/CronController.php @@ -24,9 +24,11 @@ class CronController public function index() { try { + $h = date("H"); $i = date("i"); $s = date("s"); + $iRand = rand(1, 1440); //test $aGet = $_GET; @@ -36,6 +38,8 @@ class CronController $i = (string) $aGet['v']; } else if ($aGet["time_type"] == 'h') { $h = (string) $aGet['v']; + } else if ($aGet["time_type"] == "rand") { + $iRand = $aGet["v"]; } } else { $isTest = 0; @@ -56,7 +60,7 @@ class CronController } // inday_count规则 - $iRand = rand(1, 1440); +// $iRand = rand(1, 1440); // $iRand = 1; $oIndayArticle = Article::where("inday_count", ">=", $iRand)->where("status", 1)->get()->toArray(); // inday24 >= rand10 if (!empty($oIndayArticle)) { diff --git a/app/Services/Github/Github.php b/app/Services/Github/Github.php index 87b51fa..1e34398 100644 --- a/app/Services/Github/Github.php +++ b/app/Services/Github/Github.php @@ -7,9 +7,12 @@ class Github { public static function GetReadMe($aArticle) { - list($sClass, $sFunc) = explode('#', $aArticle['mod']); + list($sClassDir, $sClass) = explode('#', $aArticle['mod']); $sClass = "App\\Services\\Github\\Mod\\".$sClass; + $sClass = "App\\Services\\Github\\Mod\\".$sClassDir."\\".$sClass; + + $sFunc = "Get"; if (method_exists($sClass, $sFunc)) { $oInstans = new $sClass(); diff --git a/app/Services/Github/Mod/FreeNode/A.php b/app/Services/Github/Mod/FreeNode/A.php new file mode 100755 index 0000000..7be09b9 --- /dev/null +++ b/app/Services/Github/Mod/FreeNode/A.php @@ -0,0 +1,89 @@ +aShip, 1); + + if (!$this->todayUpd()) { + return false; + } + + $aArticleFreenode = $this->getArticleFreenode(); + +$sContent = " + +# 「".date("m月d日")."」每日更新免费节点,SSR/V2ray/Clash/Shadowrocket免费节点订阅链接。 + +".date("Y年m月d日").",".$aArticleFreenode['title_sub']." + +## 性价比机场推荐:[".$this->aShip["name"]."](https://".$this->aShip["www"].") + +* 价格低 - 目前七折优惠,折后低至8元。 + +* 速度快 - 晚高峰看youtube高清不卡顿。 + +* 稳定 - 海外团队稳定运营第3年。 + +* 无限试用 - 注册免费试用3天,签到无限试用。 + +".$this->aShip['youhui_str']." + +点击进入[".$this->aShip["name"]."机场官网](https://".$this->aShip["www"].")。 + +## 免费节点订阅链接 + +v2ray订阅链接: + +https://".$aArticle["fn_www"]."/feed/v2ray-".date('Ymd').".txt + +clash订阅链接: + +https://".$aArticle["fn_www"]."/feed/clash-".date('Ymd').".yaml + +## 温馨提示 + +本站提供的都是免费且公益的节点,稳定性与长时间连接速率无法与收费版的高速机场节点相提并论,不能奢望太多。 + +注意你自己的网络环境(本地连接当中的DNS,手动配置一下:114.114.114.114,8.8.8.8或是其它公共的DNS。) + +如果某个网址无法代理访问,可切换到全局代理模式,一般可解决。 + +"; + + return $sContent; + + } + + + + + + + + public function Test($aArticle) + { + + $tt = $this->getHuodongStr($aArticle); + tomd($tt, 1); + + + if (!$this->todayUpd()) { + return false; + } + + $this->oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast'; + $sFreenodeNow = $this->oHttp->send(); + $aFreenodeNow = json_decode($sFreenodeNow, 1); + + return json_encode($aFreenodeNow).time(); + } + +}