address.pb.go 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.35.1
  4. // protoc v5.28.2
  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. mi := &file_common_net_address_proto_msgTypes[0]
  34. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  35. ms.StoreMessageInfo(mi)
  36. }
  37. func (x *IPOrDomain) String() string {
  38. return protoimpl.X.MessageStringOf(x)
  39. }
  40. func (*IPOrDomain) ProtoMessage() {}
  41. func (x *IPOrDomain) ProtoReflect() protoreflect.Message {
  42. mi := &file_common_net_address_proto_msgTypes[0]
  43. if x != nil {
  44. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  45. if ms.LoadMessageInfo() == nil {
  46. ms.StoreMessageInfo(mi)
  47. }
  48. return ms
  49. }
  50. return mi.MessageOf(x)
  51. }
  52. // Deprecated: Use IPOrDomain.ProtoReflect.Descriptor instead.
  53. func (*IPOrDomain) Descriptor() ([]byte, []int) {
  54. return file_common_net_address_proto_rawDescGZIP(), []int{0}
  55. }
  56. func (m *IPOrDomain) GetAddress() isIPOrDomain_Address {
  57. if m != nil {
  58. return m.Address
  59. }
  60. return nil
  61. }
  62. func (x *IPOrDomain) GetIp() []byte {
  63. if x, ok := x.GetAddress().(*IPOrDomain_Ip); ok {
  64. return x.Ip
  65. }
  66. return nil
  67. }
  68. func (x *IPOrDomain) GetDomain() string {
  69. if x, ok := x.GetAddress().(*IPOrDomain_Domain); ok {
  70. return x.Domain
  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 = []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, 0x0f, 0x78, 0x72, 0x61, 0x79,
  91. 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x22, 0x43, 0x0a, 0x0a, 0x49,
  92. 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x70, 0x18,
  93. 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x06, 0x64,
  94. 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x64,
  95. 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
  96. 0x42, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d,
  97. 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75,
  98. 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74, 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d,
  99. 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0xaa,
  100. 0x02, 0x0f, 0x58, 0x72, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65,
  101. 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  102. }
  103. var (
  104. file_common_net_address_proto_rawDescOnce sync.Once
  105. file_common_net_address_proto_rawDescData = file_common_net_address_proto_rawDesc
  106. )
  107. func file_common_net_address_proto_rawDescGZIP() []byte {
  108. file_common_net_address_proto_rawDescOnce.Do(func() {
  109. file_common_net_address_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_net_address_proto_rawDescData)
  110. })
  111. return file_common_net_address_proto_rawDescData
  112. }
  113. var file_common_net_address_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  114. var file_common_net_address_proto_goTypes = []any{
  115. (*IPOrDomain)(nil), // 0: xray.common.net.IPOrDomain
  116. }
  117. var file_common_net_address_proto_depIdxs = []int32{
  118. 0, // [0:0] is the sub-list for method output_type
  119. 0, // [0:0] is the sub-list for method input_type
  120. 0, // [0:0] is the sub-list for extension type_name
  121. 0, // [0:0] is the sub-list for extension extendee
  122. 0, // [0:0] is the sub-list for field type_name
  123. }
  124. func init() { file_common_net_address_proto_init() }
  125. func file_common_net_address_proto_init() {
  126. if File_common_net_address_proto != nil {
  127. return
  128. }
  129. file_common_net_address_proto_msgTypes[0].OneofWrappers = []any{
  130. (*IPOrDomain_Ip)(nil),
  131. (*IPOrDomain_Domain)(nil),
  132. }
  133. type x struct{}
  134. out := protoimpl.TypeBuilder{
  135. File: protoimpl.DescBuilder{
  136. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  137. RawDescriptor: file_common_net_address_proto_rawDesc,
  138. NumEnums: 0,
  139. NumMessages: 1,
  140. NumExtensions: 0,
  141. NumServices: 0,
  142. },
  143. GoTypes: file_common_net_address_proto_goTypes,
  144. DependencyIndexes: file_common_net_address_proto_depIdxs,
  145. MessageInfos: file_common_net_address_proto_msgTypes,
  146. }.Build()
  147. File_common_net_address_proto = out.File
  148. file_common_net_address_proto_rawDesc = nil
  149. file_common_net_address_proto_goTypes = nil
  150. file_common_net_address_proto_depIdxs = nil
  151. }