Update quic-go

This commit is contained in:
世界
2023-06-15 10:10:42 +08:00
parent 7d263eb733
commit 83c3454685
7 changed files with 30 additions and 51 deletions

View File

@@ -75,7 +75,7 @@ func (c *Client) offerNew() (quic.Connection, error) {
}
var packetConn net.PacketConn
packetConn = bufio.NewUnbindPacketConn(udpConn)
quicConn, err := quic.Dial(packetConn, udpConn.RemoteAddr(), c.serverAddr.AddrString(), c.tlsConfig, c.quicConfig)
quicConn, err := quic.Dial(c.ctx, packetConn, udpConn.RemoteAddr(), c.tlsConfig, c.quicConfig)
if err != nil {
packetConn.Close()
return nil, err

View File

@@ -26,7 +26,7 @@ type Server struct {
handler adapter.V2RayServerTransportHandler
errorHandler E.Handler
udpListener net.PacketConn
quicListener quic.Listener
quicListener *quic.Listener
}
func NewServer(ctx context.Context, options option.V2RayQUICOptions, tlsConfig tls.ServerConfig, handler adapter.V2RayServerTransportHandler) (adapter.V2RayServerTransport, error) {