TUN-10557: Bump quic-go v0.59.1

This adds back the quic-go bump.
This commit is contained in:
Miguel da Costa Martins Marcelino
2026-06-18 18:20:39 +00:00
parent 81a53555aa
commit 02eb75b56d
367 changed files with 8748 additions and 76583 deletions
+11 -12
View File
@@ -12,9 +12,9 @@ import (
// QUICConnection defines the subset of [quic.Connection] methods used by cloudflared.
// Consumers should accept this interface; producers should return [*ConnWithCloser].
type QUICConnection interface {
AcceptStream(ctx context.Context) (quic.Stream, error)
OpenStream() (quic.Stream, error)
OpenStreamSync(ctx context.Context) (quic.Stream, error)
AcceptStream(ctx context.Context) (*quic.Stream, error)
OpenStream() (*quic.Stream, error)
OpenStreamSync(ctx context.Context) (*quic.Stream, error)
CloseWithError(code quic.ApplicationErrorCode, reason string) error
Context() context.Context
SendDatagram(payload []byte) error
@@ -28,9 +28,9 @@ type QUICConnection interface {
var _ QUICConnection = (*ConnWithCloser)(nil)
var (
// error returned when the [NewConnWithCloser] is called with a nil conn argument
// error returned when the [NewQUICConnection] is called with a nil conn argument
ErrNilQuicConnection = errors.New("the provided quic connection is nil")
// error returned when the [NewConnWithCloser] is called with a nil closer argument
// error returned when the [NewQUICConnection] is called with a nil closer argument
ErrNilCloser = errors.New("the provided closer is nil")
)
@@ -38,16 +38,15 @@ var (
// underlying [*net.UDPConn]). When [CloseWithError] is called the QUIC
// connection is closed first, then the closer is closed deterministically.
//
// A nil conn is only safe for [CloseWithError] (used in tests). All other
// delegated methods will panic on a nil conn.
// All fields are non-nil after successful construction via [NewQUICConnection].
type ConnWithCloser struct {
conn quic.Connection
conn *quic.Conn
closer io.Closer
}
// NewQUICConnection returns a [*ConnWithCloser] that will close closer after
// the QUIC connection is closed.
func NewQUICConnection(conn quic.Connection, closer io.Closer) (*ConnWithCloser, error) {
func NewQUICConnection(conn *quic.Conn, closer io.Closer) (*ConnWithCloser, error) {
if conn == nil {
return nil, ErrNilQuicConnection
}
@@ -68,15 +67,15 @@ func (c *ConnWithCloser) CloseWithError(code quic.ApplicationErrorCode, reason s
return errors.Join(connErr, closerErr)
}
func (c *ConnWithCloser) AcceptStream(ctx context.Context) (quic.Stream, error) {
func (c *ConnWithCloser) AcceptStream(ctx context.Context) (*quic.Stream, error) {
return c.conn.AcceptStream(ctx)
}
func (c *ConnWithCloser) OpenStream() (quic.Stream, error) {
func (c *ConnWithCloser) OpenStream() (*quic.Stream, error) {
return c.conn.OpenStream()
}
func (c *ConnWithCloser) OpenStreamSync(ctx context.Context) (quic.Stream, error) {
func (c *ConnWithCloser) OpenStreamSync(ctx context.Context) (*quic.Stream, error) {
return c.conn.OpenStreamSync(ctx)
}