headers.pb.go 7.7 KB

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