headers.pb.go 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.25.0
  4. // protoc v3.14.0
  5. // source: common/protocol/headers.proto
  6. package protocol
  7. import (
  8. proto "github.com/golang/protobuf/proto"
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  11. reflect "reflect"
  12. sync "sync"
  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. // This is a compile-time assertion that a sufficiently up-to-date version
  21. // of the legacy proto package is being used.
  22. const _ = proto.ProtoPackageIsVersion4
  23. type SecurityType int32
  24. const (
  25. SecurityType_UNKNOWN SecurityType = 0
  26. SecurityType_LEGACY SecurityType = 1
  27. SecurityType_AUTO SecurityType = 2
  28. SecurityType_AES128_GCM SecurityType = 3
  29. SecurityType_CHACHA20_POLY1305 SecurityType = 4
  30. SecurityType_NONE SecurityType = 5
  31. )
  32. // Enum value maps for SecurityType.
  33. var (
  34. SecurityType_name = map[int32]string{
  35. 0: "UNKNOWN",
  36. 1: "LEGACY",
  37. 2: "AUTO",
  38. 3: "AES128_GCM",
  39. 4: "CHACHA20_POLY1305",
  40. 5: "NONE",
  41. }
  42. SecurityType_value = map[string]int32{
  43. "UNKNOWN": 0,
  44. "LEGACY": 1,
  45. "AUTO": 2,
  46. "AES128_GCM": 3,
  47. "CHACHA20_POLY1305": 4,
  48. "NONE": 5,
  49. }
  50. )
  51. func (x SecurityType) Enum() *SecurityType {
  52. p := new(SecurityType)
  53. *p = x
  54. return p
  55. }
  56. func (x SecurityType) String() string {
  57. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  58. }
  59. func (SecurityType) Descriptor() protoreflect.EnumDescriptor {
  60. return file_common_protocol_headers_proto_enumTypes[0].Descriptor()
  61. }
  62. func (SecurityType) Type() protoreflect.EnumType {
  63. return &file_common_protocol_headers_proto_enumTypes[0]
  64. }
  65. func (x SecurityType) Number() protoreflect.EnumNumber {
  66. return protoreflect.EnumNumber(x)
  67. }
  68. // Deprecated: Use SecurityType.Descriptor instead.
  69. func (SecurityType) EnumDescriptor() ([]byte, []int) {
  70. return file_common_protocol_headers_proto_rawDescGZIP(), []int{0}
  71. }
  72. type SecurityConfig struct {
  73. state protoimpl.MessageState
  74. sizeCache protoimpl.SizeCache
  75. unknownFields protoimpl.UnknownFields
  76. Type SecurityType `protobuf:"varint,1,opt,name=type,proto3,enum=xray.common.protocol.SecurityType" json:"type,omitempty"`
  77. }
  78. func (x *SecurityConfig) Reset() {
  79. *x = SecurityConfig{}
  80. if protoimpl.UnsafeEnabled {
  81. mi := &file_common_protocol_headers_proto_msgTypes[0]
  82. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  83. ms.StoreMessageInfo(mi)
  84. }
  85. }
  86. func (x *SecurityConfig) String() string {
  87. return protoimpl.X.MessageStringOf(x)
  88. }
  89. func (*SecurityConfig) ProtoMessage() {}
  90. func (x *SecurityConfig) ProtoReflect() protoreflect.Message {
  91. mi := &file_common_protocol_headers_proto_msgTypes[0]
  92. if protoimpl.UnsafeEnabled && x != nil {
  93. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  94. if ms.LoadMessageInfo() == nil {
  95. ms.StoreMessageInfo(mi)
  96. }
  97. return ms
  98. }
  99. return mi.MessageOf(x)
  100. }
  101. // Deprecated: Use SecurityConfig.ProtoReflect.Descriptor instead.
  102. func (*SecurityConfig) Descriptor() ([]byte, []int) {
  103. return file_common_protocol_headers_proto_rawDescGZIP(), []int{0}
  104. }
  105. func (x *SecurityConfig) GetType() SecurityType {
  106. if x != nil {
  107. return x.Type
  108. }
  109. return SecurityType_UNKNOWN
  110. }
  111. var File_common_protocol_headers_proto protoreflect.FileDescriptor
  112. var file_common_protocol_headers_proto_rawDesc = []byte{
  113. 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
  114. 0x6c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
  115. 0x14, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
  116. 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x48, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
  117. 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
  118. 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d,
  119. 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x63,
  120. 0x75, 0x72, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a,
  121. 0x62, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12,
  122. 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06,
  123. 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f,
  124. 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x45, 0x53, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d,
  125. 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50,
  126. 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e,
  127. 0x45, 0x10, 0x05, 0x42, 0x5e, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x72, 0x61, 0x79, 0x2e,
  128. 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50,
  129. 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x74,
  130. 0x6c, 0x73, 0x2f, 0x78, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d,
  131. 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xaa, 0x02, 0x14, 0x58,
  132. 0x72, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
  133. 0x63, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  134. }
  135. var (
  136. file_common_protocol_headers_proto_rawDescOnce sync.Once
  137. file_common_protocol_headers_proto_rawDescData = file_common_protocol_headers_proto_rawDesc
  138. )
  139. func file_common_protocol_headers_proto_rawDescGZIP() []byte {
  140. file_common_protocol_headers_proto_rawDescOnce.Do(func() {
  141. file_common_protocol_headers_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_protocol_headers_proto_rawDescData)
  142. })
  143. return file_common_protocol_headers_proto_rawDescData
  144. }
  145. var file_common_protocol_headers_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  146. var file_common_protocol_headers_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  147. var file_common_protocol_headers_proto_goTypes = []interface{}{
  148. (SecurityType)(0), // 0: xray.common.protocol.SecurityType
  149. (*SecurityConfig)(nil), // 1: xray.common.protocol.SecurityConfig
  150. }
  151. var file_common_protocol_headers_proto_depIdxs = []int32{
  152. 0, // 0: xray.common.protocol.SecurityConfig.type:type_name -> xray.common.protocol.SecurityType
  153. 1, // [1:1] is the sub-list for method output_type
  154. 1, // [1:1] is the sub-list for method input_type
  155. 1, // [1:1] is the sub-list for extension type_name
  156. 1, // [1:1] is the sub-list for extension extendee
  157. 0, // [0:1] is the sub-list for field type_name
  158. }
  159. func init() { file_common_protocol_headers_proto_init() }
  160. func file_common_protocol_headers_proto_init() {
  161. if File_common_protocol_headers_proto != nil {
  162. return
  163. }
  164. if !protoimpl.UnsafeEnabled {
  165. file_common_protocol_headers_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  166. switch v := v.(*SecurityConfig); i {
  167. case 0:
  168. return &v.state
  169. case 1:
  170. return &v.sizeCache
  171. case 2:
  172. return &v.unknownFields
  173. default:
  174. return nil
  175. }
  176. }
  177. }
  178. type x struct{}
  179. out := protoimpl.TypeBuilder{
  180. File: protoimpl.DescBuilder{
  181. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  182. RawDescriptor: file_common_protocol_headers_proto_rawDesc,
  183. NumEnums: 1,
  184. NumMessages: 1,
  185. NumExtensions: 0,
  186. NumServices: 0,
  187. },
  188. GoTypes: file_common_protocol_headers_proto_goTypes,
  189. DependencyIndexes: file_common_protocol_headers_proto_depIdxs,
  190. EnumInfos: file_common_protocol_headers_proto_enumTypes,
  191. MessageInfos: file_common_protocol_headers_proto_msgTypes,
  192. }.Build()
  193. File_common_protocol_headers_proto = out.File
  194. file_common_protocol_headers_proto_rawDesc = nil
  195. file_common_protocol_headers_proto_goTypes = nil
  196. file_common_protocol_headers_proto_depIdxs = nil
  197. }