headers.pb.go 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. package protocol
  2. import (
  3. proto "github.com/golang/protobuf/proto"
  4. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  5. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  6. reflect "reflect"
  7. sync "sync"
  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. // This is a compile-time assertion that a sufficiently up-to-date version
  16. // of the legacy proto package is being used.
  17. const _ = proto.ProtoPackageIsVersion4
  18. type SecurityType int32
  19. const (
  20. SecurityType_UNKNOWN SecurityType = 0
  21. SecurityType_LEGACY SecurityType = 1
  22. SecurityType_AUTO SecurityType = 2
  23. SecurityType_AES128_GCM SecurityType = 3
  24. SecurityType_CHACHA20_POLY1305 SecurityType = 4
  25. SecurityType_NONE SecurityType = 5
  26. )
  27. // Enum value maps for SecurityType.
  28. var (
  29. SecurityType_name = map[int32]string{
  30. 0: "UNKNOWN",
  31. 1: "LEGACY",
  32. 2: "AUTO",
  33. 3: "AES128_GCM",
  34. 4: "CHACHA20_POLY1305",
  35. 5: "NONE",
  36. }
  37. SecurityType_value = map[string]int32{
  38. "UNKNOWN": 0,
  39. "LEGACY": 1,
  40. "AUTO": 2,
  41. "AES128_GCM": 3,
  42. "CHACHA20_POLY1305": 4,
  43. "NONE": 5,
  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_v2ray_com_core_common_protocol_headers_proto_enumTypes[0].Descriptor()
  56. }
  57. func (SecurityType) Type() protoreflect.EnumType {
  58. return &file_v2ray_com_core_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_v2ray_com_core_common_protocol_headers_proto_rawDescGZIP(), []int{0}
  66. }
  67. type SecurityConfig struct {
  68. state protoimpl.MessageState
  69. sizeCache protoimpl.SizeCache
  70. unknownFields protoimpl.UnknownFields
  71. Type SecurityType `protobuf:"varint,1,opt,name=type,proto3,enum=v2ray.core.common.protocol.SecurityType" json:"type,omitempty"`
  72. }
  73. func (x *SecurityConfig) Reset() {
  74. *x = SecurityConfig{}
  75. if protoimpl.UnsafeEnabled {
  76. mi := &file_v2ray_com_core_common_protocol_headers_proto_msgTypes[0]
  77. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  78. ms.StoreMessageInfo(mi)
  79. }
  80. }
  81. func (x *SecurityConfig) String() string {
  82. return protoimpl.X.MessageStringOf(x)
  83. }
  84. func (*SecurityConfig) ProtoMessage() {}
  85. func (x *SecurityConfig) ProtoReflect() protoreflect.Message {
  86. mi := &file_v2ray_com_core_common_protocol_headers_proto_msgTypes[0]
  87. if protoimpl.UnsafeEnabled && x != nil {
  88. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  89. if ms.LoadMessageInfo() == nil {
  90. ms.StoreMessageInfo(mi)
  91. }
  92. return ms
  93. }
  94. return mi.MessageOf(x)
  95. }
  96. // Deprecated: Use SecurityConfig.ProtoReflect.Descriptor instead.
  97. func (*SecurityConfig) Descriptor() ([]byte, []int) {
  98. return file_v2ray_com_core_common_protocol_headers_proto_rawDescGZIP(), []int{0}
  99. }
  100. func (x *SecurityConfig) GetType() SecurityType {
  101. if x != nil {
  102. return x.Type
  103. }
  104. return SecurityType_UNKNOWN
  105. }
  106. var File_v2ray_com_core_common_protocol_headers_proto protoreflect.FileDescriptor
  107. var file_v2ray_com_core_common_protocol_headers_proto_rawDesc = []byte{
  108. 0x0a, 0x2c, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65,
  109. 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
  110. 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a,
  111. 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
  112. 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x4e, 0x0a, 0x0e, 0x53, 0x65,
  113. 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3c, 0x0a, 0x04,
  114. 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72,
  115. 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70,
  116. 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
  117. 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x62, 0x0a, 0x0c, 0x53, 0x65,
  118. 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e,
  119. 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x47, 0x41, 0x43,
  120. 0x59, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x02, 0x12, 0x0e, 0x0a,
  121. 0x0a, 0x41, 0x45, 0x53, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x03, 0x12, 0x15, 0x0a,
  122. 0x11, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33,
  123. 0x30, 0x35, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x05, 0x42, 0x49,
  124. 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65,
  125. 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
  126. 0x50, 0x01, 0x5a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xaa, 0x02, 0x1a, 0x56,
  127. 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
  128. 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  129. 0x33,
  130. }
  131. var (
  132. file_v2ray_com_core_common_protocol_headers_proto_rawDescOnce sync.Once
  133. file_v2ray_com_core_common_protocol_headers_proto_rawDescData = file_v2ray_com_core_common_protocol_headers_proto_rawDesc
  134. )
  135. func file_v2ray_com_core_common_protocol_headers_proto_rawDescGZIP() []byte {
  136. file_v2ray_com_core_common_protocol_headers_proto_rawDescOnce.Do(func() {
  137. file_v2ray_com_core_common_protocol_headers_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_common_protocol_headers_proto_rawDescData)
  138. })
  139. return file_v2ray_com_core_common_protocol_headers_proto_rawDescData
  140. }
  141. var file_v2ray_com_core_common_protocol_headers_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  142. var file_v2ray_com_core_common_protocol_headers_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  143. var file_v2ray_com_core_common_protocol_headers_proto_goTypes = []interface{}{
  144. (SecurityType)(0), // 0: v2ray.core.common.protocol.SecurityType
  145. (*SecurityConfig)(nil), // 1: v2ray.core.common.protocol.SecurityConfig
  146. }
  147. var file_v2ray_com_core_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_v2ray_com_core_common_protocol_headers_proto_init() }
  156. func file_v2ray_com_core_common_protocol_headers_proto_init() {
  157. if File_v2ray_com_core_common_protocol_headers_proto != nil {
  158. return
  159. }
  160. if !protoimpl.UnsafeEnabled {
  161. file_v2ray_com_core_common_protocol_headers_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  162. switch v := v.(*SecurityConfig); i {
  163. case 0:
  164. return &v.state
  165. case 1:
  166. return &v.sizeCache
  167. case 2:
  168. return &v.unknownFields
  169. default:
  170. return nil
  171. }
  172. }
  173. }
  174. type x struct{}
  175. out := protoimpl.TypeBuilder{
  176. File: protoimpl.DescBuilder{
  177. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  178. RawDescriptor: file_v2ray_com_core_common_protocol_headers_proto_rawDesc,
  179. NumEnums: 1,
  180. NumMessages: 1,
  181. NumExtensions: 0,
  182. NumServices: 0,
  183. },
  184. GoTypes: file_v2ray_com_core_common_protocol_headers_proto_goTypes,
  185. DependencyIndexes: file_v2ray_com_core_common_protocol_headers_proto_depIdxs,
  186. EnumInfos: file_v2ray_com_core_common_protocol_headers_proto_enumTypes,
  187. MessageInfos: file_v2ray_com_core_common_protocol_headers_proto_msgTypes,
  188. }.Build()
  189. File_v2ray_com_core_common_protocol_headers_proto = out.File
  190. file_v2ray_com_core_common_protocol_headers_proto_rawDesc = nil
  191. file_v2ray_com_core_common_protocol_headers_proto_goTypes = nil
  192. file_v2ray_com_core_common_protocol_headers_proto_depIdxs = nil
  193. }