chg: HiddifyOptions
This commit is contained in:
@@ -1212,16 +1212,16 @@ func (x *ParseResponse) GetMessage() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type ChangeConfigOptionsRequest struct {
|
||||
type ChangeHiddifyOptionsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ConfigOptionsJson string `protobuf:"bytes,1,opt,name=config_options_json,json=configOptionsJson,proto3" json:"config_options_json,omitempty"`
|
||||
HiddifyOptionsJson string `protobuf:"bytes,1,opt,name=config_options_json,json=HiddifyOptionsJson,proto3" json:"config_options_json,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ChangeConfigOptionsRequest) Reset() {
|
||||
*x = ChangeConfigOptionsRequest{}
|
||||
func (x *ChangeHiddifyOptionsRequest) Reset() {
|
||||
*x = ChangeHiddifyOptionsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_hiddify_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -1229,13 +1229,13 @@ func (x *ChangeConfigOptionsRequest) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ChangeConfigOptionsRequest) String() string {
|
||||
func (x *ChangeHiddifyOptionsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ChangeConfigOptionsRequest) ProtoMessage() {}
|
||||
func (*ChangeHiddifyOptionsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ChangeConfigOptionsRequest) ProtoReflect() protoreflect.Message {
|
||||
func (x *ChangeHiddifyOptionsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_hiddify_proto_msgTypes[14]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -1247,14 +1247,14 @@ func (x *ChangeConfigOptionsRequest) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChangeConfigOptionsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ChangeConfigOptionsRequest) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use ChangeHiddifyOptionsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ChangeHiddifyOptionsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_hiddify_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *ChangeConfigOptionsRequest) GetConfigOptionsJson() string {
|
||||
func (x *ChangeHiddifyOptionsRequest) GetHiddifyOptionsJson() string {
|
||||
if x != nil {
|
||||
return x.ConfigOptionsJson
|
||||
return x.HiddifyOptionsJson
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -2176,7 +2176,7 @@ var file_hiddify_proto_goTypes = []any{
|
||||
(*SystemProxyStatus)(nil), // 15: hiddifyrpc.SystemProxyStatus
|
||||
(*ParseRequest)(nil), // 16: hiddifyrpc.ParseRequest
|
||||
(*ParseResponse)(nil), // 17: hiddifyrpc.ParseResponse
|
||||
(*ChangeConfigOptionsRequest)(nil), // 18: hiddifyrpc.ChangeConfigOptionsRequest
|
||||
(*ChangeHiddifyOptionsRequest)(nil), // 18: hiddifyrpc.ChangeHiddifyOptionsRequest
|
||||
(*GenerateConfigRequest)(nil), // 19: hiddifyrpc.GenerateConfigRequest
|
||||
(*GenerateConfigResponse)(nil), // 20: hiddifyrpc.GenerateConfigResponse
|
||||
(*SelectOutboundRequest)(nil), // 21: hiddifyrpc.SelectOutboundRequest
|
||||
@@ -2212,7 +2212,7 @@ var file_hiddify_proto_depIdxs = []int32{
|
||||
26, // 16: hiddifyrpc.Core.GetSystemInfo:input_type -> hiddifyrpc.StopRequest
|
||||
6, // 17: hiddifyrpc.Core.Setup:input_type -> hiddifyrpc.SetupRequest
|
||||
16, // 18: hiddifyrpc.Core.Parse:input_type -> hiddifyrpc.ParseRequest
|
||||
18, // 19: hiddifyrpc.Core.ChangeConfigOptions:input_type -> hiddifyrpc.ChangeConfigOptionsRequest
|
||||
18, // 19: hiddifyrpc.Core.ChangeHiddifyOptions:input_type -> hiddifyrpc.ChangeHiddifyOptionsRequest
|
||||
5, // 20: hiddifyrpc.Core.StartService:input_type -> hiddifyrpc.StartRequest
|
||||
31, // 21: hiddifyrpc.Core.Stop:input_type -> hiddifyrpc.Empty
|
||||
5, // 22: hiddifyrpc.Core.Restart:input_type -> hiddifyrpc.StartRequest
|
||||
@@ -2235,7 +2235,7 @@ var file_hiddify_proto_depIdxs = []int32{
|
||||
8, // 39: hiddifyrpc.Core.GetSystemInfo:output_type -> hiddifyrpc.SystemInfo
|
||||
7, // 40: hiddifyrpc.Core.Setup:output_type -> hiddifyrpc.Response
|
||||
17, // 41: hiddifyrpc.Core.Parse:output_type -> hiddifyrpc.ParseResponse
|
||||
4, // 42: hiddifyrpc.Core.ChangeConfigOptions:output_type -> hiddifyrpc.CoreInfoResponse
|
||||
4, // 42: hiddifyrpc.Core.ChangeHiddifyOptions:output_type -> hiddifyrpc.CoreInfoResponse
|
||||
4, // 43: hiddifyrpc.Core.StartService:output_type -> hiddifyrpc.CoreInfoResponse
|
||||
4, // 44: hiddifyrpc.Core.Stop:output_type -> hiddifyrpc.CoreInfoResponse
|
||||
4, // 45: hiddifyrpc.Core.Restart:output_type -> hiddifyrpc.CoreInfoResponse
|
||||
@@ -2432,7 +2432,7 @@ func file_hiddify_proto_init() {
|
||||
}
|
||||
}
|
||||
file_hiddify_proto_msgTypes[14].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ChangeConfigOptionsRequest); i {
|
||||
switch v := v.(*ChangeHiddifyOptionsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
||||
@@ -161,7 +161,7 @@ const (
|
||||
Core_GetSystemInfo_FullMethodName = "/hiddifyrpc.Core/GetSystemInfo"
|
||||
Core_Setup_FullMethodName = "/hiddifyrpc.Core/Setup"
|
||||
Core_Parse_FullMethodName = "/hiddifyrpc.Core/Parse"
|
||||
Core_ChangeConfigOptions_FullMethodName = "/hiddifyrpc.Core/ChangeConfigOptions"
|
||||
Core_ChangeHiddifyOptions_FullMethodName = "/hiddifyrpc.Core/ChangeHiddifyOptions"
|
||||
Core_StartService_FullMethodName = "/hiddifyrpc.Core/StartService"
|
||||
Core_Stop_FullMethodName = "/hiddifyrpc.Core/Stop"
|
||||
Core_Restart_FullMethodName = "/hiddifyrpc.Core/Restart"
|
||||
@@ -184,7 +184,7 @@ type CoreClient interface {
|
||||
GetSystemInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StopRequest, SystemInfo], error)
|
||||
Setup(ctx context.Context, in *SetupRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
Parse(ctx context.Context, in *ParseRequest, opts ...grpc.CallOption) (*ParseResponse, error)
|
||||
ChangeConfigOptions(ctx context.Context, in *ChangeConfigOptionsRequest, opts ...grpc.CallOption) (*CoreInfoResponse, error)
|
||||
ChangeHiddifyOptions(ctx context.Context, in *ChangeHiddifyOptionsRequest, opts ...grpc.CallOption) (*CoreInfoResponse, error)
|
||||
//rpc GenerateConfig (GenerateConfigRequest) returns (GenerateConfigResponse);
|
||||
StartService(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*CoreInfoResponse, error)
|
||||
Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CoreInfoResponse, error)
|
||||
@@ -287,10 +287,10 @@ func (c *coreClient) Parse(ctx context.Context, in *ParseRequest, opts ...grpc.C
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *coreClient) ChangeConfigOptions(ctx context.Context, in *ChangeConfigOptionsRequest, opts ...grpc.CallOption) (*CoreInfoResponse, error) {
|
||||
func (c *coreClient) ChangeHiddifyOptions(ctx context.Context, in *ChangeHiddifyOptionsRequest, opts ...grpc.CallOption) (*CoreInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CoreInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Core_ChangeConfigOptions_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, Core_ChangeHiddifyOptions_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -401,7 +401,7 @@ type CoreServer interface {
|
||||
GetSystemInfo(grpc.BidiStreamingServer[StopRequest, SystemInfo]) error
|
||||
Setup(context.Context, *SetupRequest) (*Response, error)
|
||||
Parse(context.Context, *ParseRequest) (*ParseResponse, error)
|
||||
ChangeConfigOptions(context.Context, *ChangeConfigOptionsRequest) (*CoreInfoResponse, error)
|
||||
ChangeHiddifyOptions(context.Context, *ChangeHiddifyOptionsRequest) (*CoreInfoResponse, error)
|
||||
//rpc GenerateConfig (GenerateConfigRequest) returns (GenerateConfigResponse);
|
||||
StartService(context.Context, *StartRequest) (*CoreInfoResponse, error)
|
||||
Stop(context.Context, *Empty) (*CoreInfoResponse, error)
|
||||
@@ -443,8 +443,8 @@ func (UnimplementedCoreServer) Setup(context.Context, *SetupRequest) (*Response,
|
||||
func (UnimplementedCoreServer) Parse(context.Context, *ParseRequest) (*ParseResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Parse not implemented")
|
||||
}
|
||||
func (UnimplementedCoreServer) ChangeConfigOptions(context.Context, *ChangeConfigOptionsRequest) (*CoreInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ChangeConfigOptions not implemented")
|
||||
func (UnimplementedCoreServer) ChangeHiddifyOptions(context.Context, *ChangeHiddifyOptionsRequest) (*CoreInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ChangeHiddifyOptions not implemented")
|
||||
}
|
||||
func (UnimplementedCoreServer) StartService(context.Context, *StartRequest) (*CoreInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method StartService not implemented")
|
||||
@@ -576,20 +576,20 @@ func _Core_Parse_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Core_ChangeConfigOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ChangeConfigOptionsRequest)
|
||||
func _Core_ChangeHiddifyOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ChangeHiddifyOptionsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CoreServer).ChangeConfigOptions(ctx, in)
|
||||
return srv.(CoreServer).ChangeHiddifyOptions(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Core_ChangeConfigOptions_FullMethodName,
|
||||
FullMethod: Core_ChangeHiddifyOptions_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CoreServer).ChangeConfigOptions(ctx, req.(*ChangeConfigOptionsRequest))
|
||||
return srv.(CoreServer).ChangeHiddifyOptions(ctx, req.(*ChangeHiddifyOptionsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -765,8 +765,8 @@ var Core_ServiceDesc = grpc.ServiceDesc{
|
||||
Handler: _Core_Parse_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ChangeConfigOptions",
|
||||
Handler: _Core_ChangeConfigOptions_Handler,
|
||||
MethodName: "ChangeHiddifyOptions",
|
||||
Handler: _Core_ChangeHiddifyOptions_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "StartService",
|
||||
|
||||
Reference in New Issue
Block a user