mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-30 05:55:20 -05:00
Add ChaCha20 in Shadowsocks
This commit is contained in:
@@ -35,6 +35,14 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
||||
this.Cipher = &AesCfb{
|
||||
KeyBytes: 16,
|
||||
}
|
||||
case "chacha20":
|
||||
this.Cipher = &ChaCha20{
|
||||
IVBytes: 8,
|
||||
}
|
||||
case "chacha20-ietf":
|
||||
this.Cipher = &ChaCha20{
|
||||
IVBytes: 12,
|
||||
}
|
||||
default:
|
||||
log.Error("Shadowsocks: Unknown cipher method: ", jsonConfig.Cipher)
|
||||
return internal.ErrorBadConfiguration
|
||||
|
||||
Reference in New Issue
Block a user