Update quic-go to v0.55.0

This commit is contained in:
世界
2025-09-16 00:58:54 +08:00
parent 7f3ea8dbd8
commit ed1ee4c3a4
9 changed files with 19 additions and 19 deletions

View File

@@ -29,7 +29,7 @@ type Client struct {
tlsConfig tls.Config
quicConfig *quic.Config
connAccess sync.Mutex
conn common.TypedValue[quic.Connection]
conn common.TypedValue[*quic.Conn]
rawConn net.Conn
}
@@ -49,7 +49,7 @@ func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, opt
}, nil
}
func (c *Client) offer() (quic.Connection, error) {
func (c *Client) offer() (*quic.Conn, error) {
conn := c.conn.Load()
if conn != nil && !common.Done(conn.Context()) {
return conn, nil
@@ -67,7 +67,7 @@ func (c *Client) offer() (quic.Connection, error) {
return conn, nil
}
func (c *Client) offerNew() (quic.Connection, error) {
func (c *Client) offerNew() (*quic.Conn, error) {
udpConn, err := c.dialer.DialContext(c.ctx, "udp", c.serverAddr)
if err != nil {
return nil, err

View File

@@ -84,7 +84,7 @@ func (s *Server) acceptLoop() {
}
}
func (s *Server) streamAcceptLoop(conn quic.Connection) error {
func (s *Server) streamAcceptLoop(conn *quic.Conn) error {
for {
stream, err := conn.AcceptStream(s.ctx)
if err != nil {

View File

@@ -8,8 +8,8 @@ import (
)
type StreamWrapper struct {
Conn quic.Connection
quic.Stream
Conn *quic.Conn
*quic.Stream
}
func (s *StreamWrapper) Read(p []byte) (n int, err error) {