diff --git a/app/log/command/command.go b/app/log/command/command.go index 834b320c..ef7223f3 100644 --- a/app/log/command/command.go +++ b/app/log/command/command.go @@ -44,7 +44,7 @@ func (s *service) Register(server *grpc.Server) { RegisterLoggerServiceServer(server, ls) // For compatibility purposes - vCoreDesc := _LoggerService_serviceDesc + vCoreDesc := LoggerService_ServiceDesc vCoreDesc.ServiceName = "v2ray.core.app.log.command.LoggerService" server.RegisterService(&vCoreDesc, ls) } diff --git a/app/log/command/config_grpc.pb.go b/app/log/command/config_grpc.pb.go index 464e950e..8c301979 100644 --- a/app/log/command/config_grpc.pb.go +++ b/app/log/command/config_grpc.pb.go @@ -11,6 +11,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // LoggerServiceClient is the client API for LoggerService service. @@ -62,7 +63,7 @@ type UnsafeLoggerServiceServer interface { } func RegisterLoggerServiceServer(s grpc.ServiceRegistrar, srv LoggerServiceServer) { - s.RegisterService(&_LoggerService_serviceDesc, srv) + s.RegisterService(&LoggerService_ServiceDesc, srv) } func _LoggerService_RestartLogger_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -83,7 +84,10 @@ func _LoggerService_RestartLogger_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -var _LoggerService_serviceDesc = grpc.ServiceDesc{ +// LoggerService_ServiceDesc is the grpc.ServiceDesc for LoggerService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var LoggerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "xray.app.log.command.LoggerService", HandlerType: (*LoggerServiceServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/app/proxyman/command/command.go b/app/proxyman/command/command.go index 16246be9..5f2ec2ae 100644 --- a/app/proxyman/command/command.go +++ b/app/proxyman/command/command.go @@ -140,7 +140,7 @@ func (s *service) Register(server *grpc.Server) { RegisterHandlerServiceServer(server, hs) // For compatibility purposes - vCoreDesc := _HandlerService_serviceDesc + vCoreDesc := HandlerService_ServiceDesc vCoreDesc.ServiceName = "v2ray.core.app.proxyman.command.HandlerService" server.RegisterService(&vCoreDesc, hs) } diff --git a/app/proxyman/command/command_grpc.pb.go b/app/proxyman/command/command_grpc.pb.go index 41fb3e43..c3b854c3 100644 --- a/app/proxyman/command/command_grpc.pb.go +++ b/app/proxyman/command/command_grpc.pb.go @@ -11,6 +11,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // HandlerServiceClient is the client API for HandlerService service. @@ -132,7 +133,7 @@ type UnsafeHandlerServiceServer interface { } func RegisterHandlerServiceServer(s grpc.ServiceRegistrar, srv HandlerServiceServer) { - s.RegisterService(&_HandlerService_serviceDesc, srv) + s.RegisterService(&HandlerService_ServiceDesc, srv) } func _HandlerService_AddInbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -243,7 +244,10 @@ func _HandlerService_AlterOutbound_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -var _HandlerService_serviceDesc = grpc.ServiceDesc{ +// HandlerService_ServiceDesc is the grpc.ServiceDesc for HandlerService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HandlerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "xray.app.proxyman.command.HandlerService", HandlerType: (*HandlerServiceServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/app/router/command/command.go b/app/router/command/command.go index 8bbecc80..fff78cb7 100644 --- a/app/router/command/command.go +++ b/app/router/command/command.go @@ -85,7 +85,7 @@ func (s *service) Register(server *grpc.Server) { RegisterRoutingServiceServer(server, rs) // For compatibility purposes - vCoreDesc := _RoutingService_serviceDesc + vCoreDesc := RoutingService_ServiceDesc vCoreDesc.ServiceName = "v2ray.core.app.router.command.RoutingService" server.RegisterService(&vCoreDesc, rs) })) diff --git a/app/router/command/command_grpc.pb.go b/app/router/command/command_grpc.pb.go index 796212dd..663442b8 100644 --- a/app/router/command/command_grpc.pb.go +++ b/app/router/command/command_grpc.pb.go @@ -11,6 +11,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // RoutingServiceClient is the client API for RoutingService service. @@ -30,7 +31,7 @@ func NewRoutingServiceClient(cc grpc.ClientConnInterface) RoutingServiceClient { } func (c *routingServiceClient) SubscribeRoutingStats(ctx context.Context, in *SubscribeRoutingStatsRequest, opts ...grpc.CallOption) (RoutingService_SubscribeRoutingStatsClient, error) { - stream, err := c.cc.NewStream(ctx, &_RoutingService_serviceDesc.Streams[0], "/xray.app.router.command.RoutingService/SubscribeRoutingStats", opts...) + stream, err := c.cc.NewStream(ctx, &RoutingService_ServiceDesc.Streams[0], "/xray.app.router.command.RoutingService/SubscribeRoutingStats", opts...) if err != nil { return nil, err } @@ -99,7 +100,7 @@ type UnsafeRoutingServiceServer interface { } func RegisterRoutingServiceServer(s grpc.ServiceRegistrar, srv RoutingServiceServer) { - s.RegisterService(&_RoutingService_serviceDesc, srv) + s.RegisterService(&RoutingService_ServiceDesc, srv) } func _RoutingService_SubscribeRoutingStats_Handler(srv interface{}, stream grpc.ServerStream) error { @@ -141,7 +142,10 @@ func _RoutingService_TestRoute_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -var _RoutingService_serviceDesc = grpc.ServiceDesc{ +// RoutingService_ServiceDesc is the grpc.ServiceDesc for RoutingService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RoutingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "xray.app.router.command.RoutingService", HandlerType: (*RoutingServiceServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/app/stats/command/command.go b/app/stats/command/command.go index 77ac8d6f..3c9f5424 100644 --- a/app/stats/command/command.go +++ b/app/stats/command/command.go @@ -113,7 +113,7 @@ func (s *service) Register(server *grpc.Server) { RegisterStatsServiceServer(server, ss) // For compatibility purposes - vCoreDesc := _StatsService_serviceDesc + vCoreDesc := StatsService_ServiceDesc vCoreDesc.ServiceName = "v2ray.core.app.stats.command.StatsService" server.RegisterService(&vCoreDesc, ss) } diff --git a/app/stats/command/command_grpc.pb.go b/app/stats/command/command_grpc.pb.go index 149ee996..8ba3ac61 100644 --- a/app/stats/command/command_grpc.pb.go +++ b/app/stats/command/command_grpc.pb.go @@ -11,6 +11,7 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // StatsServiceClient is the client API for StatsService service. @@ -90,7 +91,7 @@ type UnsafeStatsServiceServer interface { } func RegisterStatsServiceServer(s grpc.ServiceRegistrar, srv StatsServiceServer) { - s.RegisterService(&_StatsService_serviceDesc, srv) + s.RegisterService(&StatsService_ServiceDesc, srv) } func _StatsService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -147,7 +148,10 @@ func _StatsService_GetSysStats_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -var _StatsService_serviceDesc = grpc.ServiceDesc{ +// StatsService_ServiceDesc is the grpc.ServiceDesc for StatsService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var StatsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "xray.app.stats.command.StatsService", HandlerType: (*StatsServiceServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/proxy/vless/encoding/addons.pb.go b/proxy/vless/encoding/addons.pb.go index 97c90521..adc3be99 100644 --- a/proxy/vless/encoding/addons.pb.go +++ b/proxy/vless/encoding/addons.pb.go @@ -278,10 +278,7 @@ func (m *Addons) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthAddons - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthAddons } if (iNdEx + skippy) > l {