mirror of https://github.com/v2ray/v2ray-core
default security to auto
parent
c3fc27f7a1
commit
08ece5d2bf
|
@ -86,10 +86,7 @@ type CommandSwitchAccount struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sc *SecurityConfig) AsSecurity() Security {
|
func (sc *SecurityConfig) AsSecurity() Security {
|
||||||
if sc == nil {
|
if sc == nil || sc.Type == SecurityType_AUTO {
|
||||||
return Security(SecurityType_LEGACY)
|
|
||||||
}
|
|
||||||
if sc.Type == SecurityType_AUTO {
|
|
||||||
if runtime.GOARCH == "amd64" || runtime.GOARCH == "s390x" {
|
if runtime.GOARCH == "amd64" || runtime.GOARCH == "s390x" {
|
||||||
return Security(SecurityType_AES128_GCM)
|
return Security(SecurityType_AES128_GCM)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue