实现IP名单管理

This commit is contained in:
GoEdgeLab
2020-11-07 19:40:32 +08:00
parent 0e141f5e8c
commit 7d5eddd367
12 changed files with 2397 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
package firewallconfigs
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/ipconfigs"
type HTTPFirewallInboundConfig struct {
IsOn bool `yaml:"isOn" json:"isOn"`
GroupRefs []*HTTPFirewallRuleGroupRef `yaml:"groupRefs" json:"groupRefs"`
@@ -7,6 +9,11 @@ type HTTPFirewallInboundConfig struct {
// 地区相关
Region *HTTPFirewallRegionConfig `yaml:"region" json:"region"`
// IP名单
WhiteListRef *ipconfigs.IPListRef `yaml:"whiteListRef" json:"whiteListRef"`
BlackListRef *ipconfigs.IPListRef `yaml:"blackListRef" json:"blackListRef"`
GreyListRef *ipconfigs.IPListRef `yaml:"greyListRef" json:"greyListRef"`
}
// 初始化