生活琐碎/
用aclclouds免费服务器 搭建一个探针服务
首先进入 注册账号
Configure your service | ACLCloudsConfigure an ACLClouds service and review the order before payment.
选择Bots Free 4天有效期需要手动续费 然后Service configuration 选择node.js即可 然后需要做前置准备 以极简探针为例
GitHub - monitor-probe/monitor: 用 Rust 写的轻量级服务器探针 (Rust + axum + SQLite)用 Rust 写的轻量级服务器探针 (Rust + axum + SQLite). Contribute to monitor-probe/monitor development by creating an account on GitHub.
GitHub - monitor-probe/agent: Linux monitoring agent for the monitor hubLinux monitoring agent for the monitor hub. Contribute to monitor-probe/agent development by creating an account on GitHub.
GitHub - cloudflare/cloudflared: Cloudflare Tunnel clientCloudflare Tunnel client. Contribute to cloudflare/cloudflared development by creating an account on GitHub.
1.下载monitor-hub-x86_64-unknown-linux-musl 2.下载monitor-agent-x86_64-unknown-linux-musl 【非必要,如果无需这台服务器加入探针则不需要】 3.下载cloudflared-fips-linux-amd64

首先进入开通的Bots 然后选择File 上传三个文件,并分别命名为:monitor-hub monitor-agent cloudflared 然后,创建index.js
const { spawn, execSync } = require('child_process');
// 1. 统一赋予二进制文件可执行权限
execSync('chmod +x ./monitor-hub ./cloudflared ./monitor-agent');
// 2. 启动探针主端 (Hub)
const hub = spawn('./monitor-hub', ['--listen', '127.0.0.1:端口', '--db', './data/monitor.db'], { stdio: 'inherit' });
// 3. 启动 Cloudflare Tunnel 穿透 (Token 完整无缩写)
const tunnel = spawn('./cloudflared', ['tunnel', 'run', '--token', '输入创建后获取的token'], { stdio: 'inherit' });
// 4. 启动被控端 (Agent) - 完全对齐标准参数
const agent = spawn('./monitor-agent', [
'--server', '域名',
'--token', 'token',
'--interval', '1'
], { stdio: 'inherit' });
hub.on('exit', (code) => console.log(`Hub 退出: ${code}`));
tunnel.on('exit', (code) => console.log(`Tunnel 退出: ${code}`));
agent.on('exit', (code) => console.log(`Agent 退出: ${code}`));然后Console 点击start即可
评论0
还没有评论,来说两句吧~