address.pb.go 5.9 KB

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