首页
文章导航
留言板
友链
更多
关于
推荐
wszx博客
Search
1
使用cloudflare搭建永久免费Trojan节点,免费创建自定义域名,多个节点,无需手动优选,免费无门槛搭建
3 阅读
2
免费二级域名,包括可托管到cf的二级域名
2 阅读
3
x-ui面板实现多ip分流出站
1 阅读
4
永久免费节点搭建!通过Cloudflare Worker部署免费的VLESS节点,4K高速,解锁Netflix、ChatGPT
1 阅读
5
一段代码简单在谷歌colab内搭建vpn,完全免费科学上网工具,全网高速免费机场节点抓取
1 阅读
默认
日常
学习
技术
登录
Search
标签搜索
cloudflare
白嫖
安装
CF
壁纸
图片
脚本
docker
Linux
代码
哪吒
域名
Caddy
节点
桌面壁纸
手机壁纸
NAT
LXC
优选
HTML
ws01
累计撰写
99
篇文章
累计收到
55
条评论
首页
栏目
默认
日常
学习
技术
页面
文章导航
留言板
友链
关于
推荐
wszx博客
搜索到
1
篇与
的结果
2025-04-15
自动收集网上的聚合节点订阅
自动收集网上的聚合节点订阅 新建一个txt文档,复制以下代码进去,修改文件名为:index.phpToken验证 iloveyou 可以修改为你自己的打开网页:https://域名/test.php?token=iloveyou<?php // Token验证https://域名/test.php?token=iloveyou if (!isset($_GET['token']) || $_GET['token'] !== 'iloveyou') {//因为作者是超绝恋爱脑 header("Content-Type: text/plain"); echo "你的TOKEN不对!"; exit; } set_time_limit(0); // 禁用脚本执行时间限制 // 缓存配置 $cache_file = __DIR__ . '/cache.txt'; $cache_time = 14400; // 4小时缓存 // 返回缓存内容(如果有效) if (file_exists($cache_file) && (time() - filemtime($cache_file) < $cache_time)) { header("Content-Type: text/plain"); echo file_get_contents($cache_file); exit; } // 完整URL列表 $urls = [ "https://raw.githubusercontent.com/aiboboxx/v2rayfree/main/v2", "https://raw.githubusercontent.com/shirkerboy/scp/main/sub", "https://jiang.netlify.app/", "https://fforever.github.io/v2rayfree/", "https://xlz767v2ray.pages.dev/sub/b9b8cf4c-29a3-4288-9c6c-8811dc37beec#BPB-Normal", "https://bpbv2ray.xlz767.ip-ddns.com/sub/b9b8cf4c-29a3-4288-9c6c-8811dc37beec#BPB-Normal", "https://www.xlz767.ip-ddns.com/proxy.php?url=https://edgetunnelworker.xlz.workers.dev/f47ac10b-58cc-4372-a567-0e02b2c3d479", "https://raw.githubusercontent.com/ripaojiedian/freenode/main/sub", "https://github.com/Huibq/TrojanLinks/raw/refs/heads/master/links/ss", "https://github.com/Huibq/TrojanLinks/raw/refs/heads/master/links/vmess", "https://github.com/Huibq/TrojanLinks/raw/refs/heads/master/links/trojan", "https://github.com/Huibq/TrojanLinks/raw/refs/heads/master/links/vless", "https://raw.githubusercontent.com/firefoxmmx2/v2rayshare_subcription/main/subscription/vray_sub.txt", "https://github.com/Roywaller/clash_subscription/raw/refs/heads/main/clash_subscription.txt", "https://q3dlaxpoaq.github.io/APIs/cg1.txt", "https://q3dlaxpoaq.github.io/APIs/cg3.txt", "https://q3dlaxpoaq.github.io/APIs/cg4.txt", "https://raw.githubusercontent.com/mahdibland/ShadowsocksAggregator/master/Eternity", "https://raw.githubusercontent.com/mahdibland/ShadowsocksAggregator/master/EternityAir", "https://raw.githubusercontent.com/snakem982/proxypool/main/source/v2ray.txt", "https://raw.githubusercontent.com/snakem982/proxypool/main/source/v2ray-2.txt" ]; // 存储唯一节点 $uniqueNodes = []; // CURL全局配置 $curl_options = [ CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 5, CURLOPT_CONNECTTIMEOUT => 3, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_FOLLOWLOCATION => true, CURLOPT_MAXREDIRS => 3, CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' ]; // 分批次处理(每批5个URL) $batchSize = 5; foreach (array_chunk($urls, $batchSize) as $urlChunk) { $mh = curl_multi_init(); $handles = []; // 初始化批处理请求 foreach ($urlChunk as $url) { $ch = curl_init($url); curl_setopt_array($ch, $curl_options); curl_multi_add_handle($mh, $ch); $handles[] = $ch; } // 执行并行请求 $active = null; do { $status = curl_multi_exec($mh, $active); if ($active && curl_multi_select($mh) === -1) { usleep(100); } } while ($active && $status == CURLM_OK); // 处理响应 foreach ($handles as $ch) { $content = curl_multi_getcontent($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($httpCode == 200 && !empty($content)) { $content = preg_replace('/\s+/', '', trim($content)); if (preg_match('/^[a-zA-Z0-9+\/]+={0,2}$/', $content)) { $decoded = base64_decode($content, true); if ($decoded !== false) { // 分割节点并去重 $nodes = array_filter(explode("\n", $decoded), function($line) { return !empty(trim($line)); }); foreach ($nodes as $node) { $cleanNode = trim($node); $uniqueNodes[$cleanNode] = true; // 利用键名去重 } } } } // 清理句柄 curl_multi_remove_handle($mh, $ch); curl_close($ch); } curl_multi_close($mh); } // 生成最终内容 $finalContent = implode("\n", array_keys($uniqueNodes)); $finalBase64 = !empty($finalContent) ? base64_encode($finalContent) : base64_encode(''); // 原子化写入缓存 $tempCache = tempnam(__DIR__, 'cache_temp'); if ($tempCache && file_put_contents($tempCache, $finalBase64)) { rename($tempCache, $cache_file); } // 输出结果 header("Content-Type: text/plain"); echo $finalBase64; ?>
2025年04月15日
0 阅读
1 评论
0 点赞
您是第
48754
位访客