mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Pin protobuf packages (#3715)
* Pin protobuf packages It happened in the past that I ran with the wrong protobuf version installed locally, and apparently there is even still some file wrong in splithttp. Fix this issue once and for all. * bump protobuf packages * Revert "bump protobuf packages" This reverts commit7a3509346a
. * Revert "Revert "bump protobuf packages"" This reverts commitbb79707d15
. * fix deprecated grpc usage
This commit is contained in:
parent
790f908f0b
commit
2be03c56cb
77 changed files with 544 additions and 559 deletions
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc-gen-go v1.34.2
|
||||
// protoc v5.27.0
|
||||
// source: app/stats/command/command.proto
|
||||
|
||||
|
@ -565,7 +565,7 @@ func file_app_stats_command_command_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_app_stats_command_command_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_app_stats_command_command_proto_goTypes = []interface{}{
|
||||
var file_app_stats_command_command_proto_goTypes = []any{
|
||||
(*GetStatsRequest)(nil), // 0: xray.app.stats.command.GetStatsRequest
|
||||
(*Stat)(nil), // 1: xray.app.stats.command.Stat
|
||||
(*GetStatsResponse)(nil), // 2: xray.app.stats.command.GetStatsResponse
|
||||
|
@ -597,7 +597,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_app_stats_command_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_stats_command_command_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetStatsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -609,7 +609,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_stats_command_command_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Stat); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -621,7 +621,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_stats_command_command_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GetStatsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -633,7 +633,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_stats_command_command_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*QueryStatsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -645,7 +645,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_stats_command_command_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*QueryStatsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -657,7 +657,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_stats_command_command_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*SysStatsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -669,7 +669,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_stats_command_command_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*SysStatsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -681,7 +681,7 @@ func file_app_stats_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_command_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_stats_command_command_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Config); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.27.0
|
||||
// source: app/stats/command/command.proto
|
||||
|
||||
|
@ -15,8 +15,8 @@ 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
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
StatsService_GetStats_FullMethodName = "/xray.app.stats.command.StatsService/GetStats"
|
||||
|
@ -42,8 +42,9 @@ func NewStatsServiceClient(cc grpc.ClientConnInterface) StatsServiceClient {
|
|||
}
|
||||
|
||||
func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetStatsResponse)
|
||||
err := c.cc.Invoke(ctx, StatsService_GetStats_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, StatsService_GetStats_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -51,8 +52,9 @@ func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest,
|
|||
}
|
||||
|
||||
func (c *statsServiceClient) QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryStatsResponse)
|
||||
err := c.cc.Invoke(ctx, StatsService_QueryStats_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, StatsService_QueryStats_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -60,8 +62,9 @@ func (c *statsServiceClient) QueryStats(ctx context.Context, in *QueryStatsReque
|
|||
}
|
||||
|
||||
func (c *statsServiceClient) GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SysStatsResponse)
|
||||
err := c.cc.Invoke(ctx, StatsService_GetSysStats_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, StatsService_GetSysStats_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -70,7 +73,7 @@ func (c *statsServiceClient) GetSysStats(ctx context.Context, in *SysStatsReques
|
|||
|
||||
// StatsServiceServer is the server API for StatsService service.
|
||||
// All implementations must embed UnimplementedStatsServiceServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
type StatsServiceServer interface {
|
||||
GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
|
||||
QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error)
|
||||
|
@ -78,9 +81,12 @@ type StatsServiceServer interface {
|
|||
mustEmbedUnimplementedStatsServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedStatsServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedStatsServiceServer struct {
|
||||
}
|
||||
// UnimplementedStatsServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedStatsServiceServer struct{}
|
||||
|
||||
func (UnimplementedStatsServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
|
||||
|
@ -92,6 +98,7 @@ func (UnimplementedStatsServiceServer) GetSysStats(context.Context, *SysStatsReq
|
|||
return nil, status.Errorf(codes.Unimplemented, "method GetSysStats not implemented")
|
||||
}
|
||||
func (UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer() {}
|
||||
func (UnimplementedStatsServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeStatsServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to StatsServiceServer will
|
||||
|
@ -101,6 +108,13 @@ type UnsafeStatsServiceServer interface {
|
|||
}
|
||||
|
||||
func RegisterStatsServiceServer(s grpc.ServiceRegistrar, srv StatsServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedStatsServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&StatsService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc-gen-go v1.34.2
|
||||
// protoc v5.27.0
|
||||
// source: app/stats/config.proto
|
||||
|
||||
|
@ -155,7 +155,7 @@ func file_app_stats_config_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_app_stats_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_app_stats_config_proto_goTypes = []interface{}{
|
||||
var file_app_stats_config_proto_goTypes = []any{
|
||||
(*Config)(nil), // 0: xray.app.stats.Config
|
||||
(*ChannelConfig)(nil), // 1: xray.app.stats.ChannelConfig
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ func file_app_stats_config_proto_init() {
|
|||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_app_stats_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_stats_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Config); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -185,7 +185,7 @@ func file_app_stats_config_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_stats_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_stats_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ChannelConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue