github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/common/net/address.pb.go (about)

     1  package net
     2  
     3  import (
     4  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
     5  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
     6  	reflect "reflect"
     7  	sync "sync"
     8  )
     9  
    10  const (
    11  	// Verify that this generated code is sufficiently up-to-date.
    12  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    13  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    14  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    15  )
    16  
    17  // Address of a network host. It may be either an IP address or a domain
    18  // address.
    19  type IPOrDomain struct {
    20  	state         protoimpl.MessageState
    21  	sizeCache     protoimpl.SizeCache
    22  	unknownFields protoimpl.UnknownFields
    23  
    24  	// Types that are assignable to Address:
    25  	//
    26  	//	*IPOrDomain_Ip
    27  	//	*IPOrDomain_Domain
    28  	Address isIPOrDomain_Address `protobuf_oneof:"address"`
    29  }
    30  
    31  func (x *IPOrDomain) Reset() {
    32  	*x = IPOrDomain{}
    33  	if protoimpl.UnsafeEnabled {
    34  		mi := &file_common_net_address_proto_msgTypes[0]
    35  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    36  		ms.StoreMessageInfo(mi)
    37  	}
    38  }
    39  
    40  func (x *IPOrDomain) String() string {
    41  	return protoimpl.X.MessageStringOf(x)
    42  }
    43  
    44  func (*IPOrDomain) ProtoMessage() {}
    45  
    46  func (x *IPOrDomain) ProtoReflect() protoreflect.Message {
    47  	mi := &file_common_net_address_proto_msgTypes[0]
    48  	if protoimpl.UnsafeEnabled && x != nil {
    49  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    50  		if ms.LoadMessageInfo() == nil {
    51  			ms.StoreMessageInfo(mi)
    52  		}
    53  		return ms
    54  	}
    55  	return mi.MessageOf(x)
    56  }
    57  
    58  // Deprecated: Use IPOrDomain.ProtoReflect.Descriptor instead.
    59  func (*IPOrDomain) Descriptor() ([]byte, []int) {
    60  	return file_common_net_address_proto_rawDescGZIP(), []int{0}
    61  }
    62  
    63  func (m *IPOrDomain) GetAddress() isIPOrDomain_Address {
    64  	if m != nil {
    65  		return m.Address
    66  	}
    67  	return nil
    68  }
    69  
    70  func (x *IPOrDomain) GetIp() []byte {
    71  	if x, ok := x.GetAddress().(*IPOrDomain_Ip); ok {
    72  		return x.Ip
    73  	}
    74  	return nil
    75  }
    76  
    77  func (x *IPOrDomain) GetDomain() string {
    78  	if x, ok := x.GetAddress().(*IPOrDomain_Domain); ok {
    79  		return x.Domain
    80  	}
    81  	return ""
    82  }
    83  
    84  type isIPOrDomain_Address interface {
    85  	isIPOrDomain_Address()
    86  }
    87  
    88  type IPOrDomain_Ip struct {
    89  	// IP address. Must by either 4 or 16 bytes.
    90  	Ip []byte `protobuf:"bytes,1,opt,name=ip,proto3,oneof"`
    91  }
    92  
    93  type IPOrDomain_Domain struct {
    94  	// Domain address.
    95  	Domain string `protobuf:"bytes,2,opt,name=domain,proto3,oneof"`
    96  }
    97  
    98  func (*IPOrDomain_Ip) isIPOrDomain_Address() {}
    99  
   100  func (*IPOrDomain_Domain) isIPOrDomain_Address() {}
   101  
   102  var File_common_net_address_proto protoreflect.FileDescriptor
   103  
   104  var file_common_net_address_proto_rawDesc = []byte{
   105  	0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64,
   106  	0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61,
   107  	0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65,
   108  	0x74, 0x22, 0x43, 0x0a, 0x0a, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12,
   109  	0x10, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x02, 0x69,
   110  	0x70, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
   111  	0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x61,
   112  	0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32,
   113  	0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
   114  	0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
   115  	0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f,
   116  	0x72, 0x65, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74,
   117  	0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f,
   118  	0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   119  }
   120  
   121  var (
   122  	file_common_net_address_proto_rawDescOnce sync.Once
   123  	file_common_net_address_proto_rawDescData = file_common_net_address_proto_rawDesc
   124  )
   125  
   126  func file_common_net_address_proto_rawDescGZIP() []byte {
   127  	file_common_net_address_proto_rawDescOnce.Do(func() {
   128  		file_common_net_address_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_net_address_proto_rawDescData)
   129  	})
   130  	return file_common_net_address_proto_rawDescData
   131  }
   132  
   133  var file_common_net_address_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   134  var file_common_net_address_proto_goTypes = []interface{}{
   135  	(*IPOrDomain)(nil), // 0: v2ray.core.common.net.IPOrDomain
   136  }
   137  var file_common_net_address_proto_depIdxs = []int32{
   138  	0, // [0:0] is the sub-list for method output_type
   139  	0, // [0:0] is the sub-list for method input_type
   140  	0, // [0:0] is the sub-list for extension type_name
   141  	0, // [0:0] is the sub-list for extension extendee
   142  	0, // [0:0] is the sub-list for field type_name
   143  }
   144  
   145  func init() { file_common_net_address_proto_init() }
   146  func file_common_net_address_proto_init() {
   147  	if File_common_net_address_proto != nil {
   148  		return
   149  	}
   150  	if !protoimpl.UnsafeEnabled {
   151  		file_common_net_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   152  			switch v := v.(*IPOrDomain); i {
   153  			case 0:
   154  				return &v.state
   155  			case 1:
   156  				return &v.sizeCache
   157  			case 2:
   158  				return &v.unknownFields
   159  			default:
   160  				return nil
   161  			}
   162  		}
   163  	}
   164  	file_common_net_address_proto_msgTypes[0].OneofWrappers = []interface{}{
   165  		(*IPOrDomain_Ip)(nil),
   166  		(*IPOrDomain_Domain)(nil),
   167  	}
   168  	type x struct{}
   169  	out := protoimpl.TypeBuilder{
   170  		File: protoimpl.DescBuilder{
   171  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   172  			RawDescriptor: file_common_net_address_proto_rawDesc,
   173  			NumEnums:      0,
   174  			NumMessages:   1,
   175  			NumExtensions: 0,
   176  			NumServices:   0,
   177  		},
   178  		GoTypes:           file_common_net_address_proto_goTypes,
   179  		DependencyIndexes: file_common_net_address_proto_depIdxs,
   180  		MessageInfos:      file_common_net_address_proto_msgTypes,
   181  	}.Build()
   182  	File_common_net_address_proto = out.File
   183  	file_common_net_address_proto_rawDesc = nil
   184  	file_common_net_address_proto_goTypes = nil
   185  	file_common_net_address_proto_depIdxs = nil
   186  }