ryan
5a8722ff07
feat(frontend): 控制台 next-intl 中英双语
...
接入无 URL 前缀的 zh-CN/en,顶栏与外观设置可切换语言;选择写入 cookie 后刷新生效。
2026-08-16 16:49:16 +08:00
ryan
fa689aedbc
feat(sync): 同步 Wavelet 推送审计、OTel schema 与前端字体
...
自定义 Webhook 在 HTTP 200 但业务 errcode 非零时记为失败,任务日志记录上游响应。
OTel Resource 改为 NewSchemaless,避免 semconv 与 SDK 版本冲突。
前端用 next/font 自托管 Inter,并忽略浏览器扩展改写 body 引起的 hydration 警告。
2026-08-16 11:06:54 +08:00
ryan
465440fa5b
fix(access-logs): 修复状态码自定义
2026-08-13 11:33:12 +08:00
ryan
a4dd5ca9e1
feat(dashboard): 首页请求趋势拆分状态码并合并容量到业务流量
...
- 24 小时请求趋势拆分展示请求总量与 200/400/500 状态码请求量,独占一行;
时间桶聚合新增 status_200/400/500_count(CH countIf、PG FILTER),
请求趋势改为基于原始桶聚合(小时 rollup 无状态码口径)
- 首页移除宿主机磁盘指标,容量趋势(CPU/内存)并入业务流量卡片展示
- 压缩协议 traffic_24h 扩展为 7 元组,前端归一化同步更新
2026-08-13 11:10:37 +08:00
ryan
a9e4237bbf
feat(access-logs): 状态码支持手动输入,新增时间范围筛选
...
- 状态码筛选支持预设快捷选项 + 手动输入任意 100-599 状态码(数字校验)
- 新增时间范围筛选:shadcn 日期+时间选择器(Popover+Calendar+时分 Select),
起止时间以 RFC3339 成对传入,后端校验格式与先后关系,非法值返回 400
- 默认显示来源 IP/访问域名/状态码,节点 ID/请求路径/时间范围折叠进「更多筛选」
2026-08-13 10:27:40 +08:00
ryan
75d1fcf345
feat(access-logs): 日志明细支持按状态码筛选并折叠次要搜索项,修复首页来源分布无数据
...
- 修复 PostgreSQL/SQLite 日志库下首页「来源分布」卡片无数据:RegionCounts 对空
节点 ID 误拼 node_id = '' 恒空条件,改为空节点 ID 表示全节点聚合(对齐 CH 语义),
并过滤空白归属地
- /access-logs?tab=list 新增状态码筛选:状态码下拉含常用 2xx/3xx/4xx/5xx 选项,
校验 100-599,非法值返回 400;ClickHouse 与 PostgreSQL/SQLite 日志库均支持
- 搜索框折叠:默认仅显示来源 IP 与状态码,节点 ID/访问域名/请求路径折叠进
「更多筛选」
2026-08-13 09:59:32 +08:00
ryan
0c22e76f4b
fix(frontend): optimization
2026-08-09 09:14:54 +08:00
ryan
7e8aa5fa0f
Merge branch 'codex/log-database-decoupling'
...
# Conflicts:
# docs/changelog/index.md
# frontend/app/(main)/error-pages/page.tsx
# internal/infra/persistence/migrator/migrator_test.go
2026-08-09 08:37:37 +08:00
ryan
94b74d72f6
fix(frontend): fallback empty offline page html in editor workspace preview
2026-08-08 21:56:44 +08:00
ryan
c4be34b214
fix(frontend): fallback empty offline page html to default template in preview
2026-08-08 21:52:02 +08:00
ryan
fda727cf53
docs: rename contact page references to offline page in changelog
...
refactor(frontend): rename contact page to offline page and update routes/components
feat(frontend): add preset templates suite for offline contact page
2026-08-08 21:36:58 +08:00
ryan
f083da20f2
feat(frontend): add dedicated edit and preview routes for response pages and sync tab state to url
2026-08-08 21:18:53 +08:00
ryan
9797fcdb2f
fix(openflare): improve SWOfflineDomains validation and snapshot diff logic
2026-08-08 20:52:07 +08:00
ryan
b675038bba
refactor(frontend): unify error pages into responses page and remove error-pages route
2026-08-08 20:43:58 +08:00
ryan
a6fc2b7737
fix(log): address CodeRabbit review findings for log database decoupling
2026-08-08 20:15:36 +08:00
ryan
ca21ff3a5b
feat(option): add sw offline
...
fix(openresty): scope sw injection per cert partition
fix(lint): satisfy revive and biome format for sw offline feature
docs: sw offline scope changelog
fix(frontend): use scoped query key for sw scope zones
fix(frontend): hide preview link in sw contact page editor
feat(frontend): add sw scope domain picker and contact page fields
refactor(frontend): generalize html editor workspace for reuse
feat(openresty): scope sw offline injection by route domains
feat(openresty): add sw offline domains snapshot field
feat(option): add sw offline domains scope option
docs: fill html editor workspace generalization detail
docs: sw offline scope implementation plan
docs: sw offline scope design
test(openresty): assert single merged access block in sw enabled servers
fix(openresty): restrict sw intercept to https server blocks
fix(openresty): version sw offline cache by html content
fix(agent): escape redir in sw challenge page to prevent xss
fix(agent): return sw.runtime module table and add lua spec
docs: sw offline fallback changelog
fix(frontend): memoize option map to preserve unsaved contact page edits
feat(frontend): add response pages module with contact page tab
feat(agent): ship sw offline lua assets and placeholder substitution
feat(config): wire sw offline options into config snapshot
feat(openresty): render sw offline assets and challenge intercept
feat(openresty): add sw offline ConfigSnapshot fields and placeholder
feat(db): seed sw offline options
feat(option): add sw offline config keys and validation
docs: add service worker offline fallback implementation plan
docs: adopt global-option pattern for SW offline fallback (matches origin error page)
docs: unify offline contact page with error pages as response pages
docs: service worker offline fallback design (issue #23 )
2026-08-08 20:14:28 +08:00
ryan
7d71f1e4e1
feat(log): decouple log storage from ClickHouse with switchable logstore
...
- New internal/repository/logstore abstraction: exported domain interfaces
(AccessLogStore/ObservabilityStore/UserAccessLogStore/StatusStore),
config-driven provider (Active/Build/Migrating/SetConfigReader), GORM
implementation for PostgreSQL/SQLite (incl. hourly rollups computed in
real time, migration listers, PG partition maintenance), and a ClickHouse
wrapper preserving the native batch path; repository facade delegates to
logstore; import-lint test enforces apps never import analyticsrepo.
- ClickHouse is now optional: the log DB is either the main DB (postgres
when database.enabled, else sqlite) or clickhouse; boot validation +
first-run seed; log_database / log_db_migration are protected keys.
- New user task 切换日志数据库 (of_log_db_switch): freeze log writes,
drain batch writers, copy all 6 raw log tables by id (preserving IDs)
with target-partition pre-creation for PG, flip log_database on success,
clear the freeze flag on failure.
- Per-store retention (log_retention_days_*) with expiry cleanup folded
into the daily system_cleanup task; legacy database_auto_cleanup_* and
of_database_auto_cleanup decommissioned.
- goose migrations: 6 log tables in PG (2 monthly-partitioned) + SQLite,
retention config seeds, schedule cleanup; GET
/api/v1/admin/status/log-database endpoint; frontend retention settings,
switch-task UI and status badge; changelog and docs updated.
docs(plan): log database decoupling implementation plan
docs(design): log database decoupling design (ClickHouse optional)
2026-08-08 19:43:01 +08:00
ryan
ef22ecc5dc
refactor(error-pages): merge trigger policy into one card
...
Combine enable, GET-only, and status code settings into a single
strategy card with the save action in the header for a cleaner layout.
2026-08-06 22:29:09 +08:00
ryan
6738abdec1
feat(openresty): add origin error page GET-only option
...
Allow restricting custom origin error HTML to GET requests so other
methods pass through origin responses. Adds option seed, snapshot field,
edge limit_except/Lua handling, and admin UI switch.
2026-08-06 20:22:44 +08:00
ryan
d17d8457f3
chore: upgrade dependence
2026-08-06 17:41:06 +08:00
ryan
ba1c9222c2
refactor(error-pages): preset templates with OpenFlare branding
2026-08-06 15:25:39 +08:00
ryan
42f7f47716
feat(frontend): add origin error page settings under websites
2026-08-06 14:05:21 +08:00
ryan
484b49d79d
fix(frontend): replace browser confirm dialogs with AlertDialog
...
统一删除、撤销与未保存离开等确认操作为 shadcn AlertDialog,避免
window.confirm/alert 打断界面风格;同步更新 WAF 编辑器相关单测与 changelog。
2026-08-06 13:08:43 +08:00
ryan
cffa009b8c
fix
2026-08-04 13:50:41 +08:00
ryan
4eced2b721
feat(cloudflare): add DNS pointing integration
2026-08-04 13:30:40 +08:00
ryan
3edcdb9e9f
feat(cloudflare): add DNS pointing integration
...
Implement Cloudflare connection management, pointing groups and members, asynchronous A-record reconciliation, node IP triggers, admin APIs, management pages, migrations, tests, and documentation.
2026-08-04 12:32:37 +08:00
ryan
f94767fbc7
perf(cache): 边缘缓存对齐 Cloudflare 默认模型
2026-07-23 23:39:15 +08:00
ryan
5b1e27d0a3
feat(frontend): biome
2026-07-22 22:25:30 +08:00
ryan
f28aa6520e
fix(lint): 消除 linter 告警
2026-07-20 15:53:53 +08:00
ryan
d58b4b6b0e
feat(waf): 自动 IP 组 lookback 支持 60m/1h 时长写法
...
将 lookback_minutes 替换为 lookback,移除最小 5 分钟回看限制,并兼容旧字段。
2026-07-20 15:48:16 +08:00
ryan
866f1df5e3
fix(waf): IP 组同步间隔下限改为 1 分钟
...
移除同步周期 5 分钟限制;回看窗口仍保持最小 5 分钟。
2026-07-20 15:41:31 +08:00
ryan
67a30eb5ed
fix(waf): IP 组预设规则写入默认 ttl
...
点击自动抓取预设规则时补齐 ttl=-1,并规范化自动配置默认 JSON。
2026-07-20 15:36:06 +08:00
ryan
80c47f6ff3
feat(rate-limit): 站点级请求频率限制支持继承与自定义
...
在站点详情流量限制中配置 limit_req_per_ip;渲染按 effective rate 生成多 limit_req_zone,并以站点+IP 隔离计数。
2026-07-20 15:02:38 +08:00
ryan
ae5345c03e
feat(rate-limit): add default request rate limit configuration
...
- Support openresty_default_limit_req_per_ip in system_configs.
- Add limit_req and limit_req_status 429 directive generation in openresty renderer.
- Implement route-level limit_req_per_ip override and explicit disable.
- Add frontend UI inputs and validation in rate limits tab config.
- Update swagger API docs and changelog for v3.4.3-beta.3.
2026-07-20 10:58:13 +08:00
ryan
fda8d7fcb1
fix(rate-limits): 请求压力纵轴随 dataZoom 可见区间缩放
...
拖动底部时间范围条时按可见窗口最高 RPS×1.5 更新纵轴,访客轴同步按可见数据重算。
2026-07-20 09:02:31 +08:00
ryan
b91c848256
fix(rate-limits): RPS 纵轴按峰值 1.5 倍动态缩放
...
请求压力图不再使用固定美化刻度上限,改为当前时段最高 RPS × 1.5,低流量更易读、高峰不易裁切。
2026-07-20 08:49:46 +08:00
ryan
a963b8bf54
chore(prettier): format 并清理无用 import
...
make prettier 统一格式化,goimports 与 eslint unused-imports 自动移除未使用导入。
2026-07-19 20:51:12 +08:00
ryan
d9663f91d6
chore: make prettier 自动清理前后端无用 import
...
前端接入 eslint-plugin-unused-imports,pnpm format 同步执行 eslint --fix;
后端将 gofmt 替换为 goimports,并修复 danger-zone 未使用导入。
2026-07-19 20:47:28 +08:00
ryan
4481677ef3
refactor(pages): 公开部署源任务并默认每日扫描
...
移除 Pages 部署源任务的 InternalOnly 限制,任务管理可查看与调度;
将 scanner cron 与 GitHub latest 默认检查间隔调整为每天一次,
并优化部署历史列表展示。
2026-07-19 20:41:09 +08:00
ryan
20249d917c
feat(rate-limits): use 3-minute trend buckets
...
Rate-limit analysis requests overview with bucket_minutes=3; RPS uses
count/180. Overview still defaults to 60-minute buckets.
2026-07-19 20:30:20 +08:00
ryan
abe8fb8268
refactor(pages): 精简部署源模型并重构详情页交互
...
将 Remote 网络策略收敛为 allow_insecure,去掉脱敏与无用字段;
Pages 详情拆为部署/设置 Tab,统一卡片样式与来源信息展示。
2026-07-19 20:23:31 +08:00
ryan
c92f986978
merge: 合并 PR #22 Pages 部署源 V2 到 feat/pages-source-sync-v2
...
基于最新 main 合并 deqiying/feat/pages-source-sync-v2,
解决 docs/changelog/index.md 与限流相关条目的冲突。
2026-07-19 19:36:48 +08:00
ryan
72962beb0f
feat(rate-limits): use 1m buckets and 24h/3d ranges
...
Allow overview bucket_minutes=1; rate-limit analysis uses 1-minute
buckets and replaces 7d preset with 3 days.
2026-07-19 19:20:59 +08:00
ryan
b56290d79d
feat(rate-limits): use 5m trend buckets and 24h/7d ranges
...
Overview API accepts bucket_minutes (5|60); rate-limit analysis uses
5-minute buckets and drops 15d/30d presets. Widen rank value column.
2026-07-19 19:18:15 +08:00
deqiying
67b051c2bc
feat(frontend): 支持 Pages 自动更新交互
...
在 GitHub latest 来源中提供自动更新开关、检查间隔和运行状态。\n页面按来源到期时间低频刷新,并在自动发布或人工回滚后同步项目与部署历史。
2026-07-19 19:09:57 +08:00
ryan
86d2d6b0ad
feat(rate-limits): add RPS analysis tab with dual-axis chart
...
Split rate-limits into analysis/config tabs; reuse access-log overview
filters; chart hourly RPS vs visits with dataZoom; rank top hosts/IPs
by window-average RPS.
2026-07-19 19:09:01 +08:00
deqiying
c39a3edcc3
feat(pages): 支持 GitHub Release 部署源
...
增加 latest/tag 手动检查与同步、ETag 与限流退避、资源替换确认,以及对应的前端来源管理和部署来源展示。
2026-07-19 18:31:42 +08:00
ryan
4c17f5277a
feat(agent): persist Pages dir in Docker deploy volume
...
Mount openflare-agent-pages to /data/var/lib/openflare/pages so
container rebuilds keep local Pages packages.
2026-07-19 18:28:35 +08:00
ryan
39cba821d5
feat(frontend): add security rate-limits page and inherit UI
2026-07-19 18:17:16 +08:00
deqiying
38b0516937
feat(pages): 支持 Remote 部署源同步
...
新增部署源配置与运行态模型、安全下载、租约续期、原子激活和失败补偿。
接入内部任务与脱敏前端交互,并阻止数据库 Trace 和日志展开敏感查询参数。
2026-07-19 17:36:51 +08:00