Explorar o código

fix aes cfb decode packet. fix #739

Darien Raymond %!s(int64=8) %!d(string=hai) anos
pai
achega
eef2a72ac0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      proxy/shadowsocks/config.go

+ 1 - 1
proxy/shadowsocks/config.go

@@ -142,7 +142,7 @@ func (v *AesCfb) EncodePacket(key []byte, b *buf.Buffer) error {
 
 func (v *AesCfb) DecodePacket(key []byte, b *buf.Buffer) error {
 	iv := b.BytesTo(v.IVSize())
-	stream := crypto.NewAesEncryptionStream(key, iv)
+	stream := crypto.NewAesDecryptionStream(key, iv)
 	stream.XORKeyStream(b.BytesFrom(v.IVSize()), b.BytesFrom(v.IVSize()))
 	b.SliceFrom(v.IVSize())
 	return nil