mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-01-03 04:26:35 +08:00
IP名单优化
* 增加IP灰名单,用于仅记录并观察IP * 优化IP名单同步版本号管理 * WAF记录IP动作优先记录到网站和策略相关的IP名单中
This commit is contained in:
@@ -69,6 +69,20 @@ func (this *WAFManager) ConvertWAF(policy *firewallconfigs.HTTPFirewallPolicy) (
|
||||
|
||||
// inbound
|
||||
if policy.Inbound != nil && policy.Inbound.IsOn {
|
||||
// ip lists
|
||||
if policy.Inbound.AllowListRef != nil && policy.Inbound.AllowListRef.IsOn && policy.Inbound.AllowListRef.ListId > 0 {
|
||||
w.AllowListId = policy.Inbound.AllowListRef.ListId
|
||||
}
|
||||
|
||||
if policy.Inbound.DenyListRef != nil && policy.Inbound.DenyListRef.IsOn && policy.Inbound.DenyListRef.ListId > 0 {
|
||||
w.DenyListId = policy.Inbound.DenyListRef.ListId
|
||||
}
|
||||
|
||||
if policy.Inbound.GreyListRef != nil && policy.Inbound.GreyListRef.IsOn && policy.Inbound.GreyListRef.ListId > 0 {
|
||||
w.GreyListId = policy.Inbound.GreyListRef.ListId
|
||||
}
|
||||
|
||||
// groups
|
||||
for _, group := range policy.Inbound.Groups {
|
||||
g := &RuleGroup{
|
||||
Id: group.Id,
|
||||
|
||||
Reference in New Issue
Block a user