Fix: protobuf file (#724)

This commit is contained in:
hmol233 2021-09-20 22:41:09 +08:00 committed by GitHub
parent ffc2f7c4e2
commit 7033f7cf5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 81 additions and 80 deletions

View file

@ -54,7 +54,8 @@ func (v *ShadowsocksServerConfig) Build() (proto.Message, error) {
if account.Password == "" {
return nil, newError("Shadowsocks password is not specified.")
}
if account.CipherType < 5 || account.CipherType > 7 {
if account.CipherType < shadowsocks.CipherType_AES_128_GCM ||
account.CipherType > shadowsocks.CipherType_CHACHA20_POLY1305 {
return nil, newError("unsupported cipher method: ", user.Cipher)
}
config.Users = append(config.Users, &protocol.User{