Skip to content
Projets

lbjxr/Hax_Woiden_Expiration_Monitor

Voir sur GitHub

À propos

这是一个用于 Telegram Bot 管理和 HAX.CO.ID 数据中心监控的组合型项目,支持 **Docker 部署** 和 **服务器后台运行** 两种模式。

Systèmes et infrastructure

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
+1
in 7 days
-1
in 15 days
+5
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Telegram Bot + HAX 数据监控脚本

这是一个用于 Telegram Bot 管理和 HAX.CO.ID 数据中心监控的组合型项目,支持 Docker 部署 和 服务器后台运行 两种模式。 项目原始代码是tg群友(名字ez ez)提供的(大佬,有什么问题请私聊我,考虑个人隐私暂不贴出来大佬tg账号),直接运行报错,我利用chatgpt修改和完善了一下,目前运行正常。


📦 功能简介

  • 🤖 bot.py:一个使用 python-telegram-bot 实现的 Telegram Bot,支持交互式功能(如按钮、命令、回调)。
  • 📡 hax.py:每 60 秒抓取 https://hax.co.id/data-center/ 数据中心状态,。
  • 🔁 支持后台自动运行(适配 Linux VPS)
  • 🐳 提供 Docker 镜像构建脚本
  • 📜 自动检查并安装 Python3 环境(服务器模式)

📂 项目结构

project/                 # 自行创建一个文件夹存放项目文件,名称随意,英文命名
├── bot.py               # Telegram Bot 主程序
├── hax.py               # HAX 数据中心监控脚本
├── requirements.txt     # 所有依赖声明
├── Dockerfile           # Docker 镜像定义
├── run_docker.sh        # 一键 Docker 构建 + 启动脚本
├── run_server.sh        # 一键后台运行(非 Docker)
└── logs/                # 自动生成日志文件目录

🖥️ 运行方式一:普通服务器后台运行

✅ 前提

  • 适用于 Ubuntu / Debian / CentOS 等主流服务器
  • Python 3 环境(可自动安装)

▶️ 一键运行

chmod +x run_server.sh
./run_server.sh

首次运行将:

  • 检查系统是否安装 python3 / pip3
  • 自动安装 requirements.txt 依赖
  • 启动你选择的脚本于后台(使用 nohup)
  • 输出日志至 logs/ 目录

📄 查看日志

tail -f logs/bot.log     # 查看 Telegram Bot 日志
tail -f logs/hax.log     # 查看 HAX 监控日志

❌ 停止进程

pkill -f bot.py
pkill -f hax.py

🐳 运行方式二:Docker 模式

🔧 构建镜像并运行

chmod +x run_docker.sh
./run_docker.sh

你可以选择运行:

  • bot.py(Telegram Bot)
  • hax.py(HAX 监控)
  • '同时启动 bot.py 和 hax.py 脚本...'
  • 任意一个都可在容器中独立运行


📌 依赖库

  • requests
  • beautifulsoup4
  • lxml
  • python-telegram-bot[job-queue]>=20.0

安装方式:

pip install -r requirements.txt

📬 联系方式

欢迎 issue 或 PR,有建议请提!随缘回复

Explorer des projets similaires

Chargement…