增加国家/地区封禁管理

This commit is contained in:
刘祥超
2020-11-06 11:02:18 +08:00
parent a5d8d3f626
commit 3b4a9ed4cf
12 changed files with 1326 additions and 174 deletions
@@ -4,6 +4,9 @@ type HTTPFirewallInboundConfig struct {
IsOn bool `yaml:"isOn" json:"isOn"`
GroupRefs []*HTTPFirewallRuleGroupRef `yaml:"groupRefs" json:"groupRefs"`
Groups []*HTTPFirewallRuleGroup `yaml:"groups" json:"groups"`
// 地区相关
Region *HTTPFirewallRegionConfig `yaml:"region" json:"region"`
}
// 初始化
@@ -0,0 +1,7 @@
package firewallconfigs
type HTTPFirewallRegionConfig struct {
IsOn bool `yaml:"isOn" json:"isOn"`
DenyCountryIds []int64 `yaml:"denyCountryIds" json:"denyCountryIds"` // 封禁的国家|地区
DenyProvinces []int64 `yaml:"denyProvinceIds" json:"denyProvinceIds"` // 封禁的省或自治区
}