address.pb.go 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.36.11
  4. // protoc v6.33.5
  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. unsafe "unsafe"
  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. // Address of a network host. It may be either an IP address or a domain
  21. // address.
  22. type IPOrDomain struct {
  23. state protoimpl.MessageState `protogen:"open.v1"`
  24. // Types that are valid to be assigned to Address:
  25. //
  26. // *IPOrDomain_Ip
  27. // *IPOrDomain_Domain
  28. Address isIPOrDomain_Address `protobuf_oneof:"address"`
  29. unknownFields protoimpl.UnknownFields
  30. sizeCache protoimpl.SizeCache
  31. }
  32. func (x *IPOrDomain) Reset() {
  33. *x = IPOrDomain{}
  34. mi := &file_common_net_address_proto_msgTypes[0]
  35. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  36. ms.StoreMessageInfo(mi)
  37. }
  38. func (x *IPOrDomain) String() string {
  39. return protoimpl.X.MessageStringOf(x)
  40. }
  41. func (*IPOrDomain) ProtoMessage() {}
  42. func (x *IPOrDomain) ProtoReflect() protoreflect.Message {
  43. mi := &file_common_net_address_proto_msgTypes[0]
  44. if x != nil {
  45. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  46. if ms.LoadMessageInfo() == nil {
  47. ms.StoreMessageInfo(mi)
  48. }
  49. return ms
  50. }
  51. return mi.MessageOf(x)
  52. }
  53. // Deprecated: Use IPOrDomain.ProtoReflect.Descriptor instead.
  54. func (*IPOrDomain) Descriptor() ([]byte, []int) {
  55. return file_common_net_address_proto_rawDescGZIP(), []int{0}
  56. }
  57. func (x *IPOrDomain) GetAddress() isIPOrDomain_Address {
  58. if x != nil {
  59. return x.Address
  60. }
  61. return nil
  62. }
  63. func (x *IPOrDomain) GetIp() []byte {
  64. if x != nil {
  65. if x, ok := x.Address.(*IPOrDomain_Ip); ok {
  66. return x.Ip
  67. }
  68. }
  69. return nil
  70. }
  71. func (x *IPOrDomain) GetDomain() string {
  72. if x != nil {
  73. if x, ok := x.Address.(*IPOrDomain_Domain); ok {
  74. return x.Domain
  75. }
  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. const file_common_net_address_proto_rawDesc = "" +
  94. "\n" +
  95. "\x18common/net/address.proto\x12\x0fxray.common.net\"C\n" +
  96. "\n" +
  97. "IPOrDomain\x12\x10\n" +
  98. "\x02ip\x18\x01 \x01(\fH\x00R\x02ip\x12\x18\n" +
  99. "\x06domain\x18\x02 \x01(\tH\x00R\x06domainB\t\n" +
  100. "\aaddressBO\n" +
  101. "\x13com.xray.common.netP\x01Z$github.com/xtls/xray-core/common/net\xaa\x02\x0fXray.Common.Netb\x06proto3"
  102. var (
  103. file_common_net_address_proto_rawDescOnce sync.Once
  104. file_common_net_address_proto_rawDescData []byte
  105. )
  106. func file_common_net_address_proto_rawDescGZIP() []byte {
  107. file_common_net_address_proto_rawDescOnce.Do(func() {
  108. file_common_net_address_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_common_net_address_proto_rawDesc), len(file_common_net_address_proto_rawDesc)))
  109. })
  110. return file_common_net_address_proto_rawDescData
  111. }
  112. var file_common_net_address_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  113. var file_common_net_address_proto_goTypes = []any{
  114. (*IPOrDomain)(nil), // 0: xray.common.net.IPOrDomain
  115. }
  116. var file_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_common_net_address_proto_init() }
  124. func file_common_net_address_proto_init() {
  125. if File_common_net_address_proto != nil {
  126. return
  127. }
  128. file_common_net_address_proto_msgTypes[0].OneofWrappers = []any{
  129. (*IPOrDomain_Ip)(nil),
  130. (*IPOrDomain_Domain)(nil),
  131. }
  132. type x struct{}
  133. out := protoimpl.TypeBuilder{
  134. File: protoimpl.DescBuilder{
  135. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  136. RawDescriptor: unsafe.Slice(unsafe.StringData(file_common_net_address_proto_rawDesc), len(file_common_net_address_proto_rawDesc)),
  137. NumEnums: 0,
  138. NumMessages: 1,
  139. NumExtensions: 0,
  140. NumServices: 0,
  141. },
  142. GoTypes: file_common_net_address_proto_goTypes,
  143. DependencyIndexes: file_common_net_address_proto_depIdxs,
  144. MessageInfos: file_common_net_address_proto_msgTypes,
  145. }.Build()
  146. File_common_net_address_proto = out.File
  147. file_common_net_address_proto_goTypes = nil
  148. file_common_net_address_proto_depIdxs = nil
  149. }