mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
Fix ??
This commit is contained in:
parent
0e11e20f82
commit
e0a4b7756e
@ -3,6 +3,7 @@ package mtproto
|
||||
import (
|
||||
"crypto/cipher"
|
||||
"encoding/binary"
|
||||
"io"
|
||||
"net"
|
||||
"sync"
|
||||
|
||||
@ -40,7 +41,10 @@ func (c *FakeTLSConn) SetupObfs2(en, de cipher.Stream) {
|
||||
}
|
||||
|
||||
func (c *FakeTLSConn) read(p []byte) (n int, err error) {
|
||||
n, err = c.Conn.Read(p)
|
||||
n, err = io.ReadFull(c.Conn, p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if c.clientDecryptor != nil {
|
||||
c.clientDecryptor.XORKeyStream(p, p[:n])
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user