主要更新内容
- 新增公共访客审计事件日志端点,支持主题前端上报访问事件
- 指标存储完全迁移至独立数据库(默认 SQLite
./data/metrics.db),支持 MySQL/PostgreSQL 后端 - 指标写入改为批量事务,大幅降低 SQLite 数据库锁冲突
- 新增指标滚动压缩(rollup)与保留策略管理,支持降采样开关
- 指标存储配置支持热重载,保存前自动连接测试
- 删除客户端或 Ping 任务时自动清理对应指标存储数据
getNodesRPC 返回改为以 UUID 为键的映射,替代数组- 新增 loong64 (LoongArch) 架构二进制构建支持
- Docker 镜像内移除内建 Cloudflare Tunnel 支持
- 移除 Cloudflare Access OAuth 提供商
- 移除 Nezha 兼容层及相关代码
- 前端构建拆分为独立 CI 步骤,优化多架构镜像构建流程
- 启动流程重构为显式生命周期阶段,提升可维护性
- 配置文件自动推断数据库驱动(从 DSN)
- 新增数据库压缩(VACUUM)检查与维护 API(实验性)
visitor_audit_enabled公开设置项,控制访客日志写入- 快照版本号改为 UTC+8 时区生成
- 支持
ed25519SSH 密钥用于对外连接
Bug修复
- 安全修复:主题名称路径遍历漏洞(DeleteTheme/UpdateTheme/SetTheme)
- Telegram 通知:非 200 响应时返回 API 错误描述而非仅状态码
- 修复指标聚合时序列标识丢失,确保数据正确分组
- 修复指标滚动压缩按指标独立游标,避免多系列交错干扰
- 修复 SQLite 写入时
database is locked错误(批处理 + 锁管理) - 修复指标存储启动阶段未能正确处理零保留策略的定义
- 修复指标迁移恢复时进度从 0 重新累计的问题
- 修复时间字段使用
FromTime()导致时区混淆,统一为 UTC - 修复任务结果清除按本地时间而非 UTC 判断的问题
- 修复内置指标默认保留期错设为 1 天(测试值)的实际影响
- 修复审计日志清理与指标过期删除的完整性
其他
- CI 工作流重构:复用 frontend/zig/restore 组合动作,启用快照并发取消
- 移除已废弃的数据库表读写(records, gpu_records, ping_records)及对应旧表压缩逻辑
- 移除
coreos/go-oidc/v3、google.golang.org/grpc等未使用依赖 - 移除已废弃的数据库连接参数(
db-host,db-port,db-user,db-pass,db-name) - 清理无用函数(
EditClientName,EditClientToken,GetAllTasksResultByUUID,DeleteTaskByTaskId等) - 新增
cmd/app.go显式生命周期管理及cmd/reload.go热重载管理器 - 数据库版本标记从文件移至
configs表,升级备份自动打包至./backup/ - 更新安装脚本以支持 loong64 架构检测
- 新增访客审计 RPC 文档
docs/visitor-audit-rpc.md
What's Changed
- fix(security): prevent path traversal in theme name (DeleteTheme/UpdateTheme/SetTheme) by @guocn in #584
- fix(telegram): 非 200 响应时返回 API 错误描述而非仅状态码 by @Torther in #583
- feat(rpc): add public visitor audit event endpoint by @sanrokamlan-prog in #597
- fix: harden visitor audit logging by @sanrokamlan-prog in #602
Commits
- feat: route metric reads and writes to dedicated store (f2c46db) @Akizon77
- fix(database): use FromTime() for time queries and improve cache cleanup (f0877d6) @Akizon77
- fix(telegram): include API error description in non-200 responses (da047cf) @Torther
- refactor(metrics): route all storage through metric store when enabled (6a5f3ef) @Akizon77
- fix(rpc): common:getNodes returns uuid-keyed map instead of array (ff6daa6) @Akizon77
- Merge branch 'refactor/metrics-unify-storage': unify storage through metric store + getNodes map (0132d1c) @Akizon77
- fix(theme): prevent path traversal in theme operations (404d97d) @guocn
- fix(theme): prevent path traversal in theme operations (#584) (92ec774) @Akizon77
- Merge pull request #583 from Torther/main (b6fcdd3) @Akizon77
- fix: avoid sqlite database is locked failures for record writes (332053d) @Akizon77
- feat(metrics): hot-reload metrics DB config with connection test before save (9e5b6df) @Akizon77
- fix: avoid sqlite table locks during metric migration (64998b5) @Akizon77
- feat(metrics): infer DB driver from DSN automatically (d02d934) @Akizon77
- merge: metrics DSN autodetect (be6af33) @Akizon77
- perf: 优化 metrics 迁移性能 - 批量写入 + keyset 分页 (5c2bd4e) @Akizon77
- feat(metrics): 支持迁移暂停/恢复,进度持久化与重启后孤儿状态修复 (416ea87) @Akizon77
- fix(migration): 恢复迁移时保留已迁移进度计数,避免从0重新累计 (43c80d2) @Akizon77
- ci: align snapshot workflow behavior (eb4ca83) @airium
- refactor: split startup into app lifecycle stages (6ddb143) @Akizon77
- feat(metrics): always enable metric store with startup migration and version-based backup (4ad190a) @Akizon77
- refactor: remove built-in Cloudflare tunnel support (73071ff) @Akizon77
- refactor(oauth): remove Cloudflare Access provider support (ab31fc6) @Akizon77
- Use UTC+8 for snapshot versions (e009444) @Akizon77
- fix: run metric store migrations before startup migration (84130df) @Akizon77
- refactor(metrics): use metric retention for cleanup settings (7e0d542) @Akizon77
- feat: add metric retention policy management (7d95240) @Akizon77
- fix(metric): preserve series identity during aggregation (8911c08) @Akizon77
- feat(metricstore): add scheduled rollup compaction (5ad791f) @Akizon77
- fix(metricstore): rotate compaction cursor per metric (46b4e37) @Akizon77
- ci: reuse frontend and toolchain actions in workflows (8a529b4) @Akizon77
- feat(metricstore): aggregate record queries via series rollups (b2fe9ab) @Akizon77
- ci: generate AI-assisted release notes from stable tags (8910c2e) @Akizon77
- feat(metricstore): track ping packet loss in metrics (855ff82) @Akizon77
- Improve release notes generation (5ade710) @Akizon77
- Read release note workflow inputs (0660ee7) @Akizon77
- Use stable release base for snapshot notes (29eecf5) @Akizon77
- feat(metric): preserve series identity in rollup queries (9831df0) @Akizon77
- Include commits in release notes (39c5f7b) @Akizon77
- feat(metricstore): add downsampling toggle, raise default retention to 90d, and cleanup expired data on compact (42ef993) @Akizon77
- fix(metrics): select compatible rollup intervals (3b48339) @Akizon77
- Fix metric rollup compaction and retention (ff358ed) @Akizon77
- refactor: improve metric store lifecycle management with context-aware close and operation gate (c828653) @Akizon77
- disable downsampling by default (724dd3b) @Akizon77
- feat: add visitor audit rpc endpoint (7679430) @sanrokamlan-prog
- Update generate-release-notes.yml (5c73eba) @Akizon77
- Merge pull request #597 from sanrokamlan-prog/visitor-audit-rpc (1eb3549) @Akizon77
- fix: harden visitor audit logging (0c80f0f) @sanrokamlan-prog
- Merge pull request #602 from sanrokamlan-prog/fix/visitor-audit-hardening (5fa59ab) @Akizon77
- refactor: replace static retention config with dynamic retention summary (7f36881) @Akizon77
- fix: preserve zero-retention metric definitions across operations (66b7691) @Akizon77
- refactor(metrics): remove DefaultRetentionDays config option and enforce explicit retention (7baf2ed) @Akizon77
- fix: reduce default built-in metric retention to 1 day for testing (c1178eb) @Akizon77
- fix(metricstore): use Series to read ping records for rollup support (e2a8284) @Akizon77
- feat: clean metric store before deleting client or ping task (43547b9) @Akizon77
- feat(metric): add compaction watermark upsert and update storage queries (5b90804) @Akizon77
- feat: #414 add support for loong64 architecture (fc3febc) @Akizon77
- refactor: remove unused database functions for sessions, clients, and metric store (0f6f2f4) @Akizon77
- refactor: remove Nezha compatibility (f42cfe7) @Akizon77
- Make metric chart gaps adaptive (73c3c43) @Akizon77
- refactor: remove deprecated WriteRecord/WriteGPURecord and refactor cron jobs (312e320) @Akizon77
- feat(metricstore): batch metric report writes in single transactions (a78ef87) @Akizon77
- refactor(jsonrpc): remove deprecated Tag field from public metric types (d853a83) @Akizon77
- feat: add legacy upgrade server and refactor OAuth initialization (3c27823) @Akizon77
- feat(admin): add database compression inspection and configuration endpoints (fee8c86) @Akizon77
- Revert "feat(admin): add database compression inspection and configuration endpoints" (7f12850) @Akizon77
- refactor: clean up metric constants and refactor record downsampling (99fda6b) @Akizon77
- refactor: standardize time fields (42b290f) @Akizon77
- remove unused database connection parameters (be3daa4) @Akizon77
- fix: #609 #612 continue compaction on per-metric errors and add separate compaction gate (5a66f28) @Akizon77
New Contributors
- @guocn made their first contribution in #584
- @Torther made their first contribution in #583
- @sanrokamlan-prog made their first contribution in #597
Full Changelog: 1.2.5-fix1...Snapshot-2607201314