From 2be03c56cb57268e48d9c59b90c2e711a20b16a6 Mon Sep 17 00:00:00 2001 From: mmmray <142015632+mmmray@users.noreply.github.com> Date: Thu, 22 Aug 2024 16:18:36 +0200 Subject: [PATCH] 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 commit 7a3509346a0e29721bb2ddf7857addd622b5674c. * Revert "Revert "bump protobuf packages"" This reverts commit bb79707d15ca79527fba789276874844605d1d81. * fix deprecated grpc usage --- app/commander/config.pb.go | 8 +- app/dispatcher/config.pb.go | 8 +- app/dns/config.pb.go | 14 +- app/dns/fakedns/fakedns.pb.go | 8 +- app/log/command/config.pb.go | 10 +- app/log/command/config_grpc.pb.go | 28 +++- app/log/config.pb.go | 6 +- app/metrics/config.pb.go | 6 +- app/observatory/burst/config.pb.go | 8 +- app/observatory/command/command.pb.go | 10 +- app/observatory/command/command_grpc.pb.go | 28 +++- app/observatory/config.pb.go | 16 +- app/policy/config.pb.go | 20 +-- app/proxyman/command/command.pb.go | 34 ++-- app/proxyman/command/command_grpc.pb.go | 43 +++-- app/proxyman/config.pb.go | 24 +-- app/reverse/config.pb.go | 12 +- app/router/command/command.pb.go | 34 ++-- app/router/command/command_grpc.pb.go | 87 +++++------ app/router/config.pb.go | 32 ++-- app/stats/command/command.pb.go | 20 +-- app/stats/command/command_grpc.pb.go | 34 ++-- app/stats/config.pb.go | 8 +- common/log/log.pb.go | 4 +- common/net/address.pb.go | 8 +- common/net/destination.pb.go | 6 +- common/net/network.pb.go | 6 +- common/net/port.pb.go | 8 +- common/protocol/headers.pb.go | 6 +- common/protocol/server_spec.pb.go | 6 +- common/protocol/user.pb.go | 6 +- common/serial/typed_message.pb.go | 6 +- core/config.pb.go | 10 +- core/proto.go | 4 +- proxy/blackhole/config.pb.go | 10 +- proxy/dns/config.pb.go | 6 +- proxy/dokodemo/config.pb.go | 6 +- proxy/freedom/config.pb.go | 10 +- proxy/http/config.pb.go | 12 +- proxy/loopback/config.pb.go | 6 +- proxy/shadowsocks/config.pb.go | 10 +- proxy/shadowsocks_2022/config.pb.go | 16 +- proxy/socks/config.pb.go | 10 +- proxy/trojan/config.pb.go | 12 +- proxy/vless/account.pb.go | 6 +- proxy/vless/encoding/addons.pb.go | 6 +- proxy/vless/inbound/config.pb.go | 8 +- proxy/vless/outbound/config.pb.go | 6 +- proxy/vmess/account.pb.go | 6 +- proxy/vmess/inbound/config.pb.go | 10 +- proxy/vmess/outbound/config.pb.go | 6 +- proxy/wireguard/config.pb.go | 8 +- transport/global/config.pb.go | 6 +- transport/internet/config.pb.go | 14 +- transport/internet/domainsocket/config.pb.go | 6 +- transport/internet/grpc/config.pb.go | 6 +- .../grpc/encoding/customSeviceName.go | 4 +- transport/internet/grpc/encoding/stream.pb.go | 8 +- .../internet/grpc/encoding/stream_grpc.pb.go | 147 +++++------------- transport/internet/headers/dns/config.pb.go | 6 +- transport/internet/headers/http/config.pb.go | 18 +-- transport/internet/headers/noop/config.pb.go | 8 +- transport/internet/headers/srtp/config.pb.go | 6 +- transport/internet/headers/tls/config.pb.go | 6 +- transport/internet/headers/utp/config.pb.go | 6 +- .../internet/headers/wechat/config.pb.go | 6 +- .../internet/headers/wireguard/config.pb.go | 6 +- transport/internet/http/config.pb.go | 6 +- transport/internet/httpupgrade/config.pb.go | 6 +- transport/internet/kcp/config.pb.go | 22 +-- transport/internet/quic/config.pb.go | 6 +- transport/internet/reality/config.pb.go | 6 +- transport/internet/splithttp/config.pb.go | 56 +++---- transport/internet/tcp/config.pb.go | 6 +- transport/internet/tls/config.pb.go | 8 +- transport/internet/udp/config.pb.go | 6 +- transport/internet/websocket/config.pb.go | 6 +- 77 files changed, 544 insertions(+), 559 deletions(-) diff --git a/app/commander/config.pb.go b/app/commander/config.pb.go index 7601b74c..1fb145c8 100644 --- a/app/commander/config.pb.go +++ b/app/commander/config.pb.go @@ -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/commander/config.proto @@ -166,7 +166,7 @@ func file_app_commander_config_proto_rawDescGZIP() []byte { } var file_app_commander_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_app_commander_config_proto_goTypes = []interface{}{ +var file_app_commander_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.app.commander.Config (*ReflectionConfig)(nil), // 1: xray.app.commander.ReflectionConfig (*serial.TypedMessage)(nil), // 2: xray.common.serial.TypedMessage @@ -186,7 +186,7 @@ func file_app_commander_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_commander_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_commander_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state @@ -198,7 +198,7 @@ func file_app_commander_config_proto_init() { return nil } } - file_app_commander_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_commander_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ReflectionConfig); i { case 0: return &v.state diff --git a/app/dispatcher/config.pb.go b/app/dispatcher/config.pb.go index 13af96ea..9b8adb09 100644 --- a/app/dispatcher/config.pb.go +++ b/app/dispatcher/config.pb.go @@ -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/dispatcher/config.proto @@ -139,7 +139,7 @@ func file_app_dispatcher_config_proto_rawDescGZIP() []byte { } var file_app_dispatcher_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_app_dispatcher_config_proto_goTypes = []interface{}{ +var file_app_dispatcher_config_proto_goTypes = []any{ (*SessionConfig)(nil), // 0: xray.app.dispatcher.SessionConfig (*Config)(nil), // 1: xray.app.dispatcher.Config } @@ -158,7 +158,7 @@ func file_app_dispatcher_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_dispatcher_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_dispatcher_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SessionConfig); i { case 0: return &v.state @@ -170,7 +170,7 @@ func file_app_dispatcher_config_proto_init() { return nil } } - file_app_dispatcher_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_dispatcher_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/app/dns/config.pb.go b/app/dns/config.pb.go index c37190c8..bab4dc1c 100644 --- a/app/dns/config.pb.go +++ b/app/dns/config.pb.go @@ -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/dns/config.proto @@ -658,7 +658,7 @@ func file_app_dns_config_proto_rawDescGZIP() []byte { var file_app_dns_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_app_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_app_dns_config_proto_goTypes = []interface{}{ +var file_app_dns_config_proto_goTypes = []any{ (DomainMatchingType)(0), // 0: xray.app.dns.DomainMatchingType (QueryStrategy)(0), // 1: xray.app.dns.QueryStrategy (*NameServer)(nil), // 2: xray.app.dns.NameServer @@ -698,7 +698,7 @@ func file_app_dns_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_dns_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_dns_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*NameServer); i { case 0: return &v.state @@ -710,7 +710,7 @@ func file_app_dns_config_proto_init() { return nil } } - file_app_dns_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_dns_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state @@ -722,7 +722,7 @@ func file_app_dns_config_proto_init() { return nil } } - file_app_dns_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_dns_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*NameServer_PriorityDomain); i { case 0: return &v.state @@ -734,7 +734,7 @@ func file_app_dns_config_proto_init() { return nil } } - file_app_dns_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_dns_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*NameServer_OriginalRule); i { case 0: return &v.state @@ -746,7 +746,7 @@ func file_app_dns_config_proto_init() { return nil } } - file_app_dns_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_app_dns_config_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Config_HostMapping); i { case 0: return &v.state diff --git a/app/dns/fakedns/fakedns.pb.go b/app/dns/fakedns/fakedns.pb.go index 7e3615f2..a44e77b3 100644 --- a/app/dns/fakedns/fakedns.pb.go +++ b/app/dns/fakedns/fakedns.pb.go @@ -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/dns/fakedns/fakedns.proto @@ -159,7 +159,7 @@ func file_app_dns_fakedns_fakedns_proto_rawDescGZIP() []byte { } var file_app_dns_fakedns_fakedns_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_app_dns_fakedns_fakedns_proto_goTypes = []interface{}{ +var file_app_dns_fakedns_fakedns_proto_goTypes = []any{ (*FakeDnsPool)(nil), // 0: xray.app.dns.fakedns.FakeDnsPool (*FakeDnsPoolMulti)(nil), // 1: xray.app.dns.fakedns.FakeDnsPoolMulti } @@ -178,7 +178,7 @@ func file_app_dns_fakedns_fakedns_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_dns_fakedns_fakedns_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_dns_fakedns_fakedns_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FakeDnsPool); i { case 0: return &v.state @@ -190,7 +190,7 @@ func file_app_dns_fakedns_fakedns_proto_init() { return nil } } - file_app_dns_fakedns_fakedns_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_dns_fakedns_fakedns_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FakeDnsPoolMulti); i { case 0: return &v.state diff --git a/app/log/command/config.pb.go b/app/log/command/config.pb.go index c39f466b..a6fd81cd 100644 --- a/app/log/command/config.pb.go +++ b/app/log/command/config.pb.go @@ -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/log/command/config.proto @@ -174,7 +174,7 @@ func file_app_log_command_config_proto_rawDescGZIP() []byte { } var file_app_log_command_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_app_log_command_config_proto_goTypes = []interface{}{ +var file_app_log_command_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.app.log.command.Config (*RestartLoggerRequest)(nil), // 1: xray.app.log.command.RestartLoggerRequest (*RestartLoggerResponse)(nil), // 2: xray.app.log.command.RestartLoggerResponse @@ -195,7 +195,7 @@ func file_app_log_command_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_log_command_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_log_command_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state @@ -207,7 +207,7 @@ func file_app_log_command_config_proto_init() { return nil } } - file_app_log_command_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_log_command_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*RestartLoggerRequest); i { case 0: return &v.state @@ -219,7 +219,7 @@ func file_app_log_command_config_proto_init() { return nil } } - file_app_log_command_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_log_command_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*RestartLoggerResponse); i { case 0: return &v.state diff --git a/app/log/command/config_grpc.pb.go b/app/log/command/config_grpc.pb.go index 3ad15288..2eb9bb66 100644 --- a/app/log/command/config_grpc.pb.go +++ b/app/log/command/config_grpc.pb.go @@ -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/log/command/config.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 ( LoggerService_RestartLogger_FullMethodName = "/xray.app.log.command.LoggerService/RestartLogger" @@ -38,8 +38,9 @@ func NewLoggerServiceClient(cc grpc.ClientConnInterface) LoggerServiceClient { } func (c *loggerServiceClient) RestartLogger(ctx context.Context, in *RestartLoggerRequest, opts ...grpc.CallOption) (*RestartLoggerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RestartLoggerResponse) - err := c.cc.Invoke(ctx, LoggerService_RestartLogger_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, LoggerService_RestartLogger_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -48,20 +49,24 @@ func (c *loggerServiceClient) RestartLogger(ctx context.Context, in *RestartLogg // LoggerServiceServer is the server API for LoggerService service. // All implementations must embed UnimplementedLoggerServiceServer -// for forward compatibility +// for forward compatibility. type LoggerServiceServer interface { RestartLogger(context.Context, *RestartLoggerRequest) (*RestartLoggerResponse, error) mustEmbedUnimplementedLoggerServiceServer() } -// UnimplementedLoggerServiceServer must be embedded to have forward compatible implementations. -type UnimplementedLoggerServiceServer struct { -} +// UnimplementedLoggerServiceServer 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 UnimplementedLoggerServiceServer struct{} func (UnimplementedLoggerServiceServer) RestartLogger(context.Context, *RestartLoggerRequest) (*RestartLoggerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RestartLogger not implemented") } func (UnimplementedLoggerServiceServer) mustEmbedUnimplementedLoggerServiceServer() {} +func (UnimplementedLoggerServiceServer) testEmbeddedByValue() {} // UnsafeLoggerServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to LoggerServiceServer will @@ -71,6 +76,13 @@ type UnsafeLoggerServiceServer interface { } func RegisterLoggerServiceServer(s grpc.ServiceRegistrar, srv LoggerServiceServer) { + // If the following call pancis, it indicates UnimplementedLoggerServiceServer 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(&LoggerService_ServiceDesc, srv) } diff --git a/app/log/config.pb.go b/app/log/config.pb.go index 7dc40d80..eb7abc50 100644 --- a/app/log/config.pb.go +++ b/app/log/config.pb.go @@ -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/log/config.proto @@ -211,7 +211,7 @@ func file_app_log_config_proto_rawDescGZIP() []byte { var file_app_log_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_app_log_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_app_log_config_proto_goTypes = []interface{}{ +var file_app_log_config_proto_goTypes = []any{ (LogType)(0), // 0: xray.app.log.LogType (*Config)(nil), // 1: xray.app.log.Config (log.Severity)(0), // 2: xray.common.log.Severity @@ -233,7 +233,7 @@ func file_app_log_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_log_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_log_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/app/metrics/config.pb.go b/app/metrics/config.pb.go index fd0e6b0a..5544b24f 100644 --- a/app/metrics/config.pb.go +++ b/app/metrics/config.pb.go @@ -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/metrics/config.proto @@ -98,7 +98,7 @@ func file_app_metrics_config_proto_rawDescGZIP() []byte { } var file_app_metrics_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_app_metrics_config_proto_goTypes = []interface{}{ +var file_app_metrics_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.app.metrics.Config } var file_app_metrics_config_proto_depIdxs = []int32{ @@ -115,7 +115,7 @@ func file_app_metrics_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_metrics_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_metrics_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/app/observatory/burst/config.pb.go b/app/observatory/burst/config.pb.go index bdbcd8c4..b38f9d8b 100644 --- a/app/observatory/burst/config.pb.go +++ b/app/observatory/burst/config.pb.go @@ -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/observatory/burst/config.proto @@ -211,7 +211,7 @@ func file_app_observatory_burst_config_proto_rawDescGZIP() []byte { } var file_app_observatory_burst_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_app_observatory_burst_config_proto_goTypes = []interface{}{ +var file_app_observatory_burst_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.core.app.observatory.burst.Config (*HealthPingConfig)(nil), // 1: xray.core.app.observatory.burst.HealthPingConfig } @@ -230,7 +230,7 @@ func file_app_observatory_burst_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_observatory_burst_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_observatory_burst_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state @@ -242,7 +242,7 @@ func file_app_observatory_burst_config_proto_init() { return nil } } - file_app_observatory_burst_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_observatory_burst_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*HealthPingConfig); i { case 0: return &v.state diff --git a/app/observatory/command/command.pb.go b/app/observatory/command/command.pb.go index 7ec43f33..3b239e79 100644 --- a/app/observatory/command/command.pb.go +++ b/app/observatory/command/command.pb.go @@ -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/observatory/command/command.proto @@ -197,7 +197,7 @@ func file_app_observatory_command_command_proto_rawDescGZIP() []byte { } var file_app_observatory_command_command_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_app_observatory_command_command_proto_goTypes = []interface{}{ +var file_app_observatory_command_command_proto_goTypes = []any{ (*GetOutboundStatusRequest)(nil), // 0: xray.core.app.observatory.command.GetOutboundStatusRequest (*GetOutboundStatusResponse)(nil), // 1: xray.core.app.observatory.command.GetOutboundStatusResponse (*Config)(nil), // 2: xray.core.app.observatory.command.Config @@ -220,7 +220,7 @@ func file_app_observatory_command_command_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_observatory_command_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_observatory_command_command_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GetOutboundStatusRequest); i { case 0: return &v.state @@ -232,7 +232,7 @@ func file_app_observatory_command_command_proto_init() { return nil } } - file_app_observatory_command_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_observatory_command_command_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*GetOutboundStatusResponse); i { case 0: return &v.state @@ -244,7 +244,7 @@ func file_app_observatory_command_command_proto_init() { return nil } } - file_app_observatory_command_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_observatory_command_command_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/app/observatory/command/command_grpc.pb.go b/app/observatory/command/command_grpc.pb.go index 035cee07..18d29092 100644 --- a/app/observatory/command/command_grpc.pb.go +++ b/app/observatory/command/command_grpc.pb.go @@ -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/observatory/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 ( ObservatoryService_GetOutboundStatus_FullMethodName = "/xray.core.app.observatory.command.ObservatoryService/GetOutboundStatus" @@ -38,8 +38,9 @@ func NewObservatoryServiceClient(cc grpc.ClientConnInterface) ObservatoryService } func (c *observatoryServiceClient) GetOutboundStatus(ctx context.Context, in *GetOutboundStatusRequest, opts ...grpc.CallOption) (*GetOutboundStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetOutboundStatusResponse) - err := c.cc.Invoke(ctx, ObservatoryService_GetOutboundStatus_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ObservatoryService_GetOutboundStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -48,20 +49,24 @@ func (c *observatoryServiceClient) GetOutboundStatus(ctx context.Context, in *Ge // ObservatoryServiceServer is the server API for ObservatoryService service. // All implementations must embed UnimplementedObservatoryServiceServer -// for forward compatibility +// for forward compatibility. type ObservatoryServiceServer interface { GetOutboundStatus(context.Context, *GetOutboundStatusRequest) (*GetOutboundStatusResponse, error) mustEmbedUnimplementedObservatoryServiceServer() } -// UnimplementedObservatoryServiceServer must be embedded to have forward compatible implementations. -type UnimplementedObservatoryServiceServer struct { -} +// UnimplementedObservatoryServiceServer 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 UnimplementedObservatoryServiceServer struct{} func (UnimplementedObservatoryServiceServer) GetOutboundStatus(context.Context, *GetOutboundStatusRequest) (*GetOutboundStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetOutboundStatus not implemented") } func (UnimplementedObservatoryServiceServer) mustEmbedUnimplementedObservatoryServiceServer() {} +func (UnimplementedObservatoryServiceServer) testEmbeddedByValue() {} // UnsafeObservatoryServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ObservatoryServiceServer will @@ -71,6 +76,13 @@ type UnsafeObservatoryServiceServer interface { } func RegisterObservatoryServiceServer(s grpc.ServiceRegistrar, srv ObservatoryServiceServer) { + // If the following call pancis, it indicates UnimplementedObservatoryServiceServer 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(&ObservatoryService_ServiceDesc, srv) } diff --git a/app/observatory/config.pb.go b/app/observatory/config.pb.go index c1ff512e..a6a97d69 100644 --- a/app/observatory/config.pb.go +++ b/app/observatory/config.pb.go @@ -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/observatory/config.proto @@ -536,7 +536,7 @@ func file_app_observatory_config_proto_rawDescGZIP() []byte { } var file_app_observatory_config_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_app_observatory_config_proto_goTypes = []interface{}{ +var file_app_observatory_config_proto_goTypes = []any{ (*ObservationResult)(nil), // 0: xray.core.app.observatory.ObservationResult (*HealthPingMeasurementResult)(nil), // 1: xray.core.app.observatory.HealthPingMeasurementResult (*OutboundStatus)(nil), // 2: xray.core.app.observatory.OutboundStatus @@ -560,7 +560,7 @@ func file_app_observatory_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_observatory_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_observatory_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ObservationResult); i { case 0: return &v.state @@ -572,7 +572,7 @@ func file_app_observatory_config_proto_init() { return nil } } - file_app_observatory_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_observatory_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*HealthPingMeasurementResult); i { case 0: return &v.state @@ -584,7 +584,7 @@ func file_app_observatory_config_proto_init() { return nil } } - file_app_observatory_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_observatory_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*OutboundStatus); i { case 0: return &v.state @@ -596,7 +596,7 @@ func file_app_observatory_config_proto_init() { return nil } } - file_app_observatory_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_observatory_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ProbeResult); i { case 0: return &v.state @@ -608,7 +608,7 @@ func file_app_observatory_config_proto_init() { return nil } } - file_app_observatory_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_app_observatory_config_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Intensity); i { case 0: return &v.state @@ -620,7 +620,7 @@ func file_app_observatory_config_proto_init() { return nil } } - file_app_observatory_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_app_observatory_config_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/app/policy/config.pb.go b/app/policy/config.pb.go index adcb363a..2ebdd61f 100644 --- a/app/policy/config.pb.go +++ b/app/policy/config.pb.go @@ -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/policy/config.proto @@ -570,7 +570,7 @@ func file_app_policy_config_proto_rawDescGZIP() []byte { } var file_app_policy_config_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_app_policy_config_proto_goTypes = []interface{}{ +var file_app_policy_config_proto_goTypes = []any{ (*Second)(nil), // 0: xray.app.policy.Second (*Policy)(nil), // 1: xray.app.policy.Policy (*SystemPolicy)(nil), // 2: xray.app.policy.SystemPolicy @@ -606,7 +606,7 @@ func file_app_policy_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_policy_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Second); i { case 0: return &v.state @@ -618,7 +618,7 @@ func file_app_policy_config_proto_init() { return nil } } - file_app_policy_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Policy); i { case 0: return &v.state @@ -630,7 +630,7 @@ func file_app_policy_config_proto_init() { return nil } } - file_app_policy_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*SystemPolicy); i { case 0: return &v.state @@ -642,7 +642,7 @@ func file_app_policy_config_proto_init() { return nil } } - file_app_policy_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state @@ -654,7 +654,7 @@ func file_app_policy_config_proto_init() { return nil } } - file_app_policy_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Policy_Timeout); i { case 0: return &v.state @@ -666,7 +666,7 @@ func file_app_policy_config_proto_init() { return nil } } - file_app_policy_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Policy_Stats); i { case 0: return &v.state @@ -678,7 +678,7 @@ func file_app_policy_config_proto_init() { return nil } } - file_app_policy_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Policy_Buffer); i { case 0: return &v.state @@ -690,7 +690,7 @@ func file_app_policy_config_proto_init() { return nil } } - file_app_policy_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_app_policy_config_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*SystemPolicy_Stats); i { case 0: return &v.state diff --git a/app/proxyman/command/command.pb.go b/app/proxyman/command/command.pb.go index 7ce5904c..a3cb5526 100644 --- a/app/proxyman/command/command.pb.go +++ b/app/proxyman/command/command.pb.go @@ -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 diff --git a/app/proxyman/command/command_grpc.pb.go b/app/proxyman/command/command_grpc.pb.go index 8478780e..de11193a 100644 --- a/app/proxyman/command/command_grpc.pb.go +++ b/app/proxyman/command/command_grpc.pb.go @@ -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) } diff --git a/app/proxyman/config.pb.go b/app/proxyman/config.pb.go index 3f4a8fbf..aed85b98 100644 --- a/app/proxyman/config.pb.go +++ b/app/proxyman/config.pb.go @@ -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 diff --git a/app/reverse/config.pb.go b/app/reverse/config.pb.go index c7572e2a..f2578d1f 100644 --- a/app/reverse/config.pb.go +++ b/app/reverse/config.pb.go @@ -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/reverse/config.proto @@ -338,7 +338,7 @@ func file_app_reverse_config_proto_rawDescGZIP() []byte { var file_app_reverse_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_app_reverse_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_app_reverse_config_proto_goTypes = []interface{}{ +var file_app_reverse_config_proto_goTypes = []any{ (Control_State)(0), // 0: xray.app.reverse.Control.State (*Control)(nil), // 1: xray.app.reverse.Control (*BridgeConfig)(nil), // 2: xray.app.reverse.BridgeConfig @@ -362,7 +362,7 @@ func file_app_reverse_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_reverse_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_reverse_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Control); i { case 0: return &v.state @@ -374,7 +374,7 @@ func file_app_reverse_config_proto_init() { return nil } } - file_app_reverse_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_reverse_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*BridgeConfig); i { case 0: return &v.state @@ -386,7 +386,7 @@ func file_app_reverse_config_proto_init() { return nil } } - file_app_reverse_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_reverse_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*PortalConfig); i { case 0: return &v.state @@ -398,7 +398,7 @@ func file_app_reverse_config_proto_init() { return nil } } - file_app_reverse_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_reverse_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/app/router/command/command.pb.go b/app/router/command/command.pb.go index 56b5798e..4b7cde3e 100644 --- a/app/router/command/command.pb.go +++ b/app/router/command/command.pb.go @@ -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/router/command/command.proto @@ -1019,7 +1019,7 @@ func file_app_router_command_command_proto_rawDescGZIP() []byte { } var file_app_router_command_command_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_app_router_command_command_proto_goTypes = []interface{}{ +var file_app_router_command_command_proto_goTypes = []any{ (*RoutingContext)(nil), // 0: xray.app.router.command.RoutingContext (*SubscribeRoutingStatsRequest)(nil), // 1: xray.app.router.command.SubscribeRoutingStatsRequest (*TestRouteRequest)(nil), // 2: xray.app.router.command.TestRouteRequest @@ -1072,7 +1072,7 @@ func file_app_router_command_command_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_router_command_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*RoutingContext); i { case 0: return &v.state @@ -1084,7 +1084,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*SubscribeRoutingStatsRequest); i { case 0: return &v.state @@ -1096,7 +1096,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TestRouteRequest); i { case 0: return &v.state @@ -1108,7 +1108,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*PrincipleTargetInfo); i { case 0: return &v.state @@ -1120,7 +1120,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*OverrideInfo); i { case 0: return &v.state @@ -1132,7 +1132,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*BalancerMsg); i { case 0: return &v.state @@ -1144,7 +1144,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*GetBalancerInfoRequest); i { case 0: return &v.state @@ -1156,7 +1156,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*GetBalancerInfoResponse); i { case 0: return &v.state @@ -1168,7 +1168,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*OverrideBalancerTargetRequest); i { case 0: return &v.state @@ -1180,7 +1180,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*OverrideBalancerTargetResponse); i { case 0: return &v.state @@ -1192,7 +1192,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*AddRuleRequest); i { case 0: return &v.state @@ -1204,7 +1204,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*AddRuleResponse); i { case 0: return &v.state @@ -1216,7 +1216,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*RemoveRuleRequest); i { case 0: return &v.state @@ -1228,7 +1228,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*RemoveRuleResponse); i { case 0: return &v.state @@ -1240,7 +1240,7 @@ func file_app_router_command_command_proto_init() { return nil } } - file_app_router_command_command_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_app_router_command_command_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/app/router/command/command_grpc.pb.go b/app/router/command/command_grpc.pb.go index 157fd57e..018cbe06 100644 --- a/app/router/command/command_grpc.pb.go +++ b/app/router/command/command_grpc.pb.go @@ -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/router/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 ( RoutingService_SubscribeRoutingStats_FullMethodName = "/xray.app.router.command.RoutingService/SubscribeRoutingStats" @@ -31,7 +31,7 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type RoutingServiceClient interface { - SubscribeRoutingStats(ctx context.Context, in *SubscribeRoutingStatsRequest, opts ...grpc.CallOption) (RoutingService_SubscribeRoutingStatsClient, error) + SubscribeRoutingStats(ctx context.Context, in *SubscribeRoutingStatsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[RoutingContext], error) TestRoute(ctx context.Context, in *TestRouteRequest, opts ...grpc.CallOption) (*RoutingContext, error) GetBalancerInfo(ctx context.Context, in *GetBalancerInfoRequest, opts ...grpc.CallOption) (*GetBalancerInfoResponse, error) OverrideBalancerTarget(ctx context.Context, in *OverrideBalancerTargetRequest, opts ...grpc.CallOption) (*OverrideBalancerTargetResponse, error) @@ -47,12 +47,13 @@ func NewRoutingServiceClient(cc grpc.ClientConnInterface) RoutingServiceClient { return &routingServiceClient{cc} } -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], RoutingService_SubscribeRoutingStats_FullMethodName, opts...) +func (c *routingServiceClient) SubscribeRoutingStats(ctx context.Context, in *SubscribeRoutingStatsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[RoutingContext], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &RoutingService_ServiceDesc.Streams[0], RoutingService_SubscribeRoutingStats_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &routingServiceSubscribeRoutingStatsClient{stream} + x := &grpc.GenericClientStream[SubscribeRoutingStatsRequest, RoutingContext]{ClientStream: stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -62,26 +63,13 @@ func (c *routingServiceClient) SubscribeRoutingStats(ctx context.Context, in *Su return x, nil } -type RoutingService_SubscribeRoutingStatsClient interface { - Recv() (*RoutingContext, error) - grpc.ClientStream -} - -type routingServiceSubscribeRoutingStatsClient struct { - grpc.ClientStream -} - -func (x *routingServiceSubscribeRoutingStatsClient) Recv() (*RoutingContext, error) { - m := new(RoutingContext) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type RoutingService_SubscribeRoutingStatsClient = grpc.ServerStreamingClient[RoutingContext] func (c *routingServiceClient) TestRoute(ctx context.Context, in *TestRouteRequest, opts ...grpc.CallOption) (*RoutingContext, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RoutingContext) - err := c.cc.Invoke(ctx, RoutingService_TestRoute_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, RoutingService_TestRoute_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -89,8 +77,9 @@ func (c *routingServiceClient) TestRoute(ctx context.Context, in *TestRouteReque } func (c *routingServiceClient) GetBalancerInfo(ctx context.Context, in *GetBalancerInfoRequest, opts ...grpc.CallOption) (*GetBalancerInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetBalancerInfoResponse) - err := c.cc.Invoke(ctx, RoutingService_GetBalancerInfo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, RoutingService_GetBalancerInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -98,8 +87,9 @@ func (c *routingServiceClient) GetBalancerInfo(ctx context.Context, in *GetBalan } func (c *routingServiceClient) OverrideBalancerTarget(ctx context.Context, in *OverrideBalancerTargetRequest, opts ...grpc.CallOption) (*OverrideBalancerTargetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(OverrideBalancerTargetResponse) - err := c.cc.Invoke(ctx, RoutingService_OverrideBalancerTarget_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, RoutingService_OverrideBalancerTarget_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -107,8 +97,9 @@ func (c *routingServiceClient) OverrideBalancerTarget(ctx context.Context, in *O } func (c *routingServiceClient) AddRule(ctx context.Context, in *AddRuleRequest, opts ...grpc.CallOption) (*AddRuleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddRuleResponse) - err := c.cc.Invoke(ctx, RoutingService_AddRule_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, RoutingService_AddRule_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -116,8 +107,9 @@ func (c *routingServiceClient) AddRule(ctx context.Context, in *AddRuleRequest, } func (c *routingServiceClient) RemoveRule(ctx context.Context, in *RemoveRuleRequest, opts ...grpc.CallOption) (*RemoveRuleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RemoveRuleResponse) - err := c.cc.Invoke(ctx, RoutingService_RemoveRule_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, RoutingService_RemoveRule_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -126,9 +118,9 @@ func (c *routingServiceClient) RemoveRule(ctx context.Context, in *RemoveRuleReq // RoutingServiceServer is the server API for RoutingService service. // All implementations must embed UnimplementedRoutingServiceServer -// for forward compatibility +// for forward compatibility. type RoutingServiceServer interface { - SubscribeRoutingStats(*SubscribeRoutingStatsRequest, RoutingService_SubscribeRoutingStatsServer) error + SubscribeRoutingStats(*SubscribeRoutingStatsRequest, grpc.ServerStreamingServer[RoutingContext]) error TestRoute(context.Context, *TestRouteRequest) (*RoutingContext, error) GetBalancerInfo(context.Context, *GetBalancerInfoRequest) (*GetBalancerInfoResponse, error) OverrideBalancerTarget(context.Context, *OverrideBalancerTargetRequest) (*OverrideBalancerTargetResponse, error) @@ -137,11 +129,14 @@ type RoutingServiceServer interface { mustEmbedUnimplementedRoutingServiceServer() } -// UnimplementedRoutingServiceServer must be embedded to have forward compatible implementations. -type UnimplementedRoutingServiceServer struct { -} +// UnimplementedRoutingServiceServer 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 UnimplementedRoutingServiceServer struct{} -func (UnimplementedRoutingServiceServer) SubscribeRoutingStats(*SubscribeRoutingStatsRequest, RoutingService_SubscribeRoutingStatsServer) error { +func (UnimplementedRoutingServiceServer) SubscribeRoutingStats(*SubscribeRoutingStatsRequest, grpc.ServerStreamingServer[RoutingContext]) error { return status.Errorf(codes.Unimplemented, "method SubscribeRoutingStats not implemented") } func (UnimplementedRoutingServiceServer) TestRoute(context.Context, *TestRouteRequest) (*RoutingContext, error) { @@ -160,6 +155,7 @@ func (UnimplementedRoutingServiceServer) RemoveRule(context.Context, *RemoveRule return nil, status.Errorf(codes.Unimplemented, "method RemoveRule not implemented") } func (UnimplementedRoutingServiceServer) mustEmbedUnimplementedRoutingServiceServer() {} +func (UnimplementedRoutingServiceServer) testEmbeddedByValue() {} // UnsafeRoutingServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RoutingServiceServer will @@ -169,6 +165,13 @@ type UnsafeRoutingServiceServer interface { } func RegisterRoutingServiceServer(s grpc.ServiceRegistrar, srv RoutingServiceServer) { + // If the following call pancis, it indicates UnimplementedRoutingServiceServer 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(&RoutingService_ServiceDesc, srv) } @@ -177,21 +180,11 @@ func _RoutingService_SubscribeRoutingStats_Handler(srv interface{}, stream grpc. if err := stream.RecvMsg(m); err != nil { return err } - return srv.(RoutingServiceServer).SubscribeRoutingStats(m, &routingServiceSubscribeRoutingStatsServer{stream}) + return srv.(RoutingServiceServer).SubscribeRoutingStats(m, &grpc.GenericServerStream[SubscribeRoutingStatsRequest, RoutingContext]{ServerStream: stream}) } -type RoutingService_SubscribeRoutingStatsServer interface { - Send(*RoutingContext) error - grpc.ServerStream -} - -type routingServiceSubscribeRoutingStatsServer struct { - grpc.ServerStream -} - -func (x *routingServiceSubscribeRoutingStatsServer) Send(m *RoutingContext) error { - return x.ServerStream.SendMsg(m) -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type RoutingService_SubscribeRoutingStatsServer = grpc.ServerStreamingServer[RoutingContext] func _RoutingService_TestRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TestRouteRequest) diff --git a/app/router/config.pb.go b/app/router/config.pb.go index 43f3bcfc..c606ab47 100644 --- a/app/router/config.pb.go +++ b/app/router/config.pb.go @@ -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/router/config.proto @@ -1275,7 +1275,7 @@ func file_app_router_config_proto_rawDescGZIP() []byte { var file_app_router_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_app_router_config_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_app_router_config_proto_goTypes = []interface{}{ +var file_app_router_config_proto_goTypes = []any{ (Domain_Type)(0), // 0: xray.app.router.Domain.Type (Config_DomainStrategy)(0), // 1: xray.app.router.Config.DomainStrategy (*Domain)(nil), // 2: xray.app.router.Domain @@ -1333,7 +1333,7 @@ func file_app_router_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_app_router_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Domain); i { case 0: return &v.state @@ -1345,7 +1345,7 @@ func file_app_router_config_proto_init() { return nil } } - file_app_router_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CIDR); i { case 0: return &v.state @@ -1357,7 +1357,7 @@ func file_app_router_config_proto_init() { return nil } } - file_app_router_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GeoIP); i { case 0: return &v.state @@ -1369,7 +1369,7 @@ func file_app_router_config_proto_init() { return nil } } - file_app_router_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*GeoIPList); i { case 0: return &v.state @@ -1381,7 +1381,7 @@ func file_app_router_config_proto_init() { return nil } } - file_app_router_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*GeoSite); i { case 0: return &v.state @@ -1393,7 +1393,7 @@ func file_app_router_config_proto_init() { return nil } } - file_app_router_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*GeoSiteList); i { case 0: return &v.state @@ -1405,7 +1405,7 @@ func file_app_router_config_proto_init() { return nil } } - file_app_router_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*RoutingRule); i { case 0: return &v.state @@ -1417,7 +1417,7 @@ func file_app_router_config_proto_init() { return nil } } - file_app_router_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*BalancingRule); i { case 0: return &v.state @@ -1429,7 +1429,7 @@ func file_app_router_config_proto_init() { return nil } } - file_app_router_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*StrategyWeight); i { case 0: return &v.state @@ -1441,7 +1441,7 @@ func file_app_router_config_proto_init() { return nil } } - file_app_router_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*StrategyLeastLoadConfig); i { case 0: return &v.state @@ -1453,7 +1453,7 @@ func file_app_router_config_proto_init() { return nil } } - file_app_router_config_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state @@ -1465,7 +1465,7 @@ func file_app_router_config_proto_init() { return nil } } - file_app_router_config_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_app_router_config_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*Domain_Attribute); i { case 0: return &v.state @@ -1478,11 +1478,11 @@ func file_app_router_config_proto_init() { } } } - file_app_router_config_proto_msgTypes[6].OneofWrappers = []interface{}{ + file_app_router_config_proto_msgTypes[6].OneofWrappers = []any{ (*RoutingRule_Tag)(nil), (*RoutingRule_BalancingTag)(nil), } - file_app_router_config_proto_msgTypes[11].OneofWrappers = []interface{}{ + file_app_router_config_proto_msgTypes[11].OneofWrappers = []any{ (*Domain_Attribute_BoolValue)(nil), (*Domain_Attribute_IntValue)(nil), } diff --git a/app/stats/command/command.pb.go b/app/stats/command/command.pb.go index 418e7fb1..cbfe2aa3 100644 --- a/app/stats/command/command.pb.go +++ b/app/stats/command/command.pb.go @@ -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 diff --git a/app/stats/command/command_grpc.pb.go b/app/stats/command/command_grpc.pb.go index e9420299..365bfbd6 100644 --- a/app/stats/command/command_grpc.pb.go +++ b/app/stats/command/command_grpc.pb.go @@ -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) } diff --git a/app/stats/config.pb.go b/app/stats/config.pb.go index 4f5e04d9..bfe526f2 100644 --- a/app/stats/config.pb.go +++ b/app/stats/config.pb.go @@ -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 diff --git a/common/log/log.pb.go b/common/log/log.pb.go index 2a970b54..57215685 100644 --- a/common/log/log.pb.go +++ b/common/log/log.pb.go @@ -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: common/log/log.proto @@ -106,7 +106,7 @@ func file_common_log_log_proto_rawDescGZIP() []byte { } var file_common_log_log_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_common_log_log_proto_goTypes = []interface{}{ +var file_common_log_log_proto_goTypes = []any{ (Severity)(0), // 0: xray.common.log.Severity } var file_common_log_log_proto_depIdxs = []int32{ diff --git a/common/net/address.pb.go b/common/net/address.pb.go index fd61b16a..973d8d3a 100644 --- a/common/net/address.pb.go +++ b/common/net/address.pb.go @@ -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: common/net/address.proto @@ -136,7 +136,7 @@ func file_common_net_address_proto_rawDescGZIP() []byte { } var file_common_net_address_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_common_net_address_proto_goTypes = []interface{}{ +var file_common_net_address_proto_goTypes = []any{ (*IPOrDomain)(nil), // 0: xray.common.net.IPOrDomain } var file_common_net_address_proto_depIdxs = []int32{ @@ -153,7 +153,7 @@ func file_common_net_address_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_net_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_net_address_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*IPOrDomain); i { case 0: return &v.state @@ -166,7 +166,7 @@ func file_common_net_address_proto_init() { } } } - file_common_net_address_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_common_net_address_proto_msgTypes[0].OneofWrappers = []any{ (*IPOrDomain_Ip)(nil), (*IPOrDomain_Domain)(nil), } diff --git a/common/net/destination.pb.go b/common/net/destination.pb.go index 3e4de52c..c796f042 100644 --- a/common/net/destination.pb.go +++ b/common/net/destination.pb.go @@ -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: common/net/destination.proto @@ -123,7 +123,7 @@ func file_common_net_destination_proto_rawDescGZIP() []byte { } var file_common_net_destination_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_common_net_destination_proto_goTypes = []interface{}{ +var file_common_net_destination_proto_goTypes = []any{ (*Endpoint)(nil), // 0: xray.common.net.Endpoint (Network)(0), // 1: xray.common.net.Network (*IPOrDomain)(nil), // 2: xray.common.net.IPOrDomain @@ -146,7 +146,7 @@ func file_common_net_destination_proto_init() { file_common_net_network_proto_init() file_common_net_address_proto_init() if !protoimpl.UnsafeEnabled { - file_common_net_destination_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_net_destination_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Endpoint); i { case 0: return &v.state diff --git a/common/net/network.pb.go b/common/net/network.pb.go index f720ca54..e2320475 100644 --- a/common/net/network.pb.go +++ b/common/net/network.pb.go @@ -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: common/net/network.proto @@ -160,7 +160,7 @@ func file_common_net_network_proto_rawDescGZIP() []byte { var file_common_net_network_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_common_net_network_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_common_net_network_proto_goTypes = []interface{}{ +var file_common_net_network_proto_goTypes = []any{ (Network)(0), // 0: xray.common.net.Network (*NetworkList)(nil), // 1: xray.common.net.NetworkList } @@ -179,7 +179,7 @@ func file_common_net_network_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_net_network_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_net_network_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*NetworkList); i { case 0: return &v.state diff --git a/common/net/port.pb.go b/common/net/port.pb.go index 36af4942..70415158 100644 --- a/common/net/port.pb.go +++ b/common/net/port.pb.go @@ -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: common/net/port.proto @@ -159,7 +159,7 @@ func file_common_net_port_proto_rawDescGZIP() []byte { } var file_common_net_port_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_common_net_port_proto_goTypes = []interface{}{ +var file_common_net_port_proto_goTypes = []any{ (*PortRange)(nil), // 0: xray.common.net.PortRange (*PortList)(nil), // 1: xray.common.net.PortList } @@ -178,7 +178,7 @@ func file_common_net_port_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_net_port_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_net_port_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PortRange); i { case 0: return &v.state @@ -190,7 +190,7 @@ func file_common_net_port_proto_init() { return nil } } - file_common_net_port_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_common_net_port_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*PortList); i { case 0: return &v.state diff --git a/common/protocol/headers.pb.go b/common/protocol/headers.pb.go index bb6e810b..f256bf2e 100644 --- a/common/protocol/headers.pb.go +++ b/common/protocol/headers.pb.go @@ -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: common/protocol/headers.proto @@ -165,7 +165,7 @@ func file_common_protocol_headers_proto_rawDescGZIP() []byte { var file_common_protocol_headers_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_common_protocol_headers_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_common_protocol_headers_proto_goTypes = []interface{}{ +var file_common_protocol_headers_proto_goTypes = []any{ (SecurityType)(0), // 0: xray.common.protocol.SecurityType (*SecurityConfig)(nil), // 1: xray.common.protocol.SecurityConfig } @@ -184,7 +184,7 @@ func file_common_protocol_headers_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_protocol_headers_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_protocol_headers_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SecurityConfig); i { case 0: return &v.state diff --git a/common/protocol/server_spec.pb.go b/common/protocol/server_spec.pb.go index cb19e91e..42c7569a 100644 --- a/common/protocol/server_spec.pb.go +++ b/common/protocol/server_spec.pb.go @@ -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: common/protocol/server_spec.proto @@ -125,7 +125,7 @@ func file_common_protocol_server_spec_proto_rawDescGZIP() []byte { } var file_common_protocol_server_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_common_protocol_server_spec_proto_goTypes = []interface{}{ +var file_common_protocol_server_spec_proto_goTypes = []any{ (*ServerEndpoint)(nil), // 0: xray.common.protocol.ServerEndpoint (*net.IPOrDomain)(nil), // 1: xray.common.net.IPOrDomain (*User)(nil), // 2: xray.common.protocol.User @@ -147,7 +147,7 @@ func file_common_protocol_server_spec_proto_init() { } file_common_protocol_user_proto_init() if !protoimpl.UnsafeEnabled { - file_common_protocol_server_spec_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_protocol_server_spec_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ServerEndpoint); i { case 0: return &v.state diff --git a/common/protocol/user.pb.go b/common/protocol/user.pb.go index dfa89b33..c97765ff 100644 --- a/common/protocol/user.pb.go +++ b/common/protocol/user.pb.go @@ -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: common/protocol/user.proto @@ -124,7 +124,7 @@ func file_common_protocol_user_proto_rawDescGZIP() []byte { } var file_common_protocol_user_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_common_protocol_user_proto_goTypes = []interface{}{ +var file_common_protocol_user_proto_goTypes = []any{ (*User)(nil), // 0: xray.common.protocol.User (*serial.TypedMessage)(nil), // 1: xray.common.serial.TypedMessage } @@ -143,7 +143,7 @@ func file_common_protocol_user_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_protocol_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_protocol_user_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*User); i { case 0: return &v.state diff --git a/common/serial/typed_message.pb.go b/common/serial/typed_message.pb.go index 719a2d04..361f16c7 100644 --- a/common/serial/typed_message.pb.go +++ b/common/serial/typed_message.pb.go @@ -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: common/serial/typed_message.proto @@ -110,7 +110,7 @@ func file_common_serial_typed_message_proto_rawDescGZIP() []byte { } var file_common_serial_typed_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_common_serial_typed_message_proto_goTypes = []interface{}{ +var file_common_serial_typed_message_proto_goTypes = []any{ (*TypedMessage)(nil), // 0: xray.common.serial.TypedMessage } var file_common_serial_typed_message_proto_depIdxs = []int32{ @@ -127,7 +127,7 @@ func file_common_serial_typed_message_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_common_serial_typed_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_common_serial_typed_message_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TypedMessage); i { case 0: return &v.state diff --git a/core/config.pb.go b/core/config.pb.go index 1b2591dc..fc31c903 100644 --- a/core/config.pb.go +++ b/core/config.pb.go @@ -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: core/config.proto @@ -347,7 +347,7 @@ func file_core_config_proto_rawDescGZIP() []byte { } var file_core_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_core_config_proto_goTypes = []interface{}{ +var file_core_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.core.Config (*InboundHandlerConfig)(nil), // 1: xray.core.InboundHandlerConfig (*OutboundHandlerConfig)(nil), // 2: xray.core.OutboundHandlerConfig @@ -377,7 +377,7 @@ func file_core_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_core_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_core_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state @@ -389,7 +389,7 @@ func file_core_config_proto_init() { return nil } } - file_core_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_core_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*InboundHandlerConfig); i { case 0: return &v.state @@ -401,7 +401,7 @@ func file_core_config_proto_init() { return nil } } - file_core_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_core_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*OutboundHandlerConfig); i { case 0: return &v.state diff --git a/core/proto.go b/core/proto.go index 030365cc..b85d99d8 100644 --- a/core/proto.go +++ b/core/proto.go @@ -1,5 +1,5 @@ package core -//go:generate go install -v google.golang.org/protobuf/cmd/protoc-gen-go@latest -//go:generate go install -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest +//go:generate go install -v google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 +//go:generate go install -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 //go:generate go run ../infra/vprotogen/main.go -pwd ./.. diff --git a/proxy/blackhole/config.pb.go b/proxy/blackhole/config.pb.go index f2e54293..d9ebaeab 100644 --- a/proxy/blackhole/config.pb.go +++ b/proxy/blackhole/config.pb.go @@ -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: proxy/blackhole/config.proto @@ -181,7 +181,7 @@ func file_proxy_blackhole_config_proto_rawDescGZIP() []byte { } var file_proxy_blackhole_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_proxy_blackhole_config_proto_goTypes = []interface{}{ +var file_proxy_blackhole_config_proto_goTypes = []any{ (*NoneResponse)(nil), // 0: xray.proxy.blackhole.NoneResponse (*HTTPResponse)(nil), // 1: xray.proxy.blackhole.HTTPResponse (*Config)(nil), // 2: xray.proxy.blackhole.Config @@ -202,7 +202,7 @@ func file_proxy_blackhole_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_blackhole_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_blackhole_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*NoneResponse); i { case 0: return &v.state @@ -214,7 +214,7 @@ func file_proxy_blackhole_config_proto_init() { return nil } } - file_proxy_blackhole_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_blackhole_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*HTTPResponse); i { case 0: return &v.state @@ -226,7 +226,7 @@ func file_proxy_blackhole_config_proto_init() { return nil } } - file_proxy_blackhole_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_blackhole_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/proxy/dns/config.pb.go b/proxy/dns/config.pb.go index d8a46aed..52c680d3 100644 --- a/proxy/dns/config.pb.go +++ b/proxy/dns/config.pb.go @@ -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: proxy/dns/config.proto @@ -122,7 +122,7 @@ func file_proxy_dns_config_proto_rawDescGZIP() []byte { } var file_proxy_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_proxy_dns_config_proto_goTypes = []interface{}{ +var file_proxy_dns_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.proxy.dns.Config (*net.Endpoint)(nil), // 1: xray.common.net.Endpoint } @@ -141,7 +141,7 @@ func file_proxy_dns_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_dns_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_dns_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/proxy/dokodemo/config.pb.go b/proxy/dokodemo/config.pb.go index 4f698be1..b0446a40 100644 --- a/proxy/dokodemo/config.pb.go +++ b/proxy/dokodemo/config.pb.go @@ -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: proxy/dokodemo/config.proto @@ -175,7 +175,7 @@ func file_proxy_dokodemo_config_proto_rawDescGZIP() []byte { } var file_proxy_dokodemo_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_proxy_dokodemo_config_proto_goTypes = []interface{}{ +var file_proxy_dokodemo_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.proxy.dokodemo.Config (*net.IPOrDomain)(nil), // 1: xray.common.net.IPOrDomain (*net.NetworkList)(nil), // 2: xray.common.net.NetworkList @@ -198,7 +198,7 @@ func file_proxy_dokodemo_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_dokodemo_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_dokodemo_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/proxy/freedom/config.pb.go b/proxy/freedom/config.pb.go index c8f6c3df..723d4de4 100644 --- a/proxy/freedom/config.pb.go +++ b/proxy/freedom/config.pb.go @@ -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: proxy/freedom/config.proto @@ -399,7 +399,7 @@ func file_proxy_freedom_config_proto_rawDescGZIP() []byte { var file_proxy_freedom_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_proxy_freedom_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_proxy_freedom_config_proto_goTypes = []interface{}{ +var file_proxy_freedom_config_proto_goTypes = []any{ (Config_DomainStrategy)(0), // 0: xray.proxy.freedom.Config.DomainStrategy (*DestinationOverride)(nil), // 1: xray.proxy.freedom.DestinationOverride (*Fragment)(nil), // 2: xray.proxy.freedom.Fragment @@ -424,7 +424,7 @@ func file_proxy_freedom_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_freedom_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_freedom_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*DestinationOverride); i { case 0: return &v.state @@ -436,7 +436,7 @@ func file_proxy_freedom_config_proto_init() { return nil } } - file_proxy_freedom_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_freedom_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Fragment); i { case 0: return &v.state @@ -448,7 +448,7 @@ func file_proxy_freedom_config_proto_init() { return nil } } - file_proxy_freedom_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_freedom_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/proxy/http/config.pb.go b/proxy/http/config.pb.go index c4494a26..08804d9a 100644 --- a/proxy/http/config.pb.go +++ b/proxy/http/config.pb.go @@ -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: proxy/http/config.proto @@ -322,7 +322,7 @@ func file_proxy_http_config_proto_rawDescGZIP() []byte { } var file_proxy_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_proxy_http_config_proto_goTypes = []interface{}{ +var file_proxy_http_config_proto_goTypes = []any{ (*Account)(nil), // 0: xray.proxy.http.Account (*ServerConfig)(nil), // 1: xray.proxy.http.ServerConfig (*Header)(nil), // 2: xray.proxy.http.Header @@ -347,7 +347,7 @@ func file_proxy_http_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_http_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Account); i { case 0: return &v.state @@ -359,7 +359,7 @@ func file_proxy_http_config_proto_init() { return nil } } - file_proxy_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_http_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ServerConfig); i { case 0: return &v.state @@ -371,7 +371,7 @@ func file_proxy_http_config_proto_init() { return nil } } - file_proxy_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_http_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Header); i { case 0: return &v.state @@ -383,7 +383,7 @@ func file_proxy_http_config_proto_init() { return nil } } - file_proxy_http_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_proxy_http_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ClientConfig); i { case 0: return &v.state diff --git a/proxy/loopback/config.pb.go b/proxy/loopback/config.pb.go index f66696ee..22482623 100644 --- a/proxy/loopback/config.pb.go +++ b/proxy/loopback/config.pb.go @@ -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: proxy/loopback/config.proto @@ -98,7 +98,7 @@ func file_proxy_loopback_config_proto_rawDescGZIP() []byte { } var file_proxy_loopback_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_proxy_loopback_config_proto_goTypes = []interface{}{ +var file_proxy_loopback_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.proxy.loopback.Config } var file_proxy_loopback_config_proto_depIdxs = []int32{ @@ -115,7 +115,7 @@ func file_proxy_loopback_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_loopback_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_loopback_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/proxy/shadowsocks/config.pb.go b/proxy/shadowsocks/config.pb.go index 03dd3342..d2f96de7 100644 --- a/proxy/shadowsocks/config.pb.go +++ b/proxy/shadowsocks/config.pb.go @@ -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: proxy/shadowsocks/config.proto @@ -309,7 +309,7 @@ func file_proxy_shadowsocks_config_proto_rawDescGZIP() []byte { var file_proxy_shadowsocks_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_proxy_shadowsocks_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_proxy_shadowsocks_config_proto_goTypes = []interface{}{ +var file_proxy_shadowsocks_config_proto_goTypes = []any{ (CipherType)(0), // 0: xray.proxy.shadowsocks.CipherType (*Account)(nil), // 1: xray.proxy.shadowsocks.Account (*ServerConfig)(nil), // 2: xray.proxy.shadowsocks.ServerConfig @@ -336,7 +336,7 @@ func file_proxy_shadowsocks_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_shadowsocks_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Account); i { case 0: return &v.state @@ -348,7 +348,7 @@ func file_proxy_shadowsocks_config_proto_init() { return nil } } - file_proxy_shadowsocks_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ServerConfig); i { case 0: return &v.state @@ -360,7 +360,7 @@ func file_proxy_shadowsocks_config_proto_init() { return nil } } - file_proxy_shadowsocks_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ClientConfig); i { case 0: return &v.state diff --git a/proxy/shadowsocks_2022/config.pb.go b/proxy/shadowsocks_2022/config.pb.go index 41978474..b65be80a 100644 --- a/proxy/shadowsocks_2022/config.pb.go +++ b/proxy/shadowsocks_2022/config.pb.go @@ -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: proxy/shadowsocks_2022/config.proto @@ -566,7 +566,7 @@ func file_proxy_shadowsocks_2022_config_proto_rawDescGZIP() []byte { } var file_proxy_shadowsocks_2022_config_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_proxy_shadowsocks_2022_config_proto_goTypes = []interface{}{ +var file_proxy_shadowsocks_2022_config_proto_goTypes = []any{ (*ServerConfig)(nil), // 0: xray.proxy.shadowsocks_2022.ServerConfig (*MultiUserServerConfig)(nil), // 1: xray.proxy.shadowsocks_2022.MultiUserServerConfig (*RelayDestination)(nil), // 2: xray.proxy.shadowsocks_2022.RelayDestination @@ -597,7 +597,7 @@ func file_proxy_shadowsocks_2022_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_shadowsocks_2022_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_2022_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ServerConfig); i { case 0: return &v.state @@ -609,7 +609,7 @@ func file_proxy_shadowsocks_2022_config_proto_init() { return nil } } - file_proxy_shadowsocks_2022_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_2022_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*MultiUserServerConfig); i { case 0: return &v.state @@ -621,7 +621,7 @@ func file_proxy_shadowsocks_2022_config_proto_init() { return nil } } - file_proxy_shadowsocks_2022_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_2022_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*RelayDestination); i { case 0: return &v.state @@ -633,7 +633,7 @@ func file_proxy_shadowsocks_2022_config_proto_init() { return nil } } - file_proxy_shadowsocks_2022_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_2022_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*RelayServerConfig); i { case 0: return &v.state @@ -645,7 +645,7 @@ func file_proxy_shadowsocks_2022_config_proto_init() { return nil } } - file_proxy_shadowsocks_2022_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_2022_config_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*User); i { case 0: return &v.state @@ -657,7 +657,7 @@ func file_proxy_shadowsocks_2022_config_proto_init() { return nil } } - file_proxy_shadowsocks_2022_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_proxy_shadowsocks_2022_config_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ClientConfig); i { case 0: return &v.state diff --git a/proxy/socks/config.pb.go b/proxy/socks/config.pb.go index d13ebd10..0bc5fe15 100644 --- a/proxy/socks/config.pb.go +++ b/proxy/socks/config.pb.go @@ -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: proxy/socks/config.proto @@ -395,7 +395,7 @@ func file_proxy_socks_config_proto_rawDescGZIP() []byte { var file_proxy_socks_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_proxy_socks_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_proxy_socks_config_proto_goTypes = []interface{}{ +var file_proxy_socks_config_proto_goTypes = []any{ (AuthType)(0), // 0: xray.proxy.socks.AuthType (Version)(0), // 1: xray.proxy.socks.Version (*Account)(nil), // 2: xray.proxy.socks.Account @@ -424,7 +424,7 @@ func file_proxy_socks_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_socks_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_socks_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Account); i { case 0: return &v.state @@ -436,7 +436,7 @@ func file_proxy_socks_config_proto_init() { return nil } } - file_proxy_socks_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_socks_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ServerConfig); i { case 0: return &v.state @@ -448,7 +448,7 @@ func file_proxy_socks_config_proto_init() { return nil } } - file_proxy_socks_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_socks_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ClientConfig); i { case 0: return &v.state diff --git a/proxy/trojan/config.pb.go b/proxy/trojan/config.pb.go index 6cd360ed..073e6792 100644 --- a/proxy/trojan/config.pb.go +++ b/proxy/trojan/config.pb.go @@ -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: proxy/trojan/config.proto @@ -312,7 +312,7 @@ func file_proxy_trojan_config_proto_rawDescGZIP() []byte { } var file_proxy_trojan_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_proxy_trojan_config_proto_goTypes = []interface{}{ +var file_proxy_trojan_config_proto_goTypes = []any{ (*Account)(nil), // 0: xray.proxy.trojan.Account (*Fallback)(nil), // 1: xray.proxy.trojan.Fallback (*ClientConfig)(nil), // 2: xray.proxy.trojan.ClientConfig @@ -337,7 +337,7 @@ func file_proxy_trojan_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_trojan_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_trojan_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Account); i { case 0: return &v.state @@ -349,7 +349,7 @@ func file_proxy_trojan_config_proto_init() { return nil } } - file_proxy_trojan_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_trojan_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Fallback); i { case 0: return &v.state @@ -361,7 +361,7 @@ func file_proxy_trojan_config_proto_init() { return nil } } - file_proxy_trojan_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_trojan_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ClientConfig); i { case 0: return &v.state @@ -373,7 +373,7 @@ func file_proxy_trojan_config_proto_init() { return nil } } - file_proxy_trojan_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_proxy_trojan_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ServerConfig); i { case 0: return &v.state diff --git a/proxy/vless/account.pb.go b/proxy/vless/account.pb.go index 24564a36..78854359 100644 --- a/proxy/vless/account.pb.go +++ b/proxy/vless/account.pb.go @@ -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: proxy/vless/account.proto @@ -118,7 +118,7 @@ func file_proxy_vless_account_proto_rawDescGZIP() []byte { } var file_proxy_vless_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_proxy_vless_account_proto_goTypes = []interface{}{ +var file_proxy_vless_account_proto_goTypes = []any{ (*Account)(nil), // 0: xray.proxy.vless.Account } var file_proxy_vless_account_proto_depIdxs = []int32{ @@ -135,7 +135,7 @@ func file_proxy_vless_account_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_vless_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vless_account_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Account); i { case 0: return &v.state diff --git a/proxy/vless/encoding/addons.pb.go b/proxy/vless/encoding/addons.pb.go index c876d543..f093dda4 100644 --- a/proxy/vless/encoding/addons.pb.go +++ b/proxy/vless/encoding/addons.pb.go @@ -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: proxy/vless/encoding/addons.proto @@ -108,7 +108,7 @@ func file_proxy_vless_encoding_addons_proto_rawDescGZIP() []byte { } var file_proxy_vless_encoding_addons_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_proxy_vless_encoding_addons_proto_goTypes = []interface{}{ +var file_proxy_vless_encoding_addons_proto_goTypes = []any{ (*Addons)(nil), // 0: xray.proxy.vless.encoding.Addons } var file_proxy_vless_encoding_addons_proto_depIdxs = []int32{ @@ -125,7 +125,7 @@ func file_proxy_vless_encoding_addons_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_vless_encoding_addons_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vless_encoding_addons_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Addons); i { case 0: return &v.state diff --git a/proxy/vless/inbound/config.pb.go b/proxy/vless/inbound/config.pb.go index c60cd9c5..66adee6f 100644 --- a/proxy/vless/inbound/config.pb.go +++ b/proxy/vless/inbound/config.pb.go @@ -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: proxy/vless/inbound/config.proto @@ -223,7 +223,7 @@ func file_proxy_vless_inbound_config_proto_rawDescGZIP() []byte { } var file_proxy_vless_inbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_proxy_vless_inbound_config_proto_goTypes = []interface{}{ +var file_proxy_vless_inbound_config_proto_goTypes = []any{ (*Fallback)(nil), // 0: xray.proxy.vless.inbound.Fallback (*Config)(nil), // 1: xray.proxy.vless.inbound.Config (*protocol.User)(nil), // 2: xray.common.protocol.User @@ -244,7 +244,7 @@ func file_proxy_vless_inbound_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_vless_inbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vless_inbound_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Fallback); i { case 0: return &v.state @@ -256,7 +256,7 @@ func file_proxy_vless_inbound_config_proto_init() { return nil } } - file_proxy_vless_inbound_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vless_inbound_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/proxy/vless/outbound/config.pb.go b/proxy/vless/outbound/config.pb.go index f7fa0e33..4df54775 100644 --- a/proxy/vless/outbound/config.pb.go +++ b/proxy/vless/outbound/config.pb.go @@ -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: proxy/vless/outbound/config.proto @@ -104,7 +104,7 @@ func file_proxy_vless_outbound_config_proto_rawDescGZIP() []byte { } var file_proxy_vless_outbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_proxy_vless_outbound_config_proto_goTypes = []interface{}{ +var file_proxy_vless_outbound_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.proxy.vless.outbound.Config (*protocol.ServerEndpoint)(nil), // 1: xray.common.protocol.ServerEndpoint } @@ -123,7 +123,7 @@ func file_proxy_vless_outbound_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_vless_outbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vless_outbound_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/proxy/vmess/account.pb.go b/proxy/vmess/account.pb.go index d961130a..8e406071 100644 --- a/proxy/vmess/account.pb.go +++ b/proxy/vmess/account.pb.go @@ -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: proxy/vmess/account.proto @@ -126,7 +126,7 @@ func file_proxy_vmess_account_proto_rawDescGZIP() []byte { } var file_proxy_vmess_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_proxy_vmess_account_proto_goTypes = []interface{}{ +var file_proxy_vmess_account_proto_goTypes = []any{ (*Account)(nil), // 0: xray.proxy.vmess.Account (*protocol.SecurityConfig)(nil), // 1: xray.common.protocol.SecurityConfig } @@ -145,7 +145,7 @@ func file_proxy_vmess_account_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_vmess_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vmess_account_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Account); i { case 0: return &v.state diff --git a/proxy/vmess/inbound/config.pb.go b/proxy/vmess/inbound/config.pb.go index 5b0c8c98..43457e69 100644 --- a/proxy/vmess/inbound/config.pb.go +++ b/proxy/vmess/inbound/config.pb.go @@ -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: proxy/vmess/inbound/config.proto @@ -226,7 +226,7 @@ func file_proxy_vmess_inbound_config_proto_rawDescGZIP() []byte { } var file_proxy_vmess_inbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_proxy_vmess_inbound_config_proto_goTypes = []interface{}{ +var file_proxy_vmess_inbound_config_proto_goTypes = []any{ (*DetourConfig)(nil), // 0: xray.proxy.vmess.inbound.DetourConfig (*DefaultConfig)(nil), // 1: xray.proxy.vmess.inbound.DefaultConfig (*Config)(nil), // 2: xray.proxy.vmess.inbound.Config @@ -249,7 +249,7 @@ func file_proxy_vmess_inbound_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_vmess_inbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vmess_inbound_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*DetourConfig); i { case 0: return &v.state @@ -261,7 +261,7 @@ func file_proxy_vmess_inbound_config_proto_init() { return nil } } - file_proxy_vmess_inbound_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vmess_inbound_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*DefaultConfig); i { case 0: return &v.state @@ -273,7 +273,7 @@ func file_proxy_vmess_inbound_config_proto_init() { return nil } } - file_proxy_vmess_inbound_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vmess_inbound_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/proxy/vmess/outbound/config.pb.go b/proxy/vmess/outbound/config.pb.go index ecadd1c0..b1840d1d 100644 --- a/proxy/vmess/outbound/config.pb.go +++ b/proxy/vmess/outbound/config.pb.go @@ -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: proxy/vmess/outbound/config.proto @@ -105,7 +105,7 @@ func file_proxy_vmess_outbound_config_proto_rawDescGZIP() []byte { } var file_proxy_vmess_outbound_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_proxy_vmess_outbound_config_proto_goTypes = []interface{}{ +var file_proxy_vmess_outbound_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.proxy.vmess.outbound.Config (*protocol.ServerEndpoint)(nil), // 1: xray.common.protocol.ServerEndpoint } @@ -124,7 +124,7 @@ func file_proxy_vmess_outbound_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_vmess_outbound_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_vmess_outbound_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/proxy/wireguard/config.pb.go b/proxy/wireguard/config.pb.go index 25036ba7..fb0d6582 100644 --- a/proxy/wireguard/config.pb.go +++ b/proxy/wireguard/config.pb.go @@ -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: proxy/wireguard/config.proto @@ -334,7 +334,7 @@ func file_proxy_wireguard_config_proto_rawDescGZIP() []byte { var file_proxy_wireguard_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_proxy_wireguard_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_proxy_wireguard_config_proto_goTypes = []interface{}{ +var file_proxy_wireguard_config_proto_goTypes = []any{ (DeviceConfig_DomainStrategy)(0), // 0: xray.proxy.wireguard.DeviceConfig.DomainStrategy (*PeerConfig)(nil), // 1: xray.proxy.wireguard.PeerConfig (*DeviceConfig)(nil), // 2: xray.proxy.wireguard.DeviceConfig @@ -355,7 +355,7 @@ func file_proxy_wireguard_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_proxy_wireguard_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_proxy_wireguard_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PeerConfig); i { case 0: return &v.state @@ -367,7 +367,7 @@ func file_proxy_wireguard_config_proto_init() { return nil } } - file_proxy_wireguard_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_proxy_wireguard_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*DeviceConfig); i { case 0: return &v.state diff --git a/transport/global/config.pb.go b/transport/global/config.pb.go index 7459ab6b..7b3abb99 100644 --- a/transport/global/config.pb.go +++ b/transport/global/config.pb.go @@ -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: transport/global/config.proto @@ -109,7 +109,7 @@ func file_transport_global_config_proto_rawDescGZIP() []byte { } var file_transport_global_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_global_config_proto_goTypes = []interface{}{ +var file_transport_global_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.Config (*internet.TransportConfig)(nil), // 1: xray.transport.internet.TransportConfig } @@ -128,7 +128,7 @@ func file_transport_global_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_global_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_global_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/config.pb.go b/transport/internet/config.pb.go index f0fe1ea5..6c71bcc3 100644 --- a/transport/internet/config.pb.go +++ b/transport/internet/config.pb.go @@ -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: transport/internet/config.proto @@ -863,7 +863,7 @@ func file_transport_internet_config_proto_rawDescGZIP() []byte { var file_transport_internet_config_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_transport_internet_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_transport_internet_config_proto_goTypes = []interface{}{ +var file_transport_internet_config_proto_goTypes = []any{ (TransportProtocol)(0), // 0: xray.transport.internet.TransportProtocol (DomainStrategy)(0), // 1: xray.transport.internet.DomainStrategy (SocketConfig_TProxyMode)(0), // 2: xray.transport.internet.SocketConfig.TProxyMode @@ -897,7 +897,7 @@ func file_transport_internet_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TransportConfig); i { case 0: return &v.state @@ -909,7 +909,7 @@ func file_transport_internet_config_proto_init() { return nil } } - file_transport_internet_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*StreamConfig); i { case 0: return &v.state @@ -921,7 +921,7 @@ func file_transport_internet_config_proto_init() { return nil } } - file_transport_internet_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ProxyConfig); i { case 0: return &v.state @@ -933,7 +933,7 @@ func file_transport_internet_config_proto_init() { return nil } } - file_transport_internet_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*CustomSockopt); i { case 0: return &v.state @@ -945,7 +945,7 @@ func file_transport_internet_config_proto_init() { return nil } } - file_transport_internet_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_config_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*SocketConfig); i { case 0: return &v.state diff --git a/transport/internet/domainsocket/config.pb.go b/transport/internet/domainsocket/config.pb.go index cc33be07..dc9f5371 100644 --- a/transport/internet/domainsocket/config.pb.go +++ b/transport/internet/domainsocket/config.pb.go @@ -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: transport/internet/domainsocket/config.proto @@ -129,7 +129,7 @@ func file_transport_internet_domainsocket_config_proto_rawDescGZIP() []byte { } var file_transport_internet_domainsocket_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_domainsocket_config_proto_goTypes = []interface{}{ +var file_transport_internet_domainsocket_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.domainsocket.Config } var file_transport_internet_domainsocket_config_proto_depIdxs = []int32{ @@ -146,7 +146,7 @@ func file_transport_internet_domainsocket_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_domainsocket_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_domainsocket_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/grpc/config.pb.go b/transport/internet/grpc/config.pb.go index a0996e57..b86858e3 100644 --- a/transport/internet/grpc/config.pb.go +++ b/transport/internet/grpc/config.pb.go @@ -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: transport/internet/grpc/config.proto @@ -170,7 +170,7 @@ func file_transport_internet_grpc_config_proto_rawDescGZIP() []byte { } var file_transport_internet_grpc_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_grpc_config_proto_goTypes = []interface{}{ +var file_transport_internet_grpc_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.grpc.encoding.Config } var file_transport_internet_grpc_config_proto_depIdxs = []int32{ @@ -187,7 +187,7 @@ func file_transport_internet_grpc_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_grpc_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_grpc_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/grpc/encoding/customSeviceName.go b/transport/internet/grpc/encoding/customSeviceName.go index dd990755..3b136fd3 100644 --- a/transport/internet/grpc/encoding/customSeviceName.go +++ b/transport/internet/grpc/encoding/customSeviceName.go @@ -34,7 +34,7 @@ func (c *gRPCServiceClient) TunCustomName(ctx context.Context, name, tun string, if err != nil { return nil, err } - x := &gRPCServiceTunClient{stream} + x := &grpc.GenericClientStream[Hunk, Hunk]{ClientStream: stream} return x, nil } @@ -43,7 +43,7 @@ func (c *gRPCServiceClient) TunMultiCustomName(ctx context.Context, name, tunMul if err != nil { return nil, err } - x := &gRPCServiceTunMultiClient{stream} + x := &grpc.GenericClientStream[MultiHunk, MultiHunk]{ClientStream: stream} return x, nil } diff --git a/transport/internet/grpc/encoding/stream.pb.go b/transport/internet/grpc/encoding/stream.pb.go index 519adb7e..3c872f9b 100644 --- a/transport/internet/grpc/encoding/stream.pb.go +++ b/transport/internet/grpc/encoding/stream.pb.go @@ -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: transport/internet/grpc/encoding/stream.proto @@ -161,7 +161,7 @@ func file_transport_internet_grpc_encoding_stream_proto_rawDescGZIP() []byte { } var file_transport_internet_grpc_encoding_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_transport_internet_grpc_encoding_stream_proto_goTypes = []interface{}{ +var file_transport_internet_grpc_encoding_stream_proto_goTypes = []any{ (*Hunk)(nil), // 0: xray.transport.internet.grpc.encoding.Hunk (*MultiHunk)(nil), // 1: xray.transport.internet.grpc.encoding.MultiHunk } @@ -183,7 +183,7 @@ func file_transport_internet_grpc_encoding_stream_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_grpc_encoding_stream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_grpc_encoding_stream_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Hunk); i { case 0: return &v.state @@ -195,7 +195,7 @@ func file_transport_internet_grpc_encoding_stream_proto_init() { return nil } } - file_transport_internet_grpc_encoding_stream_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_grpc_encoding_stream_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*MultiHunk); i { case 0: return &v.state diff --git a/transport/internet/grpc/encoding/stream_grpc.pb.go b/transport/internet/grpc/encoding/stream_grpc.pb.go index 5daf42a6..d96d7490 100644 --- a/transport/internet/grpc/encoding/stream_grpc.pb.go +++ b/transport/internet/grpc/encoding/stream_grpc.pb.go @@ -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: transport/internet/grpc/encoding/stream.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 ( GRPCService_Tun_FullMethodName = "/xray.transport.internet.grpc.encoding.GRPCService/Tun" @@ -27,8 +27,8 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type GRPCServiceClient interface { - Tun(ctx context.Context, opts ...grpc.CallOption) (GRPCService_TunClient, error) - TunMulti(ctx context.Context, opts ...grpc.CallOption) (GRPCService_TunMultiClient, error) + Tun(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Hunk, Hunk], error) + TunMulti(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[MultiHunk, MultiHunk], error) } type gRPCServiceClient struct { @@ -39,88 +39,56 @@ func NewGRPCServiceClient(cc grpc.ClientConnInterface) GRPCServiceClient { return &gRPCServiceClient{cc} } -func (c *gRPCServiceClient) Tun(ctx context.Context, opts ...grpc.CallOption) (GRPCService_TunClient, error) { - stream, err := c.cc.NewStream(ctx, &GRPCService_ServiceDesc.Streams[0], GRPCService_Tun_FullMethodName, opts...) +func (c *gRPCServiceClient) Tun(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Hunk, Hunk], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GRPCService_ServiceDesc.Streams[0], GRPCService_Tun_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &gRPCServiceTunClient{stream} + x := &grpc.GenericClientStream[Hunk, Hunk]{ClientStream: stream} return x, nil } -type GRPCService_TunClient interface { - Send(*Hunk) error - Recv() (*Hunk, error) - grpc.ClientStream -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GRPCService_TunClient = grpc.BidiStreamingClient[Hunk, Hunk] -type gRPCServiceTunClient struct { - grpc.ClientStream -} - -func (x *gRPCServiceTunClient) Send(m *Hunk) error { - return x.ClientStream.SendMsg(m) -} - -func (x *gRPCServiceTunClient) Recv() (*Hunk, error) { - m := new(Hunk) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *gRPCServiceClient) TunMulti(ctx context.Context, opts ...grpc.CallOption) (GRPCService_TunMultiClient, error) { - stream, err := c.cc.NewStream(ctx, &GRPCService_ServiceDesc.Streams[1], GRPCService_TunMulti_FullMethodName, opts...) +func (c *gRPCServiceClient) TunMulti(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[MultiHunk, MultiHunk], error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + stream, err := c.cc.NewStream(ctx, &GRPCService_ServiceDesc.Streams[1], GRPCService_TunMulti_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &gRPCServiceTunMultiClient{stream} + x := &grpc.GenericClientStream[MultiHunk, MultiHunk]{ClientStream: stream} return x, nil } -type GRPCService_TunMultiClient interface { - Send(*MultiHunk) error - Recv() (*MultiHunk, error) - grpc.ClientStream -} - -type gRPCServiceTunMultiClient struct { - grpc.ClientStream -} - -func (x *gRPCServiceTunMultiClient) Send(m *MultiHunk) error { - return x.ClientStream.SendMsg(m) -} - -func (x *gRPCServiceTunMultiClient) Recv() (*MultiHunk, error) { - m := new(MultiHunk) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GRPCService_TunMultiClient = grpc.BidiStreamingClient[MultiHunk, MultiHunk] // GRPCServiceServer is the server API for GRPCService service. // All implementations must embed UnimplementedGRPCServiceServer -// for forward compatibility +// for forward compatibility. type GRPCServiceServer interface { - Tun(GRPCService_TunServer) error - TunMulti(GRPCService_TunMultiServer) error + Tun(grpc.BidiStreamingServer[Hunk, Hunk]) error + TunMulti(grpc.BidiStreamingServer[MultiHunk, MultiHunk]) error mustEmbedUnimplementedGRPCServiceServer() } -// UnimplementedGRPCServiceServer must be embedded to have forward compatible implementations. -type UnimplementedGRPCServiceServer struct { -} +// UnimplementedGRPCServiceServer 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 UnimplementedGRPCServiceServer struct{} -func (UnimplementedGRPCServiceServer) Tun(GRPCService_TunServer) error { +func (UnimplementedGRPCServiceServer) Tun(grpc.BidiStreamingServer[Hunk, Hunk]) error { return status.Errorf(codes.Unimplemented, "method Tun not implemented") } -func (UnimplementedGRPCServiceServer) TunMulti(GRPCService_TunMultiServer) error { +func (UnimplementedGRPCServiceServer) TunMulti(grpc.BidiStreamingServer[MultiHunk, MultiHunk]) error { return status.Errorf(codes.Unimplemented, "method TunMulti not implemented") } func (UnimplementedGRPCServiceServer) mustEmbedUnimplementedGRPCServiceServer() {} +func (UnimplementedGRPCServiceServer) testEmbeddedByValue() {} // UnsafeGRPCServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GRPCServiceServer will @@ -130,60 +98,29 @@ type UnsafeGRPCServiceServer interface { } func RegisterGRPCServiceServer(s grpc.ServiceRegistrar, srv GRPCServiceServer) { + // If the following call pancis, it indicates UnimplementedGRPCServiceServer 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(&GRPCService_ServiceDesc, srv) } func _GRPCService_Tun_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(GRPCServiceServer).Tun(&gRPCServiceTunServer{stream}) + return srv.(GRPCServiceServer).Tun(&grpc.GenericServerStream[Hunk, Hunk]{ServerStream: stream}) } -type GRPCService_TunServer interface { - Send(*Hunk) error - Recv() (*Hunk, error) - grpc.ServerStream -} - -type gRPCServiceTunServer struct { - grpc.ServerStream -} - -func (x *gRPCServiceTunServer) Send(m *Hunk) error { - return x.ServerStream.SendMsg(m) -} - -func (x *gRPCServiceTunServer) Recv() (*Hunk, error) { - m := new(Hunk) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GRPCService_TunServer = grpc.BidiStreamingServer[Hunk, Hunk] func _GRPCService_TunMulti_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(GRPCServiceServer).TunMulti(&gRPCServiceTunMultiServer{stream}) + return srv.(GRPCServiceServer).TunMulti(&grpc.GenericServerStream[MultiHunk, MultiHunk]{ServerStream: stream}) } -type GRPCService_TunMultiServer interface { - Send(*MultiHunk) error - Recv() (*MultiHunk, error) - grpc.ServerStream -} - -type gRPCServiceTunMultiServer struct { - grpc.ServerStream -} - -func (x *gRPCServiceTunMultiServer) Send(m *MultiHunk) error { - return x.ServerStream.SendMsg(m) -} - -func (x *gRPCServiceTunMultiServer) Recv() (*MultiHunk, error) { - m := new(MultiHunk) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type GRPCService_TunMultiServer = grpc.BidiStreamingServer[MultiHunk, MultiHunk] // GRPCService_ServiceDesc is the grpc.ServiceDesc for GRPCService service. // It's only intended for direct use with grpc.RegisterService, diff --git a/transport/internet/headers/dns/config.pb.go b/transport/internet/headers/dns/config.pb.go index 78e5e99b..137f7676 100644 --- a/transport/internet/headers/dns/config.pb.go +++ b/transport/internet/headers/dns/config.pb.go @@ -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: transport/internet/headers/dns/config.proto @@ -102,7 +102,7 @@ func file_transport_internet_headers_dns_config_proto_rawDescGZIP() []byte { } var file_transport_internet_headers_dns_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_headers_dns_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_dns_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.headers.dns.Config } var file_transport_internet_headers_dns_config_proto_depIdxs = []int32{ @@ -119,7 +119,7 @@ func file_transport_internet_headers_dns_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_headers_dns_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_dns_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/headers/http/config.pb.go b/transport/internet/headers/http/config.pb.go index 73fa04c2..0dbaa753 100644 --- a/transport/internet/headers/http/config.pb.go +++ b/transport/internet/headers/http/config.pb.go @@ -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: transport/internet/headers/http/config.proto @@ -512,7 +512,7 @@ func file_transport_internet_headers_http_config_proto_rawDescGZIP() []byte { } var file_transport_internet_headers_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_transport_internet_headers_http_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_http_config_proto_goTypes = []any{ (*Header)(nil), // 0: xray.transport.internet.headers.http.Header (*Version)(nil), // 1: xray.transport.internet.headers.http.Version (*Method)(nil), // 2: xray.transport.internet.headers.http.Method @@ -543,7 +543,7 @@ func file_transport_internet_headers_http_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_headers_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Header); i { case 0: return &v.state @@ -555,7 +555,7 @@ func file_transport_internet_headers_http_config_proto_init() { return nil } } - file_transport_internet_headers_http_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Version); i { case 0: return &v.state @@ -567,7 +567,7 @@ func file_transport_internet_headers_http_config_proto_init() { return nil } } - file_transport_internet_headers_http_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Method); i { case 0: return &v.state @@ -579,7 +579,7 @@ func file_transport_internet_headers_http_config_proto_init() { return nil } } - file_transport_internet_headers_http_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*RequestConfig); i { case 0: return &v.state @@ -591,7 +591,7 @@ func file_transport_internet_headers_http_config_proto_init() { return nil } } - file_transport_internet_headers_http_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Status); i { case 0: return &v.state @@ -603,7 +603,7 @@ func file_transport_internet_headers_http_config_proto_init() { return nil } } - file_transport_internet_headers_http_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ResponseConfig); i { case 0: return &v.state @@ -615,7 +615,7 @@ func file_transport_internet_headers_http_config_proto_init() { return nil } } - file_transport_internet_headers_http_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_http_config_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/headers/noop/config.pb.go b/transport/internet/headers/noop/config.pb.go index 844c3f2b..e750b66e 100644 --- a/transport/internet/headers/noop/config.pb.go +++ b/transport/internet/headers/noop/config.pb.go @@ -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: transport/internet/headers/noop/config.proto @@ -131,7 +131,7 @@ func file_transport_internet_headers_noop_config_proto_rawDescGZIP() []byte { } var file_transport_internet_headers_noop_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_transport_internet_headers_noop_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_noop_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.headers.noop.Config (*ConnectionConfig)(nil), // 1: xray.transport.internet.headers.noop.ConnectionConfig } @@ -149,7 +149,7 @@ func file_transport_internet_headers_noop_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_headers_noop_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_noop_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state @@ -161,7 +161,7 @@ func file_transport_internet_headers_noop_config_proto_init() { return nil } } - file_transport_internet_headers_noop_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_noop_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ConnectionConfig); i { case 0: return &v.state diff --git a/transport/internet/headers/srtp/config.pb.go b/transport/internet/headers/srtp/config.pb.go index f0bff8f4..5c77a15c 100644 --- a/transport/internet/headers/srtp/config.pb.go +++ b/transport/internet/headers/srtp/config.pb.go @@ -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: transport/internet/headers/srtp/config.proto @@ -152,7 +152,7 @@ func file_transport_internet_headers_srtp_config_proto_rawDescGZIP() []byte { } var file_transport_internet_headers_srtp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_headers_srtp_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_srtp_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.headers.srtp.Config } var file_transport_internet_headers_srtp_config_proto_depIdxs = []int32{ @@ -169,7 +169,7 @@ func file_transport_internet_headers_srtp_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_headers_srtp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_srtp_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/headers/tls/config.pb.go b/transport/internet/headers/tls/config.pb.go index 3c4786ce..f5564c4e 100644 --- a/transport/internet/headers/tls/config.pb.go +++ b/transport/internet/headers/tls/config.pb.go @@ -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: transport/internet/headers/tls/config.proto @@ -92,7 +92,7 @@ func file_transport_internet_headers_tls_config_proto_rawDescGZIP() []byte { } var file_transport_internet_headers_tls_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_headers_tls_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_tls_config_proto_goTypes = []any{ (*PacketConfig)(nil), // 0: xray.transport.internet.headers.tls.PacketConfig } var file_transport_internet_headers_tls_config_proto_depIdxs = []int32{ @@ -109,7 +109,7 @@ func file_transport_internet_headers_tls_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_headers_tls_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_tls_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PacketConfig); i { case 0: return &v.state diff --git a/transport/internet/headers/utp/config.pb.go b/transport/internet/headers/utp/config.pb.go index ed047880..913dc318 100644 --- a/transport/internet/headers/utp/config.pb.go +++ b/transport/internet/headers/utp/config.pb.go @@ -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: transport/internet/headers/utp/config.proto @@ -102,7 +102,7 @@ func file_transport_internet_headers_utp_config_proto_rawDescGZIP() []byte { } var file_transport_internet_headers_utp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_headers_utp_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_utp_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.headers.utp.Config } var file_transport_internet_headers_utp_config_proto_depIdxs = []int32{ @@ -119,7 +119,7 @@ func file_transport_internet_headers_utp_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_headers_utp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_utp_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/headers/wechat/config.pb.go b/transport/internet/headers/wechat/config.pb.go index 39611810..65384f4a 100644 --- a/transport/internet/headers/wechat/config.pb.go +++ b/transport/internet/headers/wechat/config.pb.go @@ -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: transport/internet/headers/wechat/config.proto @@ -93,7 +93,7 @@ func file_transport_internet_headers_wechat_config_proto_rawDescGZIP() []byte { } var file_transport_internet_headers_wechat_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_headers_wechat_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_wechat_config_proto_goTypes = []any{ (*VideoConfig)(nil), // 0: xray.transport.internet.headers.wechat.VideoConfig } var file_transport_internet_headers_wechat_config_proto_depIdxs = []int32{ @@ -110,7 +110,7 @@ func file_transport_internet_headers_wechat_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_headers_wechat_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_wechat_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*VideoConfig); i { case 0: return &v.state diff --git a/transport/internet/headers/wireguard/config.pb.go b/transport/internet/headers/wireguard/config.pb.go index 2212c69e..ca459bfa 100644 --- a/transport/internet/headers/wireguard/config.pb.go +++ b/transport/internet/headers/wireguard/config.pb.go @@ -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: transport/internet/headers/wireguard/config.proto @@ -94,7 +94,7 @@ func file_transport_internet_headers_wireguard_config_proto_rawDescGZIP() []byte } var file_transport_internet_headers_wireguard_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_headers_wireguard_config_proto_goTypes = []interface{}{ +var file_transport_internet_headers_wireguard_config_proto_goTypes = []any{ (*WireguardConfig)(nil), // 0: xray.transport.internet.headers.wireguard.WireguardConfig } var file_transport_internet_headers_wireguard_config_proto_depIdxs = []int32{ @@ -111,7 +111,7 @@ func file_transport_internet_headers_wireguard_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_headers_wireguard_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_headers_wireguard_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*WireguardConfig); i { case 0: return &v.state diff --git a/transport/internet/http/config.pb.go b/transport/internet/http/config.pb.go index d0f7e632..fcd4f77e 100644 --- a/transport/internet/http/config.pb.go +++ b/transport/internet/http/config.pb.go @@ -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: transport/internet/http/config.proto @@ -156,7 +156,7 @@ func file_transport_internet_http_config_proto_rawDescGZIP() []byte { } var file_transport_internet_http_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_http_config_proto_goTypes = []interface{}{ +var file_transport_internet_http_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.http.Config (*http.Header)(nil), // 1: xray.transport.internet.headers.http.Header } @@ -175,7 +175,7 @@ func file_transport_internet_http_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_http_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_http_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/httpupgrade/config.pb.go b/transport/internet/httpupgrade/config.pb.go index 9c0a4dee..be06ce79 100644 --- a/transport/internet/httpupgrade/config.pb.go +++ b/transport/internet/httpupgrade/config.pb.go @@ -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: transport/internet/httpupgrade/config.proto @@ -148,7 +148,7 @@ func file_transport_internet_httpupgrade_config_proto_rawDescGZIP() []byte { } var file_transport_internet_httpupgrade_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_transport_internet_httpupgrade_config_proto_goTypes = []interface{}{ +var file_transport_internet_httpupgrade_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.httpupgrade.Config nil, // 1: xray.transport.internet.httpupgrade.Config.HeaderEntry } @@ -167,7 +167,7 @@ func file_transport_internet_httpupgrade_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_httpupgrade_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_httpupgrade_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/kcp/config.pb.go b/transport/internet/kcp/config.pb.go index d4273da5..ff711185 100644 --- a/transport/internet/kcp/config.pb.go +++ b/transport/internet/kcp/config.pb.go @@ -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: transport/internet/kcp/config.proto @@ -604,7 +604,7 @@ func file_transport_internet_kcp_config_proto_rawDescGZIP() []byte { } var file_transport_internet_kcp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_transport_internet_kcp_config_proto_goTypes = []interface{}{ +var file_transport_internet_kcp_config_proto_goTypes = []any{ (*MTU)(nil), // 0: xray.transport.internet.kcp.MTU (*TTI)(nil), // 1: xray.transport.internet.kcp.TTI (*UplinkCapacity)(nil), // 2: xray.transport.internet.kcp.UplinkCapacity @@ -638,7 +638,7 @@ func file_transport_internet_kcp_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_kcp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*MTU); i { case 0: return &v.state @@ -650,7 +650,7 @@ func file_transport_internet_kcp_config_proto_init() { return nil } } - file_transport_internet_kcp_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*TTI); i { case 0: return &v.state @@ -662,7 +662,7 @@ func file_transport_internet_kcp_config_proto_init() { return nil } } - file_transport_internet_kcp_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*UplinkCapacity); i { case 0: return &v.state @@ -674,7 +674,7 @@ func file_transport_internet_kcp_config_proto_init() { return nil } } - file_transport_internet_kcp_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*DownlinkCapacity); i { case 0: return &v.state @@ -686,7 +686,7 @@ func file_transport_internet_kcp_config_proto_init() { return nil } } - file_transport_internet_kcp_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*WriteBuffer); i { case 0: return &v.state @@ -698,7 +698,7 @@ func file_transport_internet_kcp_config_proto_init() { return nil } } - file_transport_internet_kcp_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ReadBuffer); i { case 0: return &v.state @@ -710,7 +710,7 @@ func file_transport_internet_kcp_config_proto_init() { return nil } } - file_transport_internet_kcp_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*ConnectionReuse); i { case 0: return &v.state @@ -722,7 +722,7 @@ func file_transport_internet_kcp_config_proto_init() { return nil } } - file_transport_internet_kcp_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*EncryptionSeed); i { case 0: return &v.state @@ -734,7 +734,7 @@ func file_transport_internet_kcp_config_proto_init() { return nil } } - file_transport_internet_kcp_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_kcp_config_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/quic/config.pb.go b/transport/internet/quic/config.pb.go index 0a387a10..992cbdf2 100644 --- a/transport/internet/quic/config.pb.go +++ b/transport/internet/quic/config.pb.go @@ -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: transport/internet/quic/config.proto @@ -129,7 +129,7 @@ func file_transport_internet_quic_config_proto_rawDescGZIP() []byte { } var file_transport_internet_quic_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_quic_config_proto_goTypes = []interface{}{ +var file_transport_internet_quic_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.quic.Config (*protocol.SecurityConfig)(nil), // 1: xray.common.protocol.SecurityConfig (*serial.TypedMessage)(nil), // 2: xray.common.serial.TypedMessage @@ -150,7 +150,7 @@ func file_transport_internet_quic_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_quic_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_quic_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/reality/config.pb.go b/transport/internet/reality/config.pb.go index 99dec214..06d314d4 100644 --- a/transport/internet/reality/config.pb.go +++ b/transport/internet/reality/config.pb.go @@ -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: transport/internet/reality/config.proto @@ -259,7 +259,7 @@ func file_transport_internet_reality_config_proto_rawDescGZIP() []byte { } var file_transport_internet_reality_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_reality_config_proto_goTypes = []interface{}{ +var file_transport_internet_reality_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.reality.Config } var file_transport_internet_reality_config_proto_depIdxs = []int32{ @@ -276,7 +276,7 @@ func file_transport_internet_reality_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_reality_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_reality_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/splithttp/config.pb.go b/transport/internet/splithttp/config.pb.go index 26dbb0b7..24768490 100644 --- a/transport/internet/splithttp/config.pb.go +++ b/transport/internet/splithttp/config.pb.go @@ -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: transport/internet/splithttp/config.proto @@ -185,7 +185,7 @@ var file_transport_internet_splithttp_config_proto_rawDesc = []byte{ 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x68, 0x74, 0x74, 0x70, 0x22, 0xec, + 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x68, 0x74, 0x74, 0x70, 0x22, 0xea, 0x04, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, @@ -215,29 +215,29 @@ var file_transport_internet_splithttp_config_proto_rawDesc = []byte{ 0x73, 0x63, 0x4d, 0x69, 0x6e, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x6f, 0x53, 0x53, 0x45, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6e, 0x6f, 0x53, 0x53, 0x45, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x0e, 0x78, 0x50, 0x61, 0x64, 0x64, 0x69, - 0x6e, 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, - 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x68, 0x74, - 0x74, 0x70, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x0e, 0x78, 0x50, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x1a, 0x39, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x35, 0x0a, - 0x0f, 0x52, 0x61, 0x6e, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x02, 0x74, 0x6f, 0x42, 0x85, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, - 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, - 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, - 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x73, - 0x70, 0x6c, 0x69, 0x74, 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02, 0x21, 0x58, 0x72, 0x61, 0x79, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x48, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0d, 0x78, 0x50, 0x61, 0x64, 0x64, 0x69, + 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, + 0x78, 0x72, 0x61, 0x79, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0d, 0x78, 0x50, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x1a, 0x39, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x35, 0x0a, 0x0f, 0x52, + 0x61, 0x6e, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, + 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x66, 0x72, + 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, + 0x74, 0x6f, 0x42, 0x85, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x2e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x36, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, + 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x70, 0x6c, + 0x69, 0x74, 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02, 0x21, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x48, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -253,7 +253,7 @@ func file_transport_internet_splithttp_config_proto_rawDescGZIP() []byte { } var file_transport_internet_splithttp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_transport_internet_splithttp_config_proto_goTypes = []interface{}{ +var file_transport_internet_splithttp_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.splithttp.Config (*RandRangeConfig)(nil), // 1: xray.transport.internet.splithttp.RandRangeConfig nil, // 2: xray.transport.internet.splithttp.Config.HeaderEntry @@ -277,7 +277,7 @@ func file_transport_internet_splithttp_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_splithttp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_splithttp_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state @@ -289,7 +289,7 @@ func file_transport_internet_splithttp_config_proto_init() { return nil } } - file_transport_internet_splithttp_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_splithttp_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*RandRangeConfig); i { case 0: return &v.state diff --git a/transport/internet/tcp/config.pb.go b/transport/internet/tcp/config.pb.go index e06c481b..df7d3ad1 100644 --- a/transport/internet/tcp/config.pb.go +++ b/transport/internet/tcp/config.pb.go @@ -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: transport/internet/tcp/config.proto @@ -118,7 +118,7 @@ func file_transport_internet_tcp_config_proto_rawDescGZIP() []byte { } var file_transport_internet_tcp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_tcp_config_proto_goTypes = []interface{}{ +var file_transport_internet_tcp_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.tcp.Config (*serial.TypedMessage)(nil), // 1: xray.common.serial.TypedMessage } @@ -137,7 +137,7 @@ func file_transport_internet_tcp_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_tcp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_tcp_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/tls/config.pb.go b/transport/internet/tls/config.pb.go index 3ba1893d..c141c375 100644 --- a/transport/internet/tls/config.pb.go +++ b/transport/internet/tls/config.pb.go @@ -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: transport/internet/tls/config.proto @@ -463,7 +463,7 @@ func file_transport_internet_tls_config_proto_rawDescGZIP() []byte { var file_transport_internet_tls_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_transport_internet_tls_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_transport_internet_tls_config_proto_goTypes = []interface{}{ +var file_transport_internet_tls_config_proto_goTypes = []any{ (Certificate_Usage)(0), // 0: xray.transport.internet.tls.Certificate.Usage (*Certificate)(nil), // 1: xray.transport.internet.tls.Certificate (*Config)(nil), // 2: xray.transport.internet.tls.Config @@ -484,7 +484,7 @@ func file_transport_internet_tls_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_tls_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_tls_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Certificate); i { case 0: return &v.state @@ -496,7 +496,7 @@ func file_transport_internet_tls_config_proto_init() { return nil } } - file_transport_internet_tls_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_tls_config_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/udp/config.pb.go b/transport/internet/udp/config.pb.go index 760e230c..12c10070 100644 --- a/transport/internet/udp/config.pb.go +++ b/transport/internet/udp/config.pb.go @@ -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: transport/internet/udp/config.proto @@ -89,7 +89,7 @@ func file_transport_internet_udp_config_proto_rawDescGZIP() []byte { } var file_transport_internet_udp_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_transport_internet_udp_config_proto_goTypes = []interface{}{ +var file_transport_internet_udp_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.udp.Config } var file_transport_internet_udp_config_proto_depIdxs = []int32{ @@ -106,7 +106,7 @@ func file_transport_internet_udp_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_udp_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_udp_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state diff --git a/transport/internet/websocket/config.pb.go b/transport/internet/websocket/config.pb.go index 9631e7e9..3b1103f7 100644 --- a/transport/internet/websocket/config.pb.go +++ b/transport/internet/websocket/config.pb.go @@ -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: transport/internet/websocket/config.proto @@ -147,7 +147,7 @@ func file_transport_internet_websocket_config_proto_rawDescGZIP() []byte { } var file_transport_internet_websocket_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_transport_internet_websocket_config_proto_goTypes = []interface{}{ +var file_transport_internet_websocket_config_proto_goTypes = []any{ (*Config)(nil), // 0: xray.transport.internet.websocket.Config nil, // 1: xray.transport.internet.websocket.Config.HeaderEntry } @@ -166,7 +166,7 @@ func file_transport_internet_websocket_config_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_transport_internet_websocket_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_transport_internet_websocket_config_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Config); i { case 0: return &v.state