destination.pb.go 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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/destination.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. // Endpoint of a network connection.
  21. type Endpoint struct {
  22. state protoimpl.MessageState `protogen:"open.v1"`
  23. Network Network `protobuf:"varint,1,opt,name=network,proto3,enum=xray.common.net.Network" json:"network,omitempty"`
  24. Address *IPOrDomain `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
  25. Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
  26. unknownFields protoimpl.UnknownFields
  27. sizeCache protoimpl.SizeCache
  28. }
  29. func (x *Endpoint) Reset() {
  30. *x = Endpoint{}
  31. mi := &file_common_net_destination_proto_msgTypes[0]
  32. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  33. ms.StoreMessageInfo(mi)
  34. }
  35. func (x *Endpoint) String() string {
  36. return protoimpl.X.MessageStringOf(x)
  37. }
  38. func (*Endpoint) ProtoMessage() {}
  39. func (x *Endpoint) ProtoReflect() protoreflect.Message {
  40. mi := &file_common_net_destination_proto_msgTypes[0]
  41. if x != nil {
  42. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  43. if ms.LoadMessageInfo() == nil {
  44. ms.StoreMessageInfo(mi)
  45. }
  46. return ms
  47. }
  48. return mi.MessageOf(x)
  49. }
  50. // Deprecated: Use Endpoint.ProtoReflect.Descriptor instead.
  51. func (*Endpoint) Descriptor() ([]byte, []int) {
  52. return file_common_net_destination_proto_rawDescGZIP(), []int{0}
  53. }
  54. func (x *Endpoint) GetNetwork() Network {
  55. if x != nil {
  56. return x.Network
  57. }
  58. return Network_Unknown
  59. }
  60. func (x *Endpoint) GetAddress() *IPOrDomain {
  61. if x != nil {
  62. return x.Address
  63. }
  64. return nil
  65. }
  66. func (x *Endpoint) GetPort() uint32 {
  67. if x != nil {
  68. return x.Port
  69. }
  70. return 0
  71. }
  72. var File_common_net_destination_proto protoreflect.FileDescriptor
  73. const file_common_net_destination_proto_rawDesc = "" +
  74. "\n" +
  75. "\x1ccommon/net/destination.proto\x12\x0fxray.common.net\x1a\x18common/net/network.proto\x1a\x18common/net/address.proto\"\x89\x01\n" +
  76. "\bEndpoint\x122\n" +
  77. "\anetwork\x18\x01 \x01(\x0e2\x18.xray.common.net.NetworkR\anetwork\x125\n" +
  78. "\aaddress\x18\x02 \x01(\v2\x1b.xray.common.net.IPOrDomainR\aaddress\x12\x12\n" +
  79. "\x04port\x18\x03 \x01(\rR\x04portBO\n" +
  80. "\x13com.xray.common.netP\x01Z$github.com/xtls/xray-core/common/net\xaa\x02\x0fXray.Common.Netb\x06proto3"
  81. var (
  82. file_common_net_destination_proto_rawDescOnce sync.Once
  83. file_common_net_destination_proto_rawDescData []byte
  84. )
  85. func file_common_net_destination_proto_rawDescGZIP() []byte {
  86. file_common_net_destination_proto_rawDescOnce.Do(func() {
  87. file_common_net_destination_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_common_net_destination_proto_rawDesc), len(file_common_net_destination_proto_rawDesc)))
  88. })
  89. return file_common_net_destination_proto_rawDescData
  90. }
  91. var file_common_net_destination_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  92. var file_common_net_destination_proto_goTypes = []any{
  93. (*Endpoint)(nil), // 0: xray.common.net.Endpoint
  94. (Network)(0), // 1: xray.common.net.Network
  95. (*IPOrDomain)(nil), // 2: xray.common.net.IPOrDomain
  96. }
  97. var file_common_net_destination_proto_depIdxs = []int32{
  98. 1, // 0: xray.common.net.Endpoint.network:type_name -> xray.common.net.Network
  99. 2, // 1: xray.common.net.Endpoint.address:type_name -> xray.common.net.IPOrDomain
  100. 2, // [2:2] is the sub-list for method output_type
  101. 2, // [2:2] is the sub-list for method input_type
  102. 2, // [2:2] is the sub-list for extension type_name
  103. 2, // [2:2] is the sub-list for extension extendee
  104. 0, // [0:2] is the sub-list for field type_name
  105. }
  106. func init() { file_common_net_destination_proto_init() }
  107. func file_common_net_destination_proto_init() {
  108. if File_common_net_destination_proto != nil {
  109. return
  110. }
  111. file_common_net_network_proto_init()
  112. file_common_net_address_proto_init()
  113. type x struct{}
  114. out := protoimpl.TypeBuilder{
  115. File: protoimpl.DescBuilder{
  116. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  117. RawDescriptor: unsafe.Slice(unsafe.StringData(file_common_net_destination_proto_rawDesc), len(file_common_net_destination_proto_rawDesc)),
  118. NumEnums: 0,
  119. NumMessages: 1,
  120. NumExtensions: 0,
  121. NumServices: 0,
  122. },
  123. GoTypes: file_common_net_destination_proto_goTypes,
  124. DependencyIndexes: file_common_net_destination_proto_depIdxs,
  125. MessageInfos: file_common_net_destination_proto_msgTypes,
  126. }.Build()
  127. File_common_net_destination_proto = out.File
  128. file_common_net_destination_proto_goTypes = nil
  129. file_common_net_destination_proto_depIdxs = nil
  130. }