mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-06 14:50:24 +08:00
将全局的通用设置--域名审核设置移到“集群设置--网站设置”中
This commit is contained in:
@@ -10973,6 +10973,15 @@
|
|||||||
"user"
|
"user"
|
||||||
],
|
],
|
||||||
"isDeprecated": false
|
"isDeprecated": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "findServerAuditingPrompt",
|
||||||
|
"requestMessageName": "FindServerAuditingPromptRequest",
|
||||||
|
"responseMessageName": "FindServerAuditingPromptResponse",
|
||||||
|
"code": "rpc findServerAuditingPrompt(FindServerAuditingPromptRequest) returns (FindServerAuditingPromptResponse);",
|
||||||
|
"doc": "获取域名审核时的提示文字",
|
||||||
|
"roles": [],
|
||||||
|
"isDeprecated": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"filename": "service_server.proto",
|
"filename": "service_server.proto",
|
||||||
@@ -18491,11 +18500,11 @@
|
|||||||
{
|
{
|
||||||
"name": "FindEnabledServerUAMRequest",
|
"name": "FindEnabledServerUAMRequest",
|
||||||
"code": "message FindEnabledServerUAMRequest {\n\tint64 serverId = 1; // 网站ID\n}",
|
"code": "message FindEnabledServerUAMRequest {\n\tint64 serverId = 1; // 网站ID\n}",
|
||||||
"doc": "查找网站UAM设置"
|
"doc": "查找网站UAM(5秒盾)设置"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "FindEnabledServerUAMResponse",
|
"name": "FindEnabledServerUAMResponse",
|
||||||
"code": "message FindEnabledServerUAMResponse {\n\tbytes uamJSON = 1;\n}",
|
"code": "message FindEnabledServerUAMResponse {\n\tbytes uamJSON = 1; // UAM设置\n}",
|
||||||
"doc": ""
|
"doc": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -19508,6 +19517,16 @@
|
|||||||
"code": "message FindServer5MinutelyStatsWithDayResponse {\n\trepeated Stat stats = 1;\n\n\n\tmessage Stat {\n\t\tstring day = 1;\n\t\tstring timeFrom = 2;\n\t\tstring timeTo = 3;\n\t\tint64 bytes = 4;\n\t\tint64 cachedBytes = 5;\n\t\tint64 countRequests = 6;\n\t\tint64 countCachedRequests = 7;\n\t}\n}",
|
"code": "message FindServer5MinutelyStatsWithDayResponse {\n\trepeated Stat stats = 1;\n\n\n\tmessage Stat {\n\t\tstring day = 1;\n\t\tstring timeFrom = 2;\n\t\tstring timeTo = 3;\n\t\tint64 bytes = 4;\n\t\tint64 cachedBytes = 5;\n\t\tint64 countRequests = 6;\n\t\tint64 countCachedRequests = 7;\n\t}\n}",
|
||||||
"doc": ""
|
"doc": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "FindServerAuditingPromptRequest",
|
||||||
|
"code": "message FindServerAuditingPromptRequest {\n\tint64 serverId = 1; // 网站ID\n}",
|
||||||
|
"doc": "获取域名审核时的提示文字"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "FindServerAuditingPromptResponse",
|
||||||
|
"code": "message FindServerAuditingPromptResponse {\n\tstring promptText = 1; // 提示文字\n}",
|
||||||
|
"doc": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "FindServerBandwidthStatsRequest",
|
"name": "FindServerBandwidthStatsRequest",
|
||||||
"code": "message FindServerBandwidthStatsRequest {\n\tint64 serverId = 1; // 服务ID\n\tstring month = 2; // YYYYMM,month和day二选一\n\tstring day = 3; // YYYYMMDD\n\tstring algo = 4; // 带宽算法,目前支持secondly和avg\n}",
|
"code": "message FindServerBandwidthStatsRequest {\n\tint64 serverId = 1; // 服务ID\n\tstring month = 2; // YYYYMM,month和day二选一\n\tstring day = 3; // YYYYMMDD\n\tstring algo = 4; // 带宽算法,目前支持secondly和avg\n}",
|
||||||
@@ -22636,7 +22655,7 @@
|
|||||||
{
|
{
|
||||||
"name": "UpdateServerUAMRequest",
|
"name": "UpdateServerUAMRequest",
|
||||||
"code": "message UpdateServerUAMRequest {\n\tint64 serverId = 1; // 网站ID\n\tbytes uamJSON = 2;\n}",
|
"code": "message UpdateServerUAMRequest {\n\tint64 serverId = 1; // 网站ID\n\tbytes uamJSON = 2;\n}",
|
||||||
"doc": "修改网站UAM设置"
|
"doc": "修改网站UAM(5秒盾)设置"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateServerUDPRequest",
|
"name": "UpdateServerUDPRequest",
|
||||||
@@ -22655,7 +22674,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateServerUserRequest",
|
"name": "UpdateServerUserRequest",
|
||||||
"code": "message UpdateServerUserRequest {\n\tint64 serverId = 1; // 网站ID\n\tint64 userId = 2;\n}",
|
"code": "message UpdateServerUserRequest {\n\tint64 serverId = 1; // 网站ID\n\tint64 userId = 2; // 用户ID\n}",
|
||||||
"doc": "修改网站所属用户"
|
"doc": "修改网站所属用户"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -79,6 +79,7 @@ const (
|
|||||||
ServerService_UpdateServerUser_FullMethodName = "/pb.ServerService/updateServerUser"
|
ServerService_UpdateServerUser_FullMethodName = "/pb.ServerService/updateServerUser"
|
||||||
ServerService_UpdateServerName_FullMethodName = "/pb.ServerService/updateServerName"
|
ServerService_UpdateServerName_FullMethodName = "/pb.ServerService/updateServerName"
|
||||||
ServerService_CopyServerConfig_FullMethodName = "/pb.ServerService/copyServerConfig"
|
ServerService_CopyServerConfig_FullMethodName = "/pb.ServerService/copyServerConfig"
|
||||||
|
ServerService_FindServerAuditingPrompt_FullMethodName = "/pb.ServerService/findServerAuditingPrompt"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ServerServiceClient is the client API for ServerService service.
|
// ServerServiceClient is the client API for ServerService service.
|
||||||
@@ -205,6 +206,8 @@ type ServerServiceClient interface {
|
|||||||
UpdateServerName(ctx context.Context, in *UpdateServerNameRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
UpdateServerName(ctx context.Context, in *UpdateServerNameRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||||
// 在网站之间复制配置
|
// 在网站之间复制配置
|
||||||
CopyServerConfig(ctx context.Context, in *CopyServerConfigRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
CopyServerConfig(ctx context.Context, in *CopyServerConfigRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||||
|
// 获取域名审核时的提示文字
|
||||||
|
FindServerAuditingPrompt(ctx context.Context, in *FindServerAuditingPromptRequest, opts ...grpc.CallOption) (*FindServerAuditingPromptResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type serverServiceClient struct {
|
type serverServiceClient struct {
|
||||||
@@ -755,6 +758,15 @@ func (c *serverServiceClient) CopyServerConfig(ctx context.Context, in *CopyServ
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *serverServiceClient) FindServerAuditingPrompt(ctx context.Context, in *FindServerAuditingPromptRequest, opts ...grpc.CallOption) (*FindServerAuditingPromptResponse, error) {
|
||||||
|
out := new(FindServerAuditingPromptResponse)
|
||||||
|
err := c.cc.Invoke(ctx, ServerService_FindServerAuditingPrompt_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// ServerServiceServer is the server API for ServerService service.
|
// ServerServiceServer is the server API for ServerService service.
|
||||||
// All implementations should embed UnimplementedServerServiceServer
|
// All implementations should embed UnimplementedServerServiceServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@@ -879,6 +891,8 @@ type ServerServiceServer interface {
|
|||||||
UpdateServerName(context.Context, *UpdateServerNameRequest) (*RPCSuccess, error)
|
UpdateServerName(context.Context, *UpdateServerNameRequest) (*RPCSuccess, error)
|
||||||
// 在网站之间复制配置
|
// 在网站之间复制配置
|
||||||
CopyServerConfig(context.Context, *CopyServerConfigRequest) (*RPCSuccess, error)
|
CopyServerConfig(context.Context, *CopyServerConfigRequest) (*RPCSuccess, error)
|
||||||
|
// 获取域名审核时的提示文字
|
||||||
|
FindServerAuditingPrompt(context.Context, *FindServerAuditingPromptRequest) (*FindServerAuditingPromptResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedServerServiceServer should be embedded to have forward compatible implementations.
|
// UnimplementedServerServiceServer should be embedded to have forward compatible implementations.
|
||||||
@@ -1065,6 +1079,9 @@ func (UnimplementedServerServiceServer) UpdateServerName(context.Context, *Updat
|
|||||||
func (UnimplementedServerServiceServer) CopyServerConfig(context.Context, *CopyServerConfigRequest) (*RPCSuccess, error) {
|
func (UnimplementedServerServiceServer) CopyServerConfig(context.Context, *CopyServerConfigRequest) (*RPCSuccess, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CopyServerConfig not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CopyServerConfig not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedServerServiceServer) FindServerAuditingPrompt(context.Context, *FindServerAuditingPromptRequest) (*FindServerAuditingPromptResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method FindServerAuditingPrompt not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
// UnsafeServerServiceServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeServerServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
// Use of this interface is not recommended, as added methods to ServerServiceServer will
|
// Use of this interface is not recommended, as added methods to ServerServiceServer will
|
||||||
@@ -2157,6 +2174,24 @@ func _ServerService_CopyServerConfig_Handler(srv interface{}, ctx context.Contex
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _ServerService_FindServerAuditingPrompt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(FindServerAuditingPromptRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ServerServiceServer).FindServerAuditingPrompt(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ServerService_FindServerAuditingPrompt_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ServerServiceServer).FindServerAuditingPrompt(ctx, req.(*FindServerAuditingPromptRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// ServerService_ServiceDesc is the grpc.ServiceDesc for ServerService service.
|
// ServerService_ServiceDesc is the grpc.ServiceDesc for ServerService service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@@ -2404,6 +2439,10 @@ var ServerService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "copyServerConfig",
|
MethodName: "copyServerConfig",
|
||||||
Handler: _ServerService_CopyServerConfig_Handler,
|
Handler: _ServerService_CopyServerConfig_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "findServerAuditingPrompt",
|
||||||
|
Handler: _ServerService_FindServerAuditingPrompt_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "service_server.proto",
|
Metadata: "service_server.proto",
|
||||||
|
|||||||
@@ -190,6 +190,9 @@ service ServerService {
|
|||||||
|
|
||||||
// 在网站之间复制配置
|
// 在网站之间复制配置
|
||||||
rpc copyServerConfig(CopyServerConfigRequest) returns (RPCSuccess);
|
rpc copyServerConfig(CopyServerConfigRequest) returns (RPCSuccess);
|
||||||
|
|
||||||
|
// 获取域名审核时的提示文字
|
||||||
|
rpc findServerAuditingPrompt(FindServerAuditingPromptRequest) returns (FindServerAuditingPromptResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建网站
|
// 创建网站
|
||||||
@@ -715,25 +718,25 @@ message ComposeServerConfigResponse {
|
|||||||
bytes serverConfigJSON = 1;
|
bytes serverConfigJSON = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改网站UAM设置
|
// 修改网站UAM(5秒盾)设置
|
||||||
message UpdateServerUAMRequest {
|
message UpdateServerUAMRequest {
|
||||||
int64 serverId = 1; // 网站ID
|
int64 serverId = 1; // 网站ID
|
||||||
bytes uamJSON = 2;
|
bytes uamJSON = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查找网站UAM设置
|
// 查找网站UAM(5秒盾)设置
|
||||||
message FindEnabledServerUAMRequest {
|
message FindEnabledServerUAMRequest {
|
||||||
int64 serverId = 1; // 网站ID
|
int64 serverId = 1; // 网站ID
|
||||||
}
|
}
|
||||||
|
|
||||||
message FindEnabledServerUAMResponse {
|
message FindEnabledServerUAMResponse {
|
||||||
bytes uamJSON = 1;
|
bytes uamJSON = 1; // UAM设置
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改网站所属用户
|
// 修改网站所属用户
|
||||||
message UpdateServerUserRequest {
|
message UpdateServerUserRequest {
|
||||||
int64 serverId = 1; // 网站ID
|
int64 serverId = 1; // 网站ID
|
||||||
int64 userId = 2;
|
int64 userId = 2; // 用户ID
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改网站名称
|
// 修改网站名称
|
||||||
@@ -752,3 +755,12 @@ message CopyServerConfigRequest {
|
|||||||
int64 targetClusterId = 6; // 目标集群ID
|
int64 targetClusterId = 6; // 目标集群ID
|
||||||
int64 targetUserId = 7; // 目标用户ID
|
int64 targetUserId = 7; // 目标用户ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取域名审核时的提示文字
|
||||||
|
message FindServerAuditingPromptRequest {
|
||||||
|
int64 serverId = 1; // 网站ID
|
||||||
|
}
|
||||||
|
|
||||||
|
message FindServerAuditingPromptResponse {
|
||||||
|
string promptText = 1; // 提示文字
|
||||||
|
}
|
||||||
@@ -1,10 +1,5 @@
|
|||||||
package serverconfigs
|
package serverconfigs
|
||||||
|
|
||||||
const (
|
|
||||||
DefaultTCPPortRangeMin = 10000
|
|
||||||
DefaultTCPPortRangeMax = 40000
|
|
||||||
)
|
|
||||||
|
|
||||||
// GlobalConfig 服务相关的全局设置
|
// GlobalConfig 服务相关的全局设置
|
||||||
// Deprecated
|
// Deprecated
|
||||||
type GlobalConfig struct {
|
type GlobalConfig struct {
|
||||||
@@ -14,8 +9,8 @@ type GlobalConfig struct {
|
|||||||
//AllowMismatchDomains []string `yaml:"allowMismatchDomains" json:"allowMismatchDomains"` // 允许的不匹配的域名
|
//AllowMismatchDomains []string `yaml:"allowMismatchDomains" json:"allowMismatchDomains"` // 允许的不匹配的域名
|
||||||
//DefaultDomain string `yaml:"defaultDomain" json:"defaultDomain"` // 默认的域名
|
//DefaultDomain string `yaml:"defaultDomain" json:"defaultDomain"` // 默认的域名
|
||||||
//DomainMismatchAction *DomainMismatchAction `yaml:"domainMismatchAction" json:"domainMismatchAction"` // 不匹配时采取的动作
|
//DomainMismatchAction *DomainMismatchAction `yaml:"domainMismatchAction" json:"domainMismatchAction"` // 不匹配时采取的动作
|
||||||
DomainAuditingIsOn bool `yaml:"domainAuditingIsOn" json:"domainAuditingIsOn"` // 域名是否需要审核
|
//DomainAuditingIsOn bool `yaml:"domainAuditingIsOn" json:"domainAuditingIsOn"` // 域名是否需要审核
|
||||||
DomainAuditingPrompt string `yaml:"domainAuditingPrompt" json:"domainAuditingPrompt"` // 域名审核的提示
|
//DomainAuditingPrompt string `yaml:"domainAuditingPrompt" json:"domainAuditingPrompt"` // 域名审核的提示
|
||||||
} `yaml:"httpAll" json:"httpAll"`
|
} `yaml:"httpAll" json:"httpAll"`
|
||||||
|
|
||||||
TCPAll struct {
|
TCPAll struct {
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ const (
|
|||||||
LnRequestSchedulingMethodURLMapping LnRequestSchedulingMethod = "urlMapping"
|
LnRequestSchedulingMethodURLMapping LnRequestSchedulingMethod = "urlMapping"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
DefaultTCPPortRangeMin = 10000
|
||||||
|
DefaultTCPPortRangeMax = 40000
|
||||||
|
)
|
||||||
|
|
||||||
func NewGlobalServerConfig() *GlobalServerConfig {
|
func NewGlobalServerConfig() *GlobalServerConfig {
|
||||||
var config = &GlobalServerConfig{}
|
var config = &GlobalServerConfig{}
|
||||||
|
|
||||||
@@ -51,6 +56,9 @@ type GlobalServerConfig struct {
|
|||||||
LnRequestSchedulingMethod LnRequestSchedulingMethod `yaml:"lnRequestSchedulingMethod" json:"lnRequestSchedulingMethod"` // Ln请求调度方法
|
LnRequestSchedulingMethod LnRequestSchedulingMethod `yaml:"lnRequestSchedulingMethod" json:"lnRequestSchedulingMethod"` // Ln请求调度方法
|
||||||
ServerName string `yaml:"serverName" json:"serverName"` // Server名称
|
ServerName string `yaml:"serverName" json:"serverName"` // Server名称
|
||||||
EnableServerAddrVariable bool `yaml:"enableServerAddrVariable" json:"enableServerAddrVariable"` // 是否支持${serverAddr}变量
|
EnableServerAddrVariable bool `yaml:"enableServerAddrVariable" json:"enableServerAddrVariable"` // 是否支持${serverAddr}变量
|
||||||
|
|
||||||
|
DomainAuditingIsOn bool `yaml:"domainAuditingIsOn" json:"domainAuditingIsOn"` // 域名是否需要审核
|
||||||
|
DomainAuditingPrompt string `yaml:"domainAuditingPrompt" json:"domainAuditingPrompt"` // 域名审核的提示
|
||||||
} `yaml:"httpAll" json:"httpAll"` // HTTP统一配置
|
} `yaml:"httpAll" json:"httpAll"` // HTTP统一配置
|
||||||
|
|
||||||
HTTPAccessLog struct {
|
HTTPAccessLog struct {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package systemconfigs
|
|||||||
type SettingCode = string
|
type SettingCode = string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SettingCodeServerGlobalConfig SettingCode = "serverGlobalConfig" // 服务相关全局设置
|
SettingCodeServerGlobalConfig SettingCode = "serverGlobalConfig" // Deprecated 服务相关全局设置
|
||||||
SettingCodeNodeMonitor SettingCode = "nodeMonitor" // 监控节点状态
|
SettingCodeNodeMonitor SettingCode = "nodeMonitor" // 监控节点状态
|
||||||
SettingCodeClusterHealthCheck SettingCode = "clusterHealthCheck" // 集群健康检查
|
SettingCodeClusterHealthCheck SettingCode = "clusterHealthCheck" // 集群健康检查
|
||||||
SettingCodeIPListVersion SettingCode = "ipListVersion" // IP名单的版本号
|
SettingCodeIPListVersion SettingCode = "ipListVersion" // IP名单的版本号
|
||||||
|
|||||||
Reference in New Issue
Block a user