924 Commits

Author SHA1 Message Date
github-actions[bot] f09e65bf32 New Crowdin translations by GitHub Action (#1771)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-27 22:27:29 +08:00
耗子 d87d958f3e fix: 基本认证规则优先级与目录必填校验
nginx map 正则、Apache Location 块分别按路径长度排序,保证嵌套目录
与整站规则并存时更精确的规则生效;前端保存时校验目录级规则必须填写
目录,避免空路径被归一化为整站规则。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-27 21:29:06 +08:00
github-actions[bot] d5af4524d2 New Crowdin translations by GitHub Action (#1769)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-27 19:13:30 +08:00
github-actions[bot] b411c3a8df chore(l10n): update pot files 2026-08-27 09:12:06 +00:00
耗子 586c0df731 feat: 网站基本身份验证支持精确到目录
认证规则改为列表结构,每条规则可选择整站或指定目录生效,各自独立的
用户凭证与 htpasswd 文件。nginx 通过 http 上下文 map + auth_basic
变量实现,对静态、PHP、反向代理的所有 location 统一生效;Apache 使
用 Location 块。旧版整站配置读取时自动识别,保存后平滑迁移。

Closes #1767

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-27 16:51:41 +08:00
github-actions[bot] 3d1931d704 chore(l10n): update pot files 2026-08-27 05:28:41 +00:00
github-actions[bot] f1a984deb3 New Crowdin translations by GitHub Action (#1763)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-19 23:11:00 +08:00
github-actions[bot] ad98ebce57 chore(l10n): update pot files 2026-08-19 14:51:31 +00:00
耗子 af23f49811 feat: PHP 添加 FPM 进程/OPcache/Composer 管理
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 22:20:06 +08:00
耗子 ecd403a334 feat: PostgreSQL 添加会话/TopSQL/表膨胀/WAL 运维功能
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 21:12:44 +08:00
github-actions[bot] 5c729082a5 New Crowdin translations by GitHub Action (#1762)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-19 20:26:55 +08:00
github-actions[bot] 5de88d4846 chore(l10n): update pot files 2026-08-19 11:00:31 +00:00
耗子 4e67b31d40 fix: 修复默认spa配置编号问题 2026-08-19 18:05:54 +08:00
github-actions[bot] 94d90015f4 New Crowdin translations by GitHub Action (#1760)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-15 23:28:24 +08:00
github-actions[bot] d8b2a6e574 chore(l10n): update pot files 2026-08-15 15:08:12 +00:00
github-actions[bot] b0b1e741bd chore(l10n): update pot files 2026-08-15 13:08:42 +00:00
耗子 237b1bfcee feat: 证书支持关联多个网站,close #1587 2026-08-15 20:54:45 +08:00
github-actions[bot] 5654ff907d New Crowdin translations by GitHub Action (#1759)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-08-15 18:11:42 +08:00
h2zi 6406d676be chore(l10n): update pot files 2026-08-15 02:05:58 +00:00
耗子 61e28afa31 Merge remote-tracking branch 'origin/main' 2026-08-15 10:02:44 +08:00
耗子 b070d2d0d0 chore: 支持迁移用户 2026-08-15 10:02:37 +08:00
h2zi acf90cd177 chore(l10n): update pot files 2026-08-15 01:28:04 +00:00
耗子 556dd6fb07 chore: 清理代码 2026-08-15 09:26:16 +08:00
耗子 a459c41b53 chore: 清理代码 2026-08-15 09:15:22 +08:00
耗子 2b97845b79 chore: 清理代码 2026-08-15 08:37:29 +08:00
耗子 e238422310 chore: 清理代码 2026-08-15 08:33:30 +08:00
耗子 dac99e9e00 chore: 清理代码 2026-08-15 07:58:26 +08:00
耗子 2bde7f7a73 chore: 清理代码 2026-08-15 07:30:59 +08:00
耗子 5fbd84b039 perf: 修复告警评估拖垮服务器负载
sshd 日志改为优先读 /var/log/auth.log 或 /var/log/secure,按字节偏移增量读取,
无文本日志时才回退 journald。journald 按单位过滤要沿匹配链遍历,实测一台
3.6G journal 的机器上取最后一条都超过 30 秒,游标方案因首次定位就超时而始终
建立不起来,每轮都退回全量扫描,iowait 长期 80% 以上;调度器的 SkipIfRunning
又会让整个告警评估随之停摆。同机对比,读文本日志耗时 0.1 秒。

其余:
- 采集前先判断事件是否已订阅且配好渠道,此前是扫完才发现没人接收
- 没有系统类规则时跳过 CurrentInfo,其内部两次 cpu.Percent 各阻塞 100ms
- 清理已消失目标的静默记录,此前只清命中计数,动态目标下会持续堆积
- disk.Usage 出错返回 nil 时直接解引用会 panic

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 07:02:17 +08:00
耗子 745e88df69 feat: 迁移补回传输进度日志并改进时间显示
- 传输层通过回调上报字节数,下载与上传共用一套节流与格式化,每秒最多一条;
  首秒不打,秒传的小文件无需进度,耗时过短算出的速度也没有参考价值
- 运行中显示实时累计耗时,结束后显示时间区间与总耗时,此前结束时间为空
  会渲染成两个横杠
- 步骤条末步按内容收缩,其没有连接线,再占等分宽度会在右侧留下空白
- 预检阶段提示目标缺少来源所用的 PHP 版本:宝塔从站点表的 php_version 取,
  1Panel 网站列表只给运行环境名,从运行环境列表换取版本

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 07:02:04 +08:00
h2zi 89874d7cdf chore(l10n): update pot files 2026-08-14 18:23:59 +00:00
耗子 a32ffbe6e0 fix: 优化代码 2026-08-15 00:37:01 +08:00
耗子 7f94f80256 fix: 优化代码 2026-08-15 00:24:14 +08:00
github-actions[bot] a1b042e7f7 New Crowdin translations by GitHub Action (#1758)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-08-14 23:06:10 +08:00
h2zi 540fa85278 chore(l10n): update pot files 2026-08-14 14:36:39 +00:00
耗子 9dac05e25c refactor: 重构网卡配置管理并加入变更确认
三个网络管理器改为 backend 接口实现,各自的辅助方法收进对应结构体,
不再由包级函数经 switch 分发;探测结果缓存,更新时只加载目标网卡。

新增两阶段提交:应用后校验配置是否真正生效,随后进入待确认状态,
30 秒内未确认则自动回滚,避免配错网卡导致远程失联无法恢复。

修复 NetworkManager 读写 MTU 未带设置名导致网卡全部不可编辑,
以及 netplan set 键含点号时 VLAN 网卡配置被写入错误层级。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 22:35:17 +08:00
h2zi 3a0e6e43b4 chore(l10n): update pot files 2026-08-14 14:04:59 +00:00
耗子 2a63a022e0 refactor: 重写宝塔与 1Panel 迁移
对照宝塔 11.0 与 1Panel v2 源码核实全部接口与字段,删除凭空猜测的兼容分支:
status 别名表、key/Key/k 环境变量、msg/message 双兼容、字符串二次解析、
下载重试 180 次、归档 magic 校验、残留资源清单。

按分层重新组织:service 只处理 HTTP,编排与导入下沉到 biz,两个适配器共享
HTTP 客户端,助手函数与正则收进各自结构体。容器与 Compose 迁移不再支持。

顺带修复宝塔 GetSSL 在未开启 SSL 时被误判为接口失败,以及备份完成后才恢复
来源导致停机时间过长。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 21:26:16 +08:00
耗子 5303979097 feat: 支持宝塔和 1Panel 迁移 2026-08-13 01:11:12 +08:00
耗子 5c55f276f1 fix: 修复 ifupdown 配置 lint 2026-08-12 19:26:19 +08:00
耗子 8aa987f71b feat: 支持网卡网络配置管理 2026-08-12 19:19:28 +08:00
耗子 17cbb1ad2a feat: Docker 操作支持后台任务 2026-08-12 17:10:54 +08:00
耗子 d3ea65baf3 fix: 支持面板域名 ACME 证书 2026-08-12 15:57:43 +08:00
耗子 3f339d1a53 style: format Go sources 2026-07-27 02:55:03 +08:00
耗子 ea22c2f0a7 refactor(di): restore compile-time Wire injection
Replace the samber/do runtime container with explicit constructor dependencies and generated Wire graphs for ace and cli. Keep CLI application loading isolated and verify generated files in CI.
2026-07-27 02:54:44 +08:00
github-actions[bot] ad4559eea3 New Crowdin translations by GitHub Action (#1731)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-07-27 01:34:45 +08:00
h2zi cdd095e7f5 chore(l10n): update pot files 2026-07-26 16:35:07 +00:00
耗子 4e28fc60a3 feat: 添加通知与告警模块
- 通知渠道支持配置多个 SMTP 账号,配置整体加密落库,删除时清理规则与事件设置中的引用
- 告警规则支持 18 种指标:CPU/内存/Swap/负载/磁盘用量与 inode/磁盘与网卡速率/网站 5xx 与错误率、
  服务与项目与容器与应用与数据库运行状态、证书与网站剩余天数,可配连续命中次数与静默期
- 系统事件通知覆盖证书续签失败、备份失败、后台任务失败、计划任务失败、网站到期、防篡改拦截、
  面板健康问题、面板登录与爆破、SSH 登录与爆破
- 计划任务统一经 wrapper 执行以捕获退出码,flock 抢锁失败不计为失败
- 监控页改造为系统/告警/设置三 Tab
- 数据库驱动建连打通 context 并补齐连接超时,探测不再阻塞告警评估

close #1041

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-25 22:45:51 +08:00
耗子 ce50aa4653 feat: 备份恢复改为后台任务
Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-25 01:45:48 +08:00
耗子 634e361e86 feat: 优化防篡改性能 2026-07-24 23:48:23 +08:00