mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-12 11:20:26 +08:00
实现基础的DDoS防护
This commit is contained in:
@@ -30,23 +30,22 @@ type NodeCluster struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
NodeGrantId int64 `protobuf:"varint,4,opt,name=nodeGrantId,proto3" json:"nodeGrantId,omitempty"`
|
||||
InstallDir string `protobuf:"bytes,5,opt,name=installDir,proto3" json:"installDir,omitempty"`
|
||||
UniqueId string `protobuf:"bytes,6,opt,name=uniqueId,proto3" json:"uniqueId,omitempty"`
|
||||
Secret string `protobuf:"bytes,7,opt,name=secret,proto3" json:"secret,omitempty"`
|
||||
DnsName string `protobuf:"bytes,8,opt,name=dnsName,proto3" json:"dnsName,omitempty"`
|
||||
DnsDomainId int64 `protobuf:"varint,9,opt,name=dnsDomainId,proto3" json:"dnsDomainId,omitempty"`
|
||||
HttpCachePolicyId int64 `protobuf:"varint,10,opt,name=httpCachePolicyId,proto3" json:"httpCachePolicyId,omitempty"`
|
||||
HttpFirewallPolicyId int64 `protobuf:"varint,11,opt,name=httpFirewallPolicyId,proto3" json:"httpFirewallPolicyId,omitempty"`
|
||||
IsOn bool `protobuf:"varint,12,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
TimeZone string `protobuf:"bytes,13,opt,name=timeZone,proto3" json:"timeZone,omitempty"`
|
||||
NodeMaxThreads int32 `protobuf:"varint,14,opt,name=nodeMaxThreads,proto3" json:"nodeMaxThreads,omitempty"`
|
||||
NodeTCPMaxConnections int32 `protobuf:"varint,15,opt,name=nodeTCPMaxConnections,proto3" json:"nodeTCPMaxConnections,omitempty"`
|
||||
AutoOpenPorts bool `protobuf:"varint,16,opt,name=autoOpenPorts,proto3" json:"autoOpenPorts,omitempty"`
|
||||
IsPinned bool `protobuf:"varint,17,opt,name=isPinned,proto3" json:"isPinned,omitempty"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
NodeGrantId int64 `protobuf:"varint,4,opt,name=nodeGrantId,proto3" json:"nodeGrantId,omitempty"`
|
||||
InstallDir string `protobuf:"bytes,5,opt,name=installDir,proto3" json:"installDir,omitempty"`
|
||||
UniqueId string `protobuf:"bytes,6,opt,name=uniqueId,proto3" json:"uniqueId,omitempty"`
|
||||
Secret string `protobuf:"bytes,7,opt,name=secret,proto3" json:"secret,omitempty"`
|
||||
DnsName string `protobuf:"bytes,8,opt,name=dnsName,proto3" json:"dnsName,omitempty"`
|
||||
DnsDomainId int64 `protobuf:"varint,9,opt,name=dnsDomainId,proto3" json:"dnsDomainId,omitempty"`
|
||||
HttpCachePolicyId int64 `protobuf:"varint,10,opt,name=httpCachePolicyId,proto3" json:"httpCachePolicyId,omitempty"`
|
||||
HttpFirewallPolicyId int64 `protobuf:"varint,11,opt,name=httpFirewallPolicyId,proto3" json:"httpFirewallPolicyId,omitempty"`
|
||||
IsOn bool `protobuf:"varint,12,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
TimeZone string `protobuf:"bytes,13,opt,name=timeZone,proto3" json:"timeZone,omitempty"`
|
||||
NodeMaxThreads int32 `protobuf:"varint,14,opt,name=nodeMaxThreads,proto3" json:"nodeMaxThreads,omitempty"`
|
||||
AutoOpenPorts bool `protobuf:"varint,16,opt,name=autoOpenPorts,proto3" json:"autoOpenPorts,omitempty"`
|
||||
IsPinned bool `protobuf:"varint,17,opt,name=isPinned,proto3" json:"isPinned,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NodeCluster) Reset() {
|
||||
@@ -179,13 +178,6 @@ func (x *NodeCluster) GetNodeMaxThreads() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetNodeTCPMaxConnections() int32 {
|
||||
if x != nil {
|
||||
return x.NodeTCPMaxConnections
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetAutoOpenPorts() bool {
|
||||
if x != nil {
|
||||
return x.AutoOpenPorts
|
||||
@@ -205,7 +197,7 @@ var File_models_model_node_cluster_proto protoreflect.FileDescriptor
|
||||
var file_models_model_node_cluster_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xb3, 0x04, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xfd, 0x03, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
|
||||
0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65,
|
||||
@@ -233,15 +225,12 @@ var file_models_model_node_cluster_proto_rawDesc = []byte{
|
||||
0x09, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x4d, 0x61, 0x78, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x18, 0x0e, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x78, 0x54, 0x68, 0x72, 0x65,
|
||||
0x61, 0x64, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x43, 0x50, 0x4d, 0x61,
|
||||
0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x15, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x43, 0x50, 0x4d, 0x61, 0x78, 0x43, 0x6f,
|
||||
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x75, 0x74,
|
||||
0x6f, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x69, 0x73, 0x50, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x08, 0x69, 0x73, 0x50, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x61, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x4f, 0x70, 0x65, 0x6e, 0x50,
|
||||
0x6f, 0x72, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f,
|
||||
0x4f, 0x70, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x50,
|
||||
0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x50,
|
||||
0x69, 0x6e, 0x6e, 0x65, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user