2022-05-18 21:02:58 +08:00
|
|
|
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
|
|
|
|
|
|
|
|
|
package ddosconfigs
|
|
|
|
|
|
|
|
|
|
type TCPConfig struct {
|
2022-08-26 11:31:50 +08:00
|
|
|
IsPrior bool `json:"isPrior"`
|
|
|
|
|
IsOn bool `json:"isOn"`
|
|
|
|
|
MaxConnections int32 `json:"maxConnections"`
|
|
|
|
|
MaxConnectionsPerIP int32 `json:"maxConnectionsPerIP"`
|
|
|
|
|
NewConnectionsRate int32 `json:"newConnectionsRate"`
|
|
|
|
|
|
|
|
|
|
// 自动加入黑名单连接速率
|
|
|
|
|
DenyNewConnectionsRate int32 `json:"denyNewConnectionsRate"`
|
|
|
|
|
DenyNewConnectionsRateTimeout int32 `json:"denyNewConnectionsRateTimeout"`
|
|
|
|
|
|
|
|
|
|
AllowIPList []*IPConfig `json:"allowIPList"`
|
|
|
|
|
Ports []*PortConfig `json:"ports"`
|
2022-05-18 21:02:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (this *TCPConfig) Init() error {
|
|
|
|
|
return nil
|
|
|
|
|
}
|