Files
EdgeCommon/pkg/serverconfigs/firewallconfigs/syn_flood_config.go

26 lines
772 B
Go
Raw Normal View History

2022-01-10 19:54:18 +08:00
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package firewallconfigs
// SYNFloodConfig Syn flood防护设置
type SYNFloodConfig struct {
2022-05-21 18:57:59 +08:00
IsPrior bool `yaml:"isPrior" json:"isPrior"`
2022-01-10 19:54:18 +08:00
IsOn bool `yaml:"isOn" json:"isOn"`
MinAttempts int32 `yaml:"minAttempts" json:"minAttempts"` // 最小尝试次数/分钟
TimeoutSeconds int32 `yaml:"timeoutSeconds" json:"timeoutSeconds"` // 拦截超时时间
IgnoreLocal bool `yaml:"ignoreLocal" json:"ignoreLocal"` // 忽略本地IP
}
2024-04-07 14:21:29 +08:00
func NewSYNFloodConfig() *SYNFloodConfig {
2022-01-10 20:07:43 +08:00
return &SYNFloodConfig{
IsOn: false,
2022-01-10 20:07:43 +08:00
MinAttempts: 10,
TimeoutSeconds: 1800,
2022-01-10 20:07:43 +08:00
IgnoreLocal: true,
}
}
2022-01-10 19:54:18 +08:00
func (this *SYNFloodConfig) Init() error {
return nil
}