github.com/xraypb/Xray-core@v1.8.1/common/protocol/headers.pb.go (about)

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