diff --git a/docs/changelog/index.md b/docs/changelog/index.md
index c8da7b27..d405c7b6 100644
--- a/docs/changelog/index.md
+++ b/docs/changelog/index.md
@@ -29,6 +29,7 @@ sidebar: false
### 改进
- IP 组自动规则中的 `StatusCount` / `StatusRatio` 支持状态码类写法(如 `"2xx"`、`"4xx"`、`"5xx"`),便于按整类错误率匹配。
+- IP 组同步间隔下限由 5 分钟调整为 1 分钟,便于更频繁同步自动/订阅名单。
### 修复
diff --git a/frontend/app/(main)/waf/components/ip-group-dialog.tsx b/frontend/app/(main)/waf/components/ip-group-dialog.tsx
index f3693c8c..987ee3c3 100644
--- a/frontend/app/(main)/waf/components/ip-group-dialog.tsx
+++ b/frontend/app/(main)/waf/components/ip-group-dialog.tsx
@@ -58,7 +58,7 @@ const ipGroupSchema = z
subscription_url: z.string(),
subscription_format: z.enum(['text', 'json']),
subscription_mapping_rule: z.string(),
- sync_interval_minutes: z.number().int().min(5),
+ sync_interval_minutes: z.number().int().min(1),
})
.superRefine((value, context) => {
if (value.type === 'subscription' && !value.subscription_url.trim()) {
@@ -329,7 +329,7 @@ export function IPGroupDialog({
field.onChange(Number(event.target.value))
@@ -337,7 +337,7 @@ export function IPGroupDialog({
/>
- 最小 5 分钟,默认 1440 分钟。
+ 最小 1 分钟,默认 1440 分钟。
@@ -376,7 +376,7 @@ export function IPGroupDialog({
field.onChange(Number(event.target.value))
@@ -384,7 +384,8 @@ export function IPGroupDialog({
/>
- 定时从请求日志挖掘恶意 IP 的周期。最小 5 分钟。
+ 定时从请求日志挖掘恶意 IP 的周期。最小 1 分钟,默认
+ 1440 分钟。
diff --git a/internal/apps/openflare/waf/logics.go b/internal/apps/openflare/waf/logics.go
index 53c115d3..f33991f6 100644
--- a/internal/apps/openflare/waf/logics.go
+++ b/internal/apps/openflare/waf/logics.go
@@ -32,7 +32,8 @@ const (
defaultWAFIPGroupSyncIntervalMinutes = 1440
defaultWAFIPGroupAutoLookbackMinutes = 60
- minWAFIPGroupSyncIntervalMinutes = 5
+ minWAFIPGroupSyncIntervalMinutes = 1
+ minWAFIPGroupAutoLookbackMinutes = 5
maxWAFIPGroupSyncIntervalMinutes = 43200
minPoWSessionTTLSeconds = 60
minPoWChallengeTTLSeconds = 30
@@ -507,8 +508,8 @@ func parseIPGroupAutoConfig(raw json.RawMessage) (ipGroupAutoConfig, error) {
if config.LookbackMinutes <= 0 {
config.LookbackMinutes = defaultWAFIPGroupAutoLookbackMinutes
}
- if config.LookbackMinutes < minWAFIPGroupSyncIntervalMinutes {
- config.LookbackMinutes = minWAFIPGroupSyncIntervalMinutes
+ if config.LookbackMinutes < minWAFIPGroupAutoLookbackMinutes {
+ config.LookbackMinutes = minWAFIPGroupAutoLookbackMinutes
}
if config.LookbackMinutes > maxWAFIPGroupSyncIntervalMinutes {
config.LookbackMinutes = maxWAFIPGroupSyncIntervalMinutes