实现基础的DDoS防护

This commit is contained in:
GoEdgeLab
2022-05-18 21:02:58 +08:00
parent de09d8f2b9
commit eb559b930e
15 changed files with 2290 additions and 1294 deletions

View File

@@ -0,0 +1,17 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package ddosconfigs
type TCPConfig struct {
IsPrior bool `json:"isPrior"`
IsOn bool `json:"isOn"`
MaxConnections int32 `json:"maxConnections"`
MaxConnectionsPerIP int32 `json:"maxConnectionsPerIP"`
NewConnectionsRate int32 `json:"newConnectionsRate"`
AllowIPList []*IPConfig `json:"allowIPList"`
Ports []*PortConfig `json:"ports"`
}
func (this *TCPConfig) Init() error {
return nil
}