fix: tuic fast-open not work
This commit is contained in:
parent
457e840811
commit
c0bcf77bf7
1 changed files with 9 additions and 0 deletions
|
@ -12,6 +12,7 @@ import (
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/Dreamacro/clash/common/buf"
|
||||||
N "github.com/Dreamacro/clash/common/net"
|
N "github.com/Dreamacro/clash/common/net"
|
||||||
"github.com/Dreamacro/clash/common/pool"
|
"github.com/Dreamacro/clash/common/pool"
|
||||||
C "github.com/Dreamacro/clash/constant"
|
C "github.com/Dreamacro/clash/constant"
|
||||||
|
@ -338,6 +339,14 @@ func (conn *earlyConn) Read(b []byte) (n int, err error) {
|
||||||
return conn.BufferedConn.Read(b)
|
return conn.BufferedConn.Read(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (conn *earlyConn) ReadBuffer(buffer *buf.Buffer) (err error) {
|
||||||
|
err = conn.Response()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return conn.BufferedConn.ReadBuffer(buffer)
|
||||||
|
}
|
||||||
|
|
||||||
func (t *clientImpl) ListenPacketWithDialer(ctx context.Context, metadata *C.Metadata, dialer C.Dialer, dialFn DialFunc) (net.PacketConn, error) {
|
func (t *clientImpl) ListenPacketWithDialer(ctx context.Context, metadata *C.Metadata, dialer C.Dialer, dialFn DialFunc) (net.PacketConn, error) {
|
||||||
quicConn, err := t.getQuicConn(ctx, dialer, dialFn)
|
quicConn, err := t.getQuicConn(ctx, dialer, dialFn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue