address.pb.go 6.2 KB

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