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/proxyman/command/command.proto
|
||||
|
||||
|
@ -806,7 +806,7 @@ func file_app_proxyman_command_command_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_app_proxyman_command_command_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
||||
var file_app_proxyman_command_command_proto_goTypes = []interface{}{
|
||||
var file_app_proxyman_command_command_proto_goTypes = []any{
|
||||
(*AddUserOperation)(nil), // 0: xray.app.proxyman.command.AddUserOperation
|
||||
(*RemoveUserOperation)(nil), // 1: xray.app.proxyman.command.RemoveUserOperation
|
||||
(*AddInboundRequest)(nil), // 2: xray.app.proxyman.command.AddInboundRequest
|
||||
|
@ -858,7 +858,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_app_proxyman_command_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddUserOperation); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -870,7 +870,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RemoveUserOperation); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -882,7 +882,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddInboundRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -894,7 +894,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddInboundResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -906,7 +906,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RemoveInboundRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -918,7 +918,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RemoveInboundResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -930,7 +930,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AlterInboundRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -942,7 +942,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AlterInboundResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -954,7 +954,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddOutboundRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -966,7 +966,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[9].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AddOutboundResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -978,7 +978,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[10].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RemoveOutboundRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -990,7 +990,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[11].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RemoveOutboundResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1002,7 +1002,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[12].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AlterOutboundRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1014,7 +1014,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[13].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AlterOutboundResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1026,7 +1026,7 @@ func file_app_proxyman_command_command_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_command_command_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_command_command_proto_msgTypes[14].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/proxyman/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 (
|
||||
HandlerService_AddInbound_FullMethodName = "/xray.app.proxyman.command.HandlerService/AddInbound"
|
||||
|
@ -48,8 +48,9 @@ func NewHandlerServiceClient(cc grpc.ClientConnInterface) HandlerServiceClient {
|
|||
}
|
||||
|
||||
func (c *handlerServiceClient) AddInbound(ctx context.Context, in *AddInboundRequest, opts ...grpc.CallOption) (*AddInboundResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AddInboundResponse)
|
||||
err := c.cc.Invoke(ctx, HandlerService_AddInbound_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, HandlerService_AddInbound_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -57,8 +58,9 @@ func (c *handlerServiceClient) AddInbound(ctx context.Context, in *AddInboundReq
|
|||
}
|
||||
|
||||
func (c *handlerServiceClient) RemoveInbound(ctx context.Context, in *RemoveInboundRequest, opts ...grpc.CallOption) (*RemoveInboundResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RemoveInboundResponse)
|
||||
err := c.cc.Invoke(ctx, HandlerService_RemoveInbound_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, HandlerService_RemoveInbound_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -66,8 +68,9 @@ func (c *handlerServiceClient) RemoveInbound(ctx context.Context, in *RemoveInbo
|
|||
}
|
||||
|
||||
func (c *handlerServiceClient) AlterInbound(ctx context.Context, in *AlterInboundRequest, opts ...grpc.CallOption) (*AlterInboundResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AlterInboundResponse)
|
||||
err := c.cc.Invoke(ctx, HandlerService_AlterInbound_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, HandlerService_AlterInbound_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -75,8 +78,9 @@ func (c *handlerServiceClient) AlterInbound(ctx context.Context, in *AlterInboun
|
|||
}
|
||||
|
||||
func (c *handlerServiceClient) AddOutbound(ctx context.Context, in *AddOutboundRequest, opts ...grpc.CallOption) (*AddOutboundResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AddOutboundResponse)
|
||||
err := c.cc.Invoke(ctx, HandlerService_AddOutbound_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, HandlerService_AddOutbound_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -84,8 +88,9 @@ func (c *handlerServiceClient) AddOutbound(ctx context.Context, in *AddOutboundR
|
|||
}
|
||||
|
||||
func (c *handlerServiceClient) RemoveOutbound(ctx context.Context, in *RemoveOutboundRequest, opts ...grpc.CallOption) (*RemoveOutboundResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RemoveOutboundResponse)
|
||||
err := c.cc.Invoke(ctx, HandlerService_RemoveOutbound_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, HandlerService_RemoveOutbound_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -93,8 +98,9 @@ func (c *handlerServiceClient) RemoveOutbound(ctx context.Context, in *RemoveOut
|
|||
}
|
||||
|
||||
func (c *handlerServiceClient) AlterOutbound(ctx context.Context, in *AlterOutboundRequest, opts ...grpc.CallOption) (*AlterOutboundResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AlterOutboundResponse)
|
||||
err := c.cc.Invoke(ctx, HandlerService_AlterOutbound_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, HandlerService_AlterOutbound_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -103,7 +109,7 @@ func (c *handlerServiceClient) AlterOutbound(ctx context.Context, in *AlterOutbo
|
|||
|
||||
// HandlerServiceServer is the server API for HandlerService service.
|
||||
// All implementations must embed UnimplementedHandlerServiceServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
type HandlerServiceServer interface {
|
||||
AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error)
|
||||
RemoveInbound(context.Context, *RemoveInboundRequest) (*RemoveInboundResponse, error)
|
||||
|
@ -114,9 +120,12 @@ type HandlerServiceServer interface {
|
|||
mustEmbedUnimplementedHandlerServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedHandlerServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedHandlerServiceServer struct {
|
||||
}
|
||||
// UnimplementedHandlerServiceServer 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 UnimplementedHandlerServiceServer struct{}
|
||||
|
||||
func (UnimplementedHandlerServiceServer) AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddInbound not implemented")
|
||||
|
@ -137,6 +146,7 @@ func (UnimplementedHandlerServiceServer) AlterOutbound(context.Context, *AlterOu
|
|||
return nil, status.Errorf(codes.Unimplemented, "method AlterOutbound not implemented")
|
||||
}
|
||||
func (UnimplementedHandlerServiceServer) mustEmbedUnimplementedHandlerServiceServer() {}
|
||||
func (UnimplementedHandlerServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeHandlerServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to HandlerServiceServer will
|
||||
|
@ -146,6 +156,13 @@ type UnsafeHandlerServiceServer interface {
|
|||
}
|
||||
|
||||
func RegisterHandlerServiceServer(s grpc.ServiceRegistrar, srv HandlerServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedHandlerServiceServer 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(&HandlerService_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/proxyman/config.proto
|
||||
|
||||
|
@ -920,7 +920,7 @@ func file_app_proxyman_config_proto_rawDescGZIP() []byte {
|
|||
|
||||
var file_app_proxyman_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_app_proxyman_config_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_app_proxyman_config_proto_goTypes = []interface{}{
|
||||
var file_app_proxyman_config_proto_goTypes = []any{
|
||||
(KnownProtocols)(0), // 0: xray.app.proxyman.KnownProtocols
|
||||
(AllocationStrategy_Type)(0), // 1: xray.app.proxyman.AllocationStrategy.Type
|
||||
(*InboundConfig)(nil), // 2: xray.app.proxyman.InboundConfig
|
||||
|
@ -968,7 +968,7 @@ func file_app_proxyman_config_proto_init() {
|
|||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_app_proxyman_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_config_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*InboundConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -980,7 +980,7 @@ func file_app_proxyman_config_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_config_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AllocationStrategy); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -992,7 +992,7 @@ func file_app_proxyman_config_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_config_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*SniffingConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1004,7 +1004,7 @@ func file_app_proxyman_config_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_config_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ReceiverConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1016,7 +1016,7 @@ func file_app_proxyman_config_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_config_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*InboundHandlerConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1028,7 +1028,7 @@ func file_app_proxyman_config_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_config_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*OutboundConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1040,7 +1040,7 @@ func file_app_proxyman_config_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_config_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*SenderConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1052,7 +1052,7 @@ func file_app_proxyman_config_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_config_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*MultiplexingConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1064,7 +1064,7 @@ func file_app_proxyman_config_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_config_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AllocationStrategy_AllocationStrategyConcurrency); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1076,7 +1076,7 @@ func file_app_proxyman_config_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_app_proxyman_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_app_proxyman_config_proto_msgTypes[9].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AllocationStrategy_AllocationStrategyRefresh); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue