Update quic-go to v0.58.0

This commit is contained in:
世界
2025-12-21 23:01:42 +08:00
parent cba18635c8
commit 35ff7d1fb4
7 changed files with 240 additions and 237 deletions

View File

@@ -88,7 +88,7 @@ func (s *Server) streamAcceptLoop(conn *quic.Conn) error {
for {
stream, err := conn.AcceptStream(s.ctx)
if err != nil {
return err
return qtls.WrapError(err)
}
go s.handler.NewConnectionEx(conn.Context(), &StreamWrapper{Conn: conn, Stream: stream}, M.SocksaddrFromNet(conn.RemoteAddr()), M.Socksaddr{}, nil)
}

View File

@@ -4,7 +4,7 @@ import (
"net"
"github.com/sagernet/quic-go"
"github.com/sagernet/sing/common/baderror"
qtls "github.com/sagernet/sing-quic"
)
type StreamWrapper struct {
@@ -14,14 +14,12 @@ type StreamWrapper struct {
func (s *StreamWrapper) Read(p []byte) (n int, err error) {
n, err = s.Stream.Read(p)
//nolint:staticcheck
return n, baderror.WrapQUIC(err)
return n, qtls.WrapError(err)
}
func (s *StreamWrapper) Write(p []byte) (n int, err error) {
n, err = s.Stream.Write(p)
//nolint:staticcheck
return n, baderror.WrapQUIC(err)
return n, qtls.WrapError(err)
}
func (s *StreamWrapper) LocalAddr() net.Addr {