? AutoProxyUpdater
无需动手,即可让你的 Velocity 代理始终保持最新的安全与性能补丁。
AutoProxyUpdater 是一款轻量级、独立运行的实用工具,专为 Velocity 设计。它通过与 PaperMC API 直接通信,处理下载并管理安全关闭,确保你的代理 JAR 文件始终处于最新状态。
? 为什么选择 AutoProxyUpdater?
现代代理环境要求高可用性和安全性。手动检查 Velocity 构建版本既繁琐又耗时。本项目自动化了整个生命周期——从检测最新版本到安全替换 JAR 文件,且不会损坏正在运行的进程。
✨ 主要功能
- 原生 Velocity 支持: 专为 Velocity Proxy API 从头构建。
- PaperMC API v3 集成: 使用最新的“Fill”API 标准进行可靠下载。
- 智能版本持久化: 将当前构建 ID 直接存储在
config.yml 中。无需额外文件,重启后也不会重复下载。
- 热替换安全逻辑: 为了避免覆盖活动 JAR(这会导致
NoClassDefFound 错误),它会将当前 JAR 重命名为 .old 并放置新版本。这确保了干净的关闭过程。
- 自动清理: 在下一次成功启动时检测并删除旧的
.old 文件,保持根目录整洁。
- 零触摸配置: 首次运行时,插件会自动检测你的 Velocity 版本(例如 3.4.0-SNAPSHOT)并为你完成所有设置。
? 配置
插件会在其数据文件夹中生成一个 config.yml。你可以在这里微调更新行为:
# AutoProxyUpdater Configuration
# 用于更新的 API URL。
# 留空以自动使用来自 PaperMC 的最新 Velocity 版本。
api-url: ""
# 代理 JAR 的路径。留空以通过类路径自动检测。
proxy-jar-path: ""
# API 请求的身份标识头
user-agent: "AutoProxyUpdater/1.3"
# 成功下载后关闭前的延迟时间(秒)。
shutdown-delay: 3
# ------------------------------------------------------------
# 请勿更改!内部状态,不要手动修改。
# ------------------------------------------------------------
internal-current-build: 559
⚠️ 免责声明
[!DANGER]
在生产环境中使用自动更新器需自行承担风险。此插件会替换你的主代理 JAR。请始终确保拥有完善的备份系统以及一个启动脚本(如 while true 循环),以便在代理因更新而关闭后将其重新上线。
⚖️ 许可证
本项目采用 MIT License 许可。
开发者注: 如果你还运行着后端服务器(Paper/Purpur/Leaf),请查看我的配套项目 AutoUpdateServer!
? AutoProxyUpdater
Keep your Velocity proxy running on the latest security and performance patches without lifting a finger.
AutoProxyUpdater is a lightweight, standalone utility designed specifically for Velocity. It ensures your proxy JAR is always up-to-date by communicating directly with the PaperMC API, handling downloads, and managing safe shutdowns.
? Why AutoProxyUpdater?
Modern proxy environments require high uptime and security. Manually checking for Velocity builds is tedious. This project automates the entire lifecycle—from detecting the latest version to replacing the JAR file safely without corrupting the running process.
✨ Key Features
- Native Velocity Support: Built from the ground up for the Velocity Proxy API.
- PaperMC API v3 Integration: Uses the latest "Fill" API standards for reliable downloads.
- Smart Version Persistence: Stores the current build ID directly in your
config.yml. No extra files, no redundant downloads after a restart.
- Hot-Swap Safety Logic: Instead of overwriting the active JAR (which causes
NoClassDefFound errors), it renames the current JAR to .old and places the new one. This ensures a clean shutdown.
- Automatic Cleanup: Detects and deletes legacy
.old files on the next successful startup to keep your root folder clean.
- Zero-Touch Configuration: On the first run, the plugin automatically detects your Velocity version (e.g., 3.4.0-SNAPSHOT) and sets up everything for you.
? Configuration
The plugin generates a config.yml in its data folder. You can fine-tune the update behavior here:
# AutoProxyUpdater Configuration
# The API URL for updates.
# LEAVE EMPTY to automatically use the latest Velocity version from PaperMC.
api-url: ""
# Path to the proxy JAR. Leave empty for auto-detection via classpath.
proxy-jar-path: ""
# Identity header for API requests
user-agent: "AutoProxyUpdater/1.3"
# Delay in seconds before shutting down after a successful download.
shutdown-delay: 3
# ------------------------------------------------------------
# DONT TOUCH! Internal state, do not modify manually.
# ------------------------------------------------------------
internal-current-build: 559
⚠️ Disclaimer
[!DANGER]
Using auto-updaters in production environments is at your own risk. This plugin replaces your primary proxy JAR. Always ensure you have a robust backup system and a startup script (like a while true loop) to bring the proxy back online after it shuts down for an update.
⚖️ License
This project is licensed under the MIT License.
Developer Note: If you are also running backend servers (Paper/Purpur/Leaf), check out my companion project AutoUpdateServer!
评论 0
登录后参与评分
还没有评论,来抢沙发吧