vless: fix nil pointer panic on encryption handshake failure

This commit is contained in:
Shtorm
2026-09-04 06:01:33 +03:00
parent 102330f968
commit bcb83578d9
2 changed files with 14 additions and 2 deletions
+7
View File
@@ -164,6 +164,13 @@ func (c *CommonConn) IsEncryptionLayer() bool {
return true
}
func (c *CommonConn) Close() error {
if c == nil || c.Conn == nil {
return nil
}
return c.Conn.Close()
}
type AEAD struct {
cipher.AEAD
Nonce [12]byte