mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-03 20:40:25 +08:00
26 lines
772 B
Go
26 lines
772 B
Go
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
|
|
|
package firewallconfigs
|
|
|
|
// SYNFloodConfig Syn flood防护设置
|
|
type SYNFloodConfig struct {
|
|
IsPrior bool `yaml:"isPrior" json:"isPrior"`
|
|
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
|
|
}
|
|
|
|
func NewSYNFloodConfig() *SYNFloodConfig {
|
|
return &SYNFloodConfig{
|
|
IsOn: false,
|
|
MinAttempts: 10,
|
|
TimeoutSeconds: 1800,
|
|
IgnoreLocal: true,
|
|
}
|
|
}
|
|
|
|
func (this *SYNFloodConfig) Init() error {
|
|
return nil
|
|
}
|