mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-04-20 19:55:25 +08:00
实现基础的DDoS防护
This commit is contained in:
17
pkg/serverconfigs/ddosconfigs/tcp_config.go
Normal file
17
pkg/serverconfigs/ddosconfigs/tcp_config.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user