5秒盾增加QPS限制选项

This commit is contained in:
刘祥超
2023-07-14 11:01:14 +08:00
parent 8426bf21be
commit 102b5859b3

View File

@@ -12,6 +12,7 @@ type UAMConfig struct {
AddToWhiteList bool `yaml:"addToWhiteList" json:"addToWhiteList"` // 是否将IP加入到白名单 AddToWhiteList bool `yaml:"addToWhiteList" json:"addToWhiteList"` // 是否将IP加入到白名单
OnlyURLPatterns []*shared.URLPattern `yaml:"onlyURLPatterns" json:"onlyURLPatterns"` // 仅限的URL OnlyURLPatterns []*shared.URLPattern `yaml:"onlyURLPatterns" json:"onlyURLPatterns"` // 仅限的URL
ExceptURLPatterns []*shared.URLPattern `yaml:"exceptURLPatterns" json:"exceptURLPatterns"` // 排除的URL ExceptURLPatterns []*shared.URLPattern `yaml:"exceptURLPatterns" json:"exceptURLPatterns"` // 排除的URL
MinQPSPerIP int `yaml:"minQPSPerIP" json:"minQPSPerIP"` // 启用要求的单IP最低平均QPS
} }
func NewUAMConfig() *UAMConfig { func NewUAMConfig() *UAMConfig {