address.pb.go 5.7 KB

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