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 7a3509346a.

* Revert "Revert "bump protobuf packages""

This reverts commit bb79707d15.

* fix deprecated grpc usage
This commit is contained in:
mmmray 2024-08-22 16:18:36 +02:00 committed by GitHub
parent 790f908f0b
commit 2be03c56cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
77 changed files with 544 additions and 559 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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),
}

View file

@ -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

View file

@ -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)
}

View file

@ -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