1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00

add aead cipher

This commit is contained in:
Darien Raymond 2017-04-05 22:55:26 +02:00
parent a3042583e8
commit dff0230034
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
2 changed files with 53 additions and 39 deletions

View File

@ -20,11 +20,14 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type CipherType int32
const (
CipherType_UNKNOWN CipherType = 0
CipherType_AES_128_CFB CipherType = 1
CipherType_AES_256_CFB CipherType = 2
CipherType_CHACHA20 CipherType = 3
CipherType_CHACHA20_IETF CipherType = 4
CipherType_UNKNOWN CipherType = 0
CipherType_AES_128_CFB CipherType = 1
CipherType_AES_256_CFB CipherType = 2
CipherType_CHACHA20 CipherType = 3
CipherType_CHACHA20_IETF CipherType = 4
CipherType_AES_128_GCM CipherType = 5
CipherType_AES_256_GCM CipherType = 6
CipherType_CHACHA20_POLY1305 CipherType = 7
)
var CipherType_name = map[int32]string{
@ -33,13 +36,19 @@ var CipherType_name = map[int32]string{
2: "AES_256_CFB",
3: "CHACHA20",
4: "CHACHA20_IETF",
5: "AES_128_GCM",
6: "AES_256_GCM",
7: "CHACHA20_POLY1305",
}
var CipherType_value = map[string]int32{
"UNKNOWN": 0,
"AES_128_CFB": 1,
"AES_256_CFB": 2,
"CHACHA20": 3,
"CHACHA20_IETF": 4,
"UNKNOWN": 0,
"AES_128_CFB": 1,
"AES_256_CFB": 2,
"CHACHA20": 3,
"CHACHA20_IETF": 4,
"AES_128_GCM": 5,
"AES_256_GCM": 6,
"CHACHA20_POLY1305": 7,
}
func (x CipherType) String() string {
@ -154,33 +163,35 @@ func init() {
func init() { proto.RegisterFile("v2ray.com/core/proxy/shadowsocks/config.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 442 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x4f, 0x6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,
0xc9, 0x0b, 0x78, 0xba, 0x9b, 0xa2, 0xeb, 0xd9, 0xea, 0xd2, 0xe9, 0x4d, 0x17, 0xe0, 0x72, 0xcc,
0x5a, 0xff, 0xc4, 0xc2, 0xfa, 0x6a, 0x1f, 0x8c, 0xbf, 0x3b, 0xa7, 0x9f, 0x59, 0x18, 0x57, 0x34,
0xa8, 0xd5, 0x0b, 0xa3, 0x5e, 0xee, 0x5f, 0xdf, 0x1d, 0x9b, 0x42, 0x6f, 0xfe, 0x06, 0x00, 0x00,
0xff, 0xff, 0x2b, 0x46, 0x7c, 0x1c, 0x09, 0x03, 0x00, 0x00,
// 470 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xd1, 0x8e, 0xd2, 0x40,
0x14, 0x86, 0xb7, 0x80, 0x80, 0xa7, 0xa8, 0xdd, 0x49, 0x4c, 0x08, 0xd9, 0x44, 0xc2, 0x15, 0x6e,
0xe2, 0x14, 0xba, 0xae, 0xf1, 0xb6, 0x8c, 0xac, 0xbb, 0x51, 0x81, 0x14, 0x56, 0xa3, 0x37, 0x4d,
0x77, 0x3a, 0x4a, 0x23, 0xed, 0x4c, 0x66, 0xda, 0x5d, 0xfb, 0x20, 0xbe, 0x84, 0x6f, 0xe6, 0x5b,
0x98, 0x4e, 0x81, 0x6d, 0xbc, 0x60, 0xef, 0x7a, 0x4e, 0xff, 0xff, 0xef, 0x7f, 0xbe, 0xc2, 0xab,
0x5b, 0x47, 0x06, 0x39, 0xa6, 0x3c, 0xb6, 0x29, 0x97, 0xcc, 0x16, 0x92, 0xff, 0xca, 0x6d, 0xb5,
0x0e, 0x42, 0x7e, 0xa7, 0x38, 0xfd, 0xa9, 0x6c, 0xca, 0x93, 0xef, 0xd1, 0x0f, 0x2c, 0x24, 0x4f,
0x39, 0x3a, 0xd9, 0xc9, 0x25, 0xc3, 0x5a, 0x8a, 0x2b, 0xd2, 0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 0x74, 0xc8, 0x26, 0x62, 0x49, 0xba, 0xfd, 0xcc, 0x04, 0x9a, 0x25,
0xf7, 0xae, 0xd1, 0xaf, 0x0f, 0x4d, 0xe7, 0xf4, 0x50, 0x4e, 0x59, 0x70, 0x9a, 0x84, 0x82, 0x47,
0x49, 0xea, 0x6d, 0x9d, 0xa7, 0xbf, 0x0d, 0x80, 0x7b, 0x9c, 0xc5, 0x59, 0xd7, 0xb3, 0x0f, 0xb3,
0xf9, 0x97, 0x99, 0x75, 0x84, 0x9e, 0x81, 0xe9, 0x4e, 0x97, 0xfe, 0xd8, 0x79, 0xeb, 0x93, 0x8b,
0x89, 0x65, 0xec, 0x16, 0xce, 0xf9, 0x1b, 0xbd, 0xa8, 0x15, 0x4c, 0xc8, 0xa5, 0x4b, 0x2e, 0x5d,
0x67, 0x64, 0xd5, 0xd1, 0x31, 0x3c, 0xd9, 0x4d, 0xfe, 0xd5, 0x74, 0x75, 0x61, 0x35, 0xaa, 0x11,
0xef, 0xc9, 0x27, 0xeb, 0x51, 0x35, 0xa2, 0x58, 0x34, 0xd1, 0x73, 0x38, 0xde, 0x9b, 0x16, 0xf3,
0x8f, 0x5f, 0xc7, 0x67, 0xa3, 0x73, 0xab, 0x35, 0x59, 0x40, 0x9f, 0xf2, 0xf8, 0xe0, 0x3f, 0x5c,
0x18, 0xdf, 0xcc, 0xca, 0xf8, 0xa7, 0x76, 0xf2, 0xd9, 0xf1, 0x82, 0x1c, 0x93, 0x42, 0xbd, 0xd0,
0xea, 0xe5, 0xfd, 0xeb, 0x9b, 0xa6, 0x46, 0x71, 0xf6, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x37, 0x7d,
0x8e, 0xab, 0x43, 0x03, 0x00, 0x00,
}

View File

@ -26,6 +26,9 @@ enum CipherType {
AES_256_CFB = 2;
CHACHA20 = 3;
CHACHA20_IETF = 4;
AES_128_GCM = 5;
AES_256_GCM = 6;
CHACHA20_POLY1305 = 7;
}
message ServerConfig {