mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-03 04:10:25 +08:00
删除一直未实现的Unix协议相关内容
This commit is contained in:
@@ -544,7 +544,6 @@ const (
|
||||
Server_MenuSettingUAM langs.MessageCode = "server@menu_setting_uam" // 5秒盾
|
||||
Server_MenuSettingUDP langs.MessageCode = "server@menu_setting_udp" // UDP
|
||||
Server_MenuSettingUDPProxy langs.MessageCode = "server@menu_setting_udp_proxy" // UDP代理
|
||||
Server_MenuSettingUnix langs.MessageCode = "server@menu_setting_unix" // Unix
|
||||
Server_MenuSettingUserAgents langs.MessageCode = "server@menu_setting_user_agents" // UA名单
|
||||
Server_MenuSettingWAF langs.MessageCode = "server@menu_setting_waf" // WAF
|
||||
Server_MenuSettingWebP langs.MessageCode = "server@menu_setting_webp" // WebP
|
||||
|
||||
@@ -545,7 +545,6 @@ func init() {
|
||||
"server@menu_setting_uam": "UAM",
|
||||
"server@menu_setting_udp": "UDP",
|
||||
"server@menu_setting_udp_proxy": "UDP Reverse Proxy",
|
||||
"server@menu_setting_unix": "Unix",
|
||||
"server@menu_setting_user_agents": "UA List",
|
||||
"server@menu_setting_waf": "WAF",
|
||||
"server@menu_setting_webp": "WebP",
|
||||
|
||||
@@ -545,7 +545,6 @@ func init() {
|
||||
"server@menu_setting_uam": "5秒盾",
|
||||
"server@menu_setting_udp": "UDP",
|
||||
"server@menu_setting_udp_proxy": "UDP代理",
|
||||
"server@menu_setting_unix": "Unix",
|
||||
"server@menu_setting_user_agents": "UA名单",
|
||||
"server@menu_setting_waf": "WAF",
|
||||
"server@menu_setting_webp": "WebP",
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
"menu_setting_others": "Others",
|
||||
"menu_setting_tcp": "TCP",
|
||||
"menu_setting_tls": "TLS",
|
||||
"menu_setting_unix": "Unix",
|
||||
"menu_setting_udp": "UDP",
|
||||
"menu_setting_delete": "Delete",
|
||||
"menu_setting_http_proxy": "HTTP Reverse Proxy", // in site groups
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
"menu_setting_others": "其他设置",
|
||||
"menu_setting_tcp": "TCP",
|
||||
"menu_setting_tls": "TLS",
|
||||
"menu_setting_unix": "Unix",
|
||||
"menu_setting_udp": "UDP",
|
||||
"menu_setting_delete": "删除",
|
||||
"menu_setting_http_proxy": "HTTP代理", // 网站分组中使用
|
||||
|
||||
@@ -50,7 +50,6 @@ type Server struct {
|
||||
HttpsJSON []byte `protobuf:"bytes,10,opt,name=httpsJSON,proto3" json:"httpsJSON,omitempty"`
|
||||
TcpJSON []byte `protobuf:"bytes,11,opt,name=tcpJSON,proto3" json:"tcpJSON,omitempty"`
|
||||
TlsJSON []byte `protobuf:"bytes,12,opt,name=tlsJSON,proto3" json:"tlsJSON,omitempty"`
|
||||
UnixJSON []byte `protobuf:"bytes,13,opt,name=unixJSON,proto3" json:"unixJSON,omitempty"`
|
||||
UdpJSON []byte `protobuf:"bytes,14,opt,name=udpJSON,proto3" json:"udpJSON,omitempty"`
|
||||
WebId int64 `protobuf:"varint,15,opt,name=webId,proto3" json:"webId,omitempty"`
|
||||
ReverseProxyJSON []byte `protobuf:"bytes,16,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"`
|
||||
@@ -263,13 +262,6 @@ func (x *Server) GetTlsJSON() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Server) GetUnixJSON() []byte {
|
||||
if x != nil {
|
||||
return x.UnixJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Server) GetUdpJSON() []byte {
|
||||
if x != nil {
|
||||
return x.UdpJSON
|
||||
@@ -353,7 +345,7 @@ var file_models_model_server_proto_rawDesc = []byte{
|
||||
0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65,
|
||||
0x73, 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x09, 0x0a, 0x06, 0x53,
|
||||
0x73, 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x09, 0x0a, 0x06, 0x53,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x12, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
|
||||
@@ -403,34 +395,32 @@ var file_models_model_server_proto_rawDesc = []byte{
|
||||
0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x63, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0b, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x07, 0x74, 0x63, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74,
|
||||
0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6c,
|
||||
0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x78, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x78, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0e, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x14, 0x0a, 0x05, 0x77,
|
||||
0x65, 0x62, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49,
|
||||
0x64, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78,
|
||||
0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x72, 0x65, 0x76,
|
||||
0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x24, 0x0a,
|
||||
0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x1a,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68,
|
||||
0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x62, 0x61, 0x6e,
|
||||
0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x22, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x73, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0c, 0x73,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x75,
|
||||
0x73, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55,
|
||||
0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
|
||||
0x77, 0x65, 0x62, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65,
|
||||
0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69,
|
||||
0x64, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x61, 0x6e, 0x64, 0x77,
|
||||
0x69, 0x64, 0x74, 0x68, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x0e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12,
|
||||
0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,
|
||||
0x18, 0x22, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74,
|
||||
0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x23, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x0c, 0x73, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75,
|
||||
0x70, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12,
|
||||
0x1c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,6 @@ const (
|
||||
ServerService_UpdateServerHTTPS_FullMethodName = "/pb.ServerService/updateServerHTTPS"
|
||||
ServerService_UpdateServerTCP_FullMethodName = "/pb.ServerService/updateServerTCP"
|
||||
ServerService_UpdateServerTLS_FullMethodName = "/pb.ServerService/updateServerTLS"
|
||||
ServerService_UpdateServerUnix_FullMethodName = "/pb.ServerService/updateServerUnix"
|
||||
ServerService_UpdateServerUDP_FullMethodName = "/pb.ServerService/updateServerUDP"
|
||||
ServerService_UpdateServerWeb_FullMethodName = "/pb.ServerService/updateServerWeb"
|
||||
ServerService_UpdateServerReverseProxy_FullMethodName = "/pb.ServerService/updateServerReverseProxy"
|
||||
@@ -114,8 +113,6 @@ type ServerServiceClient interface {
|
||||
UpdateServerTCP(ctx context.Context, in *UpdateServerTCPRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 修改网站的TLS设置
|
||||
UpdateServerTLS(ctx context.Context, in *UpdateServerTLSRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 修改网站的Unix设置
|
||||
UpdateServerUnix(ctx context.Context, in *UpdateServerUnixRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 修改网站的UDP设置
|
||||
UpdateServerUDP(ctx context.Context, in *UpdateServerUDPRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 修改网站的Web设置
|
||||
@@ -338,15 +335,6 @@ func (c *serverServiceClient) UpdateServerTLS(ctx context.Context, in *UpdateSer
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *serverServiceClient) UpdateServerUnix(ctx context.Context, in *UpdateServerUnixRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, ServerService_UpdateServerUnix_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *serverServiceClient) UpdateServerUDP(ctx context.Context, in *UpdateServerUDPRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, ServerService_UpdateServerUDP_FullMethodName, in, out, opts...)
|
||||
@@ -843,8 +831,6 @@ type ServerServiceServer interface {
|
||||
UpdateServerTCP(context.Context, *UpdateServerTCPRequest) (*RPCSuccess, error)
|
||||
// 修改网站的TLS设置
|
||||
UpdateServerTLS(context.Context, *UpdateServerTLSRequest) (*RPCSuccess, error)
|
||||
// 修改网站的Unix设置
|
||||
UpdateServerUnix(context.Context, *UpdateServerUnixRequest) (*RPCSuccess, error)
|
||||
// 修改网站的UDP设置
|
||||
UpdateServerUDP(context.Context, *UpdateServerUDPRequest) (*RPCSuccess, error)
|
||||
// 修改网站的Web设置
|
||||
@@ -991,9 +977,6 @@ func (UnimplementedServerServiceServer) UpdateServerTCP(context.Context, *Update
|
||||
func (UnimplementedServerServiceServer) UpdateServerTLS(context.Context, *UpdateServerTLSRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateServerTLS not implemented")
|
||||
}
|
||||
func (UnimplementedServerServiceServer) UpdateServerUnix(context.Context, *UpdateServerUnixRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateServerUnix not implemented")
|
||||
}
|
||||
func (UnimplementedServerServiceServer) UpdateServerUDP(context.Context, *UpdateServerUDPRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateServerUDP not implemented")
|
||||
}
|
||||
@@ -1378,24 +1361,6 @@ func _ServerService_UpdateServerTLS_Handler(srv interface{}, ctx context.Context
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ServerService_UpdateServerUnix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateServerUnixRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ServerServiceServer).UpdateServerUnix(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ServerService_UpdateServerUnix_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ServerServiceServer).UpdateServerUnix(ctx, req.(*UpdateServerUnixRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ServerService_UpdateServerUDP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateServerUDPRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -2387,10 +2352,6 @@ var ServerService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "updateServerTLS",
|
||||
Handler: _ServerService_UpdateServerTLS_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "updateServerUnix",
|
||||
Handler: _ServerService_UpdateServerUnix_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "updateServerUDP",
|
||||
Handler: _ServerService_UpdateServerUDP_Handler,
|
||||
|
||||
@@ -36,7 +36,6 @@ message Server {
|
||||
bytes httpsJSON = 10;
|
||||
bytes tcpJSON = 11;
|
||||
bytes tlsJSON = 12;
|
||||
bytes unixJSON = 13;
|
||||
bytes udpJSON = 14;
|
||||
int64 webId = 15;
|
||||
bytes reverseProxyJSON = 16;
|
||||
|
||||
@@ -47,9 +47,6 @@ service ServerService {
|
||||
// 修改网站的TLS设置
|
||||
rpc updateServerTLS (UpdateServerTLSRequest) returns (RPCSuccess);
|
||||
|
||||
// 修改网站的Unix设置
|
||||
rpc updateServerUnix (UpdateServerUnixRequest) returns (RPCSuccess);
|
||||
|
||||
// 修改网站的UDP设置
|
||||
rpc updateServerUDP (UpdateServerUDPRequest) returns (RPCSuccess);
|
||||
|
||||
@@ -222,7 +219,6 @@ message CreateServerRequest {
|
||||
bytes httpsJSON = 10; // HTTPS协议设置,当type为httpProxy或者httpWeb时填写 @link json:https_protocol
|
||||
bytes tcpJSON = 11; // TCP协议设置,当type为tcpProxy时填写 @link json:tcp_protocol
|
||||
bytes tlsJSON = 12; // TLS协议设置,当type为tcpProxy时填写 @link json:tls_protocol
|
||||
bytes unixJSON = 13; // 备用参数,不用填写
|
||||
bytes udpJSON = 14; // UDP协议设置,当type为udpProxy时填写 @link json:udp_protocol
|
||||
int64 webId = 15; // 可选项,Web配置ID,当type为httpProxy或者httpWeb时填写,可以通过 /HTTPWebService/createHTTPWeb 接口创建;如果你需要配置缓存等信息时需要在 HTTPWebService 接口操作
|
||||
bytes reverseProxyJSON = 16; // 反向代理(包含源站)配置引用,此项可以在创建网站后再设置 @link json:reverse_proxy_ref
|
||||
@@ -324,11 +320,6 @@ message UpdateServerTLSRequest {
|
||||
bytes tlsJSON = 2; // TLS协议设置,当type为tcpProxy时填写 @link json:tls_protocol
|
||||
}
|
||||
|
||||
message UpdateServerUnixRequest {
|
||||
int64 serverId = 1; // 网站ID
|
||||
bytes unixJSON = 2;
|
||||
}
|
||||
|
||||
message UpdateServerUDPRequest {
|
||||
int64 serverId = 1; // 网站ID
|
||||
bytes udpJSON = 2; // UDP协议设置,当type为udpProxy时填写 @link json:udp_protocol
|
||||
|
||||
@@ -73,10 +73,6 @@ func (this *NetworkAddressConfig) Init() error {
|
||||
|
||||
// Addresses 所有的地址列表,不包括scheme
|
||||
func (this *NetworkAddressConfig) Addresses() []string {
|
||||
if this.Protocol == ProtocolUnix {
|
||||
return []string{this.Host}
|
||||
}
|
||||
|
||||
result := []string{}
|
||||
for i := this.MinPort; i <= this.MaxPort; i++ {
|
||||
host := this.Host
|
||||
@@ -87,10 +83,6 @@ func (this *NetworkAddressConfig) Addresses() []string {
|
||||
|
||||
// FullAddresses 所有的地址列表,包含scheme
|
||||
func (this *NetworkAddressConfig) FullAddresses() []string {
|
||||
if this.Protocol == ProtocolUnix {
|
||||
return []string{this.Protocol.String() + ":" + this.Host}
|
||||
}
|
||||
|
||||
result := []string{}
|
||||
for i := this.MinPort; i <= this.MaxPort; i++ {
|
||||
host := this.Host
|
||||
|
||||
@@ -9,10 +9,10 @@ const (
|
||||
ProtocolHTTPS Protocol = "https"
|
||||
ProtocolTCP Protocol = "tcp"
|
||||
ProtocolTLS Protocol = "tls"
|
||||
ProtocolUnix Protocol = "unix"
|
||||
ProtocolUDP Protocol = "udp"
|
||||
|
||||
// 子协议
|
||||
|
||||
ProtocolHTTP4 Protocol = "http4"
|
||||
ProtocolHTTP6 Protocol = "http6"
|
||||
|
||||
@@ -27,7 +27,7 @@ const (
|
||||
)
|
||||
|
||||
func AllProtocols() []Protocol {
|
||||
return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolTCP, ProtocolTLS, ProtocolUnix, ProtocolUDP, ProtocolHTTP4, ProtocolHTTP6, ProtocolHTTPS4, ProtocolHTTPS6, ProtocolTCP4, ProtocolTCP6, ProtocolTLS4, ProtocolTLS6}
|
||||
return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolTCP, ProtocolTLS, ProtocolUDP, ProtocolHTTP4, ProtocolHTTP6, ProtocolHTTPS4, ProtocolHTTPS6, ProtocolTCP4, ProtocolTCP6, ProtocolTLS4, ProtocolTLS6}
|
||||
}
|
||||
|
||||
func (this Protocol) IsHTTPFamily() bool {
|
||||
@@ -46,10 +46,6 @@ func (this Protocol) IsTLSFamily() bool {
|
||||
return this == ProtocolTLS || this == ProtocolTLS4 || this == ProtocolTLS6
|
||||
}
|
||||
|
||||
func (this Protocol) IsUnixFamily() bool {
|
||||
return this == ProtocolUnix
|
||||
}
|
||||
|
||||
func (this Protocol) IsUDPFamily() bool {
|
||||
return this == ProtocolUDP
|
||||
}
|
||||
@@ -69,8 +65,6 @@ func (this Protocol) Primary() Protocol {
|
||||
return ProtocolTCP
|
||||
case ProtocolTLS, ProtocolTLS4, ProtocolTLS6:
|
||||
return ProtocolTLS
|
||||
case ProtocolUnix:
|
||||
return ProtocolUnix
|
||||
case ProtocolUDP:
|
||||
return ProtocolUDP
|
||||
default:
|
||||
|
||||
@@ -17,6 +17,5 @@ func TestProtocol_IsHTTPFamily(t *testing.T) {
|
||||
a.IsTrue(ProtocolTCP.IsTCPFamily())
|
||||
a.IsTrue(ProtocolTCP.IsTCPFamily())
|
||||
a.IsTrue(ProtocolTCP6.IsTCPFamily())
|
||||
a.IsTrue(ProtocolUnix.IsUnixFamily())
|
||||
a.IsTrue(ProtocolUDP.IsUDPFamily())
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
package serverconfigs
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
type UnixProtocolConfig struct {
|
||||
BaseProtocol `yaml:",inline"`
|
||||
}
|
||||
|
||||
func (this *UnixProtocolConfig) Init() error {
|
||||
err := this.InitBase()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// 转换为JSON
|
||||
func (this *UnixProtocolConfig) AsJSON() ([]byte, error) {
|
||||
return json.Marshal(this)
|
||||
}
|
||||
@@ -86,9 +86,6 @@ func (this *ServerAddressGroup) Protocol() Protocol {
|
||||
// Addr 获取当前分组的地址
|
||||
func (this *ServerAddressGroup) Addr() string {
|
||||
protocol := this.Protocol()
|
||||
if protocol == ProtocolUnix {
|
||||
return strings.TrimPrefix(this.fullAddr, protocol.String()+":")
|
||||
}
|
||||
return strings.TrimPrefix(this.fullAddr, protocol.String()+"://")
|
||||
}
|
||||
|
||||
@@ -121,12 +118,6 @@ func (this *ServerAddressGroup) IsTLS() bool {
|
||||
return p == ProtocolTLS || p == ProtocolTLS4 || p == ProtocolTLS6
|
||||
}
|
||||
|
||||
// IsUnix 判断当前分组是否为Unix
|
||||
func (this *ServerAddressGroup) IsUnix() bool {
|
||||
p := this.Protocol()
|
||||
return p == ProtocolUnix
|
||||
}
|
||||
|
||||
// IsUDP 判断当前分组是否为UDP
|
||||
func (this *ServerAddressGroup) IsUDP() bool {
|
||||
p := this.Protocol()
|
||||
|
||||
@@ -27,12 +27,6 @@ func TestServerAddressGroup_Protocol(t *testing.T) {
|
||||
a.IsTrue(group.Protocol() == ProtocolHTTP)
|
||||
a.IsTrue(group.Addr() == "127.0.0.1:1234")
|
||||
}
|
||||
|
||||
{
|
||||
group := NewServerAddressGroup("unix:/tmp/my.sock")
|
||||
a.IsTrue(group.Protocol() == ProtocolUnix)
|
||||
a.IsTrue(group.Addr() == "/tmp/my.sock")
|
||||
}
|
||||
}
|
||||
|
||||
func TestServerAddressGroup_MatchServerName(t *testing.T) {
|
||||
|
||||
@@ -32,7 +32,6 @@ type ServerConfig struct {
|
||||
HTTPS *HTTPSProtocolConfig `yaml:"https" json:"https"` // HTTPS配置
|
||||
TCP *TCPProtocolConfig `yaml:"tcp" json:"tcp"` // TCP配置
|
||||
TLS *TLSProtocolConfig `yaml:"tls" json:"tls"` // TLS配置
|
||||
Unix *UnixProtocolConfig `yaml:"unix" json:"unix"` // Unix配置
|
||||
UDP *UDPProtocolConfig `yaml:"udp" json:"udp"` // UDP配置
|
||||
|
||||
// Web配置
|
||||
@@ -214,13 +213,6 @@ func (this *ServerConfig) Init(ctx context.Context) (results []error) {
|
||||
}
|
||||
}
|
||||
|
||||
if this.Unix != nil {
|
||||
err := this.Unix.Init()
|
||||
if err != nil {
|
||||
results = append(results, err)
|
||||
}
|
||||
}
|
||||
|
||||
if this.UDP != nil {
|
||||
err := this.UDP.Init()
|
||||
if err != nil {
|
||||
@@ -295,9 +287,6 @@ func (this *ServerConfig) FullAddresses() []string {
|
||||
if this.TLS != nil && this.TLS.IsOn {
|
||||
result = append(result, this.TLS.FullAddresses()...)
|
||||
}
|
||||
if this.Unix != nil && this.Unix.IsOn {
|
||||
result = append(result, this.Unix.FullAddresses()...)
|
||||
}
|
||||
if this.UDP != nil && this.UDP.IsOn {
|
||||
result = append(result, this.UDP.FullAddresses()...)
|
||||
}
|
||||
@@ -319,9 +308,6 @@ func (this *ServerConfig) Listen() []*NetworkAddressConfig {
|
||||
if this.TLS != nil {
|
||||
result = append(result, this.TLS.Listen...)
|
||||
}
|
||||
if this.Unix != nil {
|
||||
result = append(result, this.Unix.Listen...)
|
||||
}
|
||||
if this.UDP != nil {
|
||||
result = append(result, this.UDP.Listen...)
|
||||
}
|
||||
@@ -340,10 +326,6 @@ func (this *ServerConfig) IsTCPFamily() bool {
|
||||
return this.TCP != nil || this.TLS != nil
|
||||
}
|
||||
|
||||
func (this *ServerConfig) IsUnixFamily() bool {
|
||||
return this.Unix != nil
|
||||
}
|
||||
|
||||
func (this *ServerConfig) IsUDPFamily() bool {
|
||||
return this.UDP != nil
|
||||
}
|
||||
|
||||
@@ -22,16 +22,6 @@ func TestServerConfig_Protocols(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}}
|
||||
server.HTTPS = &HTTPSProtocolConfig{BaseProtocol: BaseProtocol{
|
||||
IsOn: true,
|
||||
Listen: []*NetworkAddressConfig{
|
||||
{
|
||||
Protocol: ProtocolUnix,
|
||||
Host: "/hello.sock",
|
||||
PortRange: "1235",
|
||||
},
|
||||
},
|
||||
}}
|
||||
server.TCP = &TCPProtocolConfig{BaseProtocol: BaseProtocol{
|
||||
IsOn: true,
|
||||
Listen: []*NetworkAddressConfig{
|
||||
@@ -50,15 +40,6 @@ func TestServerConfig_Protocols(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}}
|
||||
server.Unix = &UnixProtocolConfig{BaseProtocol: BaseProtocol{
|
||||
IsOn: true,
|
||||
Listen: []*NetworkAddressConfig{
|
||||
{
|
||||
Protocol: ProtocolTLS,
|
||||
PortRange: "1234",
|
||||
},
|
||||
},
|
||||
}}
|
||||
server.UDP = &UDPProtocolConfig{BaseProtocol: BaseProtocol{
|
||||
IsOn: true,
|
||||
Listen: []*NetworkAddressConfig{
|
||||
|
||||
Reference in New Issue
Block a user