WTF is this

This commit is contained in:
世界
2024-10-13 13:07:01 +08:00
parent bda93d516b
commit 923d3222b0
41 changed files with 421 additions and 507 deletions
+3 -1
View File
@@ -2,6 +2,7 @@ package trojan
import (
"context"
"encoding/binary"
"net"
"github.com/sagernet/sing/common/auth"
@@ -76,7 +77,8 @@ func (s *Service[K]) NewConnection(ctx context.Context, conn net.Conn, metadata
return E.Cause(err, "skip crlf")
}
command, err := rw.ReadByte(conn)
var command byte
err = binary.Read(conn, binary.BigEndian, &command)
if err != nil {
return E.Cause(err, "read command")
}