浏览代码

default security to auto

Darien Raymond 8 年之前
父节点
当前提交
08ece5d2bf
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      common/protocol/headers.go

+ 1 - 4
common/protocol/headers.go

@@ -86,10 +86,7 @@ type CommandSwitchAccount struct {
 }
 
 func (sc *SecurityConfig) AsSecurity() Security {
-	if sc == nil {
-		return Security(SecurityType_LEGACY)
-	}
-	if sc.Type == SecurityType_AUTO {
+	if sc == nil || sc.Type == SecurityType_AUTO {
 		if runtime.GOARCH == "amd64" || runtime.GOARCH == "s390x" {
 			return Security(SecurityType_AES128_GCM)
 		}