瀏覽代碼

fix check of AEAD cipher

Darien Raymond 8 年之前
父節點
當前提交
9dbdcb3a39
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      proxy/shadowsocks/protocol.go

+ 1 - 1
proxy/shadowsocks/protocol.go

@@ -65,7 +65,7 @@ func ReadTCPSession(user *protocol.User, reader io.Reader) (*protocol.RequestHea
 		return nil, nil, newError("rejecting connection with OTA enabled, while server disables OTA")
 	}
 
-	if !request.Option.Has(RequestOptionOneTimeAuth) && account.OneTimeAuth == Account_Enabled {
+	if !account.Cipher.IsAEAD() && !request.Option.Has(RequestOptionOneTimeAuth) && account.OneTimeAuth == Account_Enabled {
 		return nil, nil, newError("rejecting connection with OTA disabled, while server enables OTA")
 	}