headers.pb.go 7.9 KB

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