Improve compatibility for kTLS

This commit is contained in:
世界
2025-09-09 19:20:15 +08:00
parent 9110851af3
commit e9c46cc359
17 changed files with 555 additions and 218 deletions

View File

@@ -26,7 +26,7 @@ const (
var CRLF = []byte{'\r', '\n'}
var _ N.EarlyConn = (*ClientConn)(nil)
var _ N.EarlyWriter = (*ClientConn)(nil)
type ClientConn struct {
N.ExtendedConn
@@ -43,7 +43,7 @@ func NewClientConn(conn net.Conn, key [KeyLength]byte, destination M.Socksaddr)
}
}
func (c *ClientConn) NeedHandshake() bool {
func (c *ClientConn) NeedHandshakeForWrite() bool {
return !c.headerWritten
}