address.pb.go 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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
  24. // address.
  25. type IPOrDomain struct {
  26. state protoimpl.MessageState
  27. sizeCache protoimpl.SizeCache
  28. unknownFields protoimpl.UnknownFields
  29. // Types that are assignable to Address:
  30. // *IPOrDomain_Ip
  31. // *IPOrDomain_Domain
  32. Address isIPOrDomain_Address `protobuf_oneof:"address"`
  33. }
  34. func (x *IPOrDomain) Reset() {
  35. *x = IPOrDomain{}
  36. if protoimpl.UnsafeEnabled {
  37. mi := &file_common_net_address_proto_msgTypes[0]
  38. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  39. ms.StoreMessageInfo(mi)
  40. }
  41. }
  42. func (x *IPOrDomain) String() string {
  43. return protoimpl.X.MessageStringOf(x)
  44. }
  45. func (*IPOrDomain) ProtoMessage() {}
  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. // Deprecated: Use IPOrDomain.ProtoReflect.Descriptor instead.
  58. func (*IPOrDomain) Descriptor() ([]byte, []int) {
  59. return file_common_net_address_proto_rawDescGZIP(), []int{0}
  60. }
  61. func (m *IPOrDomain) GetAddress() isIPOrDomain_Address {
  62. if m != nil {
  63. return m.Address
  64. }
  65. return nil
  66. }
  67. func (x *IPOrDomain) GetIp() []byte {
  68. if x, ok := x.GetAddress().(*IPOrDomain_Ip); ok {
  69. return x.Ip
  70. }
  71. return nil
  72. }
  73. func (x *IPOrDomain) GetDomain() string {
  74. if x, ok := x.GetAddress().(*IPOrDomain_Domain); ok {
  75. return x.Domain
  76. }
  77. return ""
  78. }
  79. type isIPOrDomain_Address interface {
  80. isIPOrDomain_Address()
  81. }
  82. type IPOrDomain_Ip struct {
  83. // IP address. Must by either 4 or 16 bytes.
  84. Ip []byte `protobuf:"bytes,1,opt,name=ip,proto3,oneof"`
  85. }
  86. type IPOrDomain_Domain struct {
  87. // Domain address.
  88. Domain string `protobuf:"bytes,2,opt,name=domain,proto3,oneof"`
  89. }
  90. func (*IPOrDomain_Ip) isIPOrDomain_Address() {}
  91. func (*IPOrDomain_Domain) isIPOrDomain_Address() {}
  92. var File_common_net_address_proto protoreflect.FileDescriptor
  93. var file_common_net_address_proto_rawDesc = []byte{
  94. 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0x2f, 0x61, 0x64, 0x64,
  95. 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x32, 0x72, 0x61,
  96. 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65,
  97. 0x74, 0x22, 0x43, 0x0a, 0x0a, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12,
  98. 0x10, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x02, 0x69,
  99. 0x70, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
  100. 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x61,
  101. 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32,
  102. 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
  103. 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d,
  104. 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74,
  105. 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f,
  106. 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  107. }
  108. var (
  109. file_common_net_address_proto_rawDescOnce sync.Once
  110. file_common_net_address_proto_rawDescData = file_common_net_address_proto_rawDesc
  111. )
  112. func file_common_net_address_proto_rawDescGZIP() []byte {
  113. file_common_net_address_proto_rawDescOnce.Do(func() {
  114. file_common_net_address_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_net_address_proto_rawDescData)
  115. })
  116. return file_common_net_address_proto_rawDescData
  117. }
  118. var file_common_net_address_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  119. var file_common_net_address_proto_goTypes = []interface{}{
  120. (*IPOrDomain)(nil), // 0: v2ray.core.common.net.IPOrDomain
  121. }
  122. var file_common_net_address_proto_depIdxs = []int32{
  123. 0, // [0:0] is the sub-list for method output_type
  124. 0, // [0:0] is the sub-list for method input_type
  125. 0, // [0:0] is the sub-list for extension type_name
  126. 0, // [0:0] is the sub-list for extension extendee
  127. 0, // [0:0] is the sub-list for field type_name
  128. }
  129. func init() { file_common_net_address_proto_init() }
  130. func file_common_net_address_proto_init() {
  131. if File_common_net_address_proto != nil {
  132. return
  133. }
  134. if !protoimpl.UnsafeEnabled {
  135. file_common_net_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  136. switch v := v.(*IPOrDomain); i {
  137. case 0:
  138. return &v.state
  139. case 1:
  140. return &v.sizeCache
  141. case 2:
  142. return &v.unknownFields
  143. default:
  144. return nil
  145. }
  146. }
  147. }
  148. file_common_net_address_proto_msgTypes[0].OneofWrappers = []interface{}{
  149. (*IPOrDomain_Ip)(nil),
  150. (*IPOrDomain_Domain)(nil),
  151. }
  152. type x struct{}
  153. out := protoimpl.TypeBuilder{
  154. File: protoimpl.DescBuilder{
  155. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  156. RawDescriptor: file_common_net_address_proto_rawDesc,
  157. NumEnums: 0,
  158. NumMessages: 1,
  159. NumExtensions: 0,
  160. NumServices: 0,
  161. },
  162. GoTypes: file_common_net_address_proto_goTypes,
  163. DependencyIndexes: file_common_net_address_proto_depIdxs,
  164. MessageInfos: file_common_net_address_proto_msgTypes,
  165. }.Build()
  166. File_common_net_address_proto = out.File
  167. file_common_net_address_proto_rawDesc = nil
  168. file_common_net_address_proto_goTypes = nil
  169. file_common_net_address_proto_depIdxs = nil
  170. }