address.pb.go 6.4 KB

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