From 7aff314e72b2e989cc38b096ec53ee5dbb0d4a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Mon, 10 Jan 2022 20:07:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E7=9A=84SY?= =?UTF-8?q?N=20Flood=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/serverconfigs/firewallconfigs/syn_flood_config.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/serverconfigs/firewallconfigs/syn_flood_config.go b/pkg/serverconfigs/firewallconfigs/syn_flood_config.go index 17289ca..ad87a64 100644 --- a/pkg/serverconfigs/firewallconfigs/syn_flood_config.go +++ b/pkg/serverconfigs/firewallconfigs/syn_flood_config.go @@ -10,6 +10,15 @@ type SYNFloodConfig struct { IgnoreLocal bool `yaml:"ignoreLocal" json:"ignoreLocal"` // 忽略本地IP } +func DefaultSYNFloodConfig() *SYNFloodConfig { + return &SYNFloodConfig{ + IsOn: true, + MinAttempts: 10, + TimeoutSeconds: 600, + IgnoreLocal: true, + } +} + func (this *SYNFloodConfig) Init() error { return nil }