From 95e643736b77fc4bd4be3e97aefdc38bd7385b6f Mon Sep 17 00:00:00 2001 From: tobyxdd Date: Fri, 2 Jun 2023 15:36:39 -0700 Subject: [PATCH 01/14] WIP rework of Hysteria changes on top of upstream quic-go. this commit includes the following changes: - Custom congestion control interface - ErrMessageTooLarge - tuned default parameters - Disable buffer size warning logs --- congestion/interface.go | 42 +++++++++++++ connection.go | 16 ++++- interface.go | 4 ++ internal/ackhandler/cc_adapter.go | 60 +++++++++++++++++++ internal/ackhandler/interfaces.go | 3 + internal/ackhandler/sent_packet_handler.go | 55 ++++++++++++----- .../mocks/ackhandler/sent_packet_handler.go | 13 ++++ internal/mocks/quic/early_conn.go | 13 ++++ internal/protocol/params.go | 10 ++-- mock_quic_conn_test.go | 13 ++++ transport.go | 5 +- 11 files changed, 210 insertions(+), 24 deletions(-) create mode 100644 congestion/interface.go create mode 100644 internal/ackhandler/cc_adapter.go diff --git a/congestion/interface.go b/congestion/interface.go new file mode 100644 index 00000000000..767abfefe5b --- /dev/null +++ b/congestion/interface.go @@ -0,0 +1,42 @@ +package congestion + +import ( + "time" + + "github.com/quic-go/quic-go/internal/protocol" +) + +type ( + ByteCount protocol.ByteCount + PacketNumber protocol.PacketNumber +) + +type CongestionControl interface { + SetRTTStatsProvider(provider RTTStatsProvider) + TimeUntilSend(bytesInFlight ByteCount) time.Time + HasPacingBudget() bool + OnPacketSent(sentTime time.Time, bytesInFlight ByteCount, packetNumber PacketNumber, bytes ByteCount, isRetransmittable bool) + CanSend(bytesInFlight ByteCount) bool + MaybeExitSlowStart() + OnPacketAcked(number PacketNumber, ackedBytes ByteCount, priorInFlight ByteCount, eventTime time.Time) + OnPacketLost(number PacketNumber, lostBytes ByteCount, priorInFlight ByteCount) + OnRetransmissionTimeout(packetsRetransmitted bool) + SetMaxDatagramSize(size ByteCount) + InSlowStart() bool + InRecovery() bool + GetCongestionWindow() ByteCount +} + +type RTTStatsProvider interface { + MinRTT() time.Duration + LatestRTT() time.Duration + SmoothedRTT() time.Duration + MeanDeviation() time.Duration + MaxAckDelay() time.Duration + PTO(includeMaxAckDelay bool) time.Duration + UpdateRTT(sendDelta, ackDelay time.Duration, now time.Time) + SetMaxAckDelay(mad time.Duration) + SetInitialRTT(t time.Duration) + OnConnectionMigration() + ExpireSmoothedMetrics() +} diff --git a/connection.go b/connection.go index c4a91a3510e..e658634b1bb 100644 --- a/connection.go +++ b/connection.go @@ -13,6 +13,7 @@ import ( "sync/atomic" "time" + "github.com/quic-go/quic-go/congestion" "github.com/quic-go/quic-go/internal/ackhandler" "github.com/quic-go/quic-go/internal/flowcontrol" "github.com/quic-go/quic-go/internal/handshake" @@ -2165,14 +2166,21 @@ func (s *connection) onStreamCompleted(id protocol.StreamID) { } } +type ErrMessageTooLarge int + +func (e ErrMessageTooLarge) Error() string { + return fmt.Sprintf("message too large (maximum: %d bytes)", e) +} + func (s *connection) SendMessage(p []byte) error { if !s.supportsDatagrams() { return errors.New("datagram support disabled") } f := &wire.DatagramFrame{DataLenPresent: true} - if protocol.ByteCount(len(p)) > f.MaxDataLen(s.peerParams.MaxDatagramFrameSize, s.version) { - return errors.New("message too large") + maxDataLen := f.MaxDataLen(s.peerParams.MaxDatagramFrameSize, s.version) + if protocol.ByteCount(len(p)) > maxDataLen { + return ErrMessageTooLarge(maxDataLen) } f.Data = make([]byte, len(p)) copy(f.Data, p) @@ -2207,3 +2215,7 @@ func (s *connection) NextConnection() Connection { s.streamsMap.UseResetMaps() return s } + +func (s *connection) SetCongestionControl(cc congestion.CongestionControl) { + s.sentPacketHandler.SetCongestionControl(cc) +} diff --git a/interface.go b/interface.go index cdab015b3d2..72552ea863a 100644 --- a/interface.go +++ b/interface.go @@ -7,6 +7,7 @@ import ( "net" "time" + "github.com/quic-go/quic-go/congestion" "github.com/quic-go/quic-go/internal/handshake" "github.com/quic-go/quic-go/internal/protocol" "github.com/quic-go/quic-go/logging" @@ -187,6 +188,9 @@ type Connection interface { SendMessage([]byte) error // ReceiveMessage gets a message received in a datagram, as specified in RFC 9221. ReceiveMessage() ([]byte, error) + + // Replace the current congestion control algorithm with a new one. + SetCongestionControl(congestion.CongestionControl) } // An EarlyConnection is a connection that is handshaking. diff --git a/internal/ackhandler/cc_adapter.go b/internal/ackhandler/cc_adapter.go new file mode 100644 index 00000000000..c978b4d8458 --- /dev/null +++ b/internal/ackhandler/cc_adapter.go @@ -0,0 +1,60 @@ +package ackhandler + +import ( + "time" + + "github.com/quic-go/quic-go/congestion" + "github.com/quic-go/quic-go/internal/protocol" +) + +type ccAdapter struct { + CC congestion.CongestionControl +} + +func (a *ccAdapter) TimeUntilSend(bytesInFlight protocol.ByteCount) time.Time { + return a.CC.TimeUntilSend(congestion.ByteCount(bytesInFlight)) +} + +func (a *ccAdapter) HasPacingBudget() bool { + return a.CC.HasPacingBudget() +} + +func (a *ccAdapter) OnPacketSent(sentTime time.Time, bytesInFlight protocol.ByteCount, packetNumber protocol.PacketNumber, bytes protocol.ByteCount, isRetransmittable bool) { + a.CC.OnPacketSent(sentTime, congestion.ByteCount(bytesInFlight), congestion.PacketNumber(packetNumber), congestion.ByteCount(bytes), isRetransmittable) +} + +func (a *ccAdapter) CanSend(bytesInFlight protocol.ByteCount) bool { + return a.CC.CanSend(congestion.ByteCount(bytesInFlight)) +} + +func (a *ccAdapter) MaybeExitSlowStart() { + a.CC.MaybeExitSlowStart() +} + +func (a *ccAdapter) OnPacketAcked(number protocol.PacketNumber, ackedBytes protocol.ByteCount, priorInFlight protocol.ByteCount, eventTime time.Time) { + a.CC.OnPacketAcked(congestion.PacketNumber(number), congestion.ByteCount(ackedBytes), congestion.ByteCount(priorInFlight), eventTime) +} + +func (a *ccAdapter) OnPacketLost(number protocol.PacketNumber, lostBytes protocol.ByteCount, priorInFlight protocol.ByteCount) { + a.CC.OnPacketLost(congestion.PacketNumber(number), congestion.ByteCount(lostBytes), congestion.ByteCount(priorInFlight)) +} + +func (a *ccAdapter) OnRetransmissionTimeout(packetsRetransmitted bool) { + a.CC.OnRetransmissionTimeout(packetsRetransmitted) +} + +func (a *ccAdapter) SetMaxDatagramSize(size protocol.ByteCount) { + a.CC.SetMaxDatagramSize(congestion.ByteCount(size)) +} + +func (a *ccAdapter) InSlowStart() bool { + return a.CC.InSlowStart() +} + +func (a *ccAdapter) InRecovery() bool { + return a.CC.InRecovery() +} + +func (a *ccAdapter) GetCongestionWindow() protocol.ByteCount { + return protocol.ByteCount(a.CC.GetCongestionWindow()) +} diff --git a/internal/ackhandler/interfaces.go b/internal/ackhandler/interfaces.go index 5924f84bdaa..590c6d05bf3 100644 --- a/internal/ackhandler/interfaces.go +++ b/internal/ackhandler/interfaces.go @@ -3,6 +3,7 @@ package ackhandler import ( "time" + "github.com/quic-go/quic-go/congestion" "github.com/quic-go/quic-go/internal/protocol" "github.com/quic-go/quic-go/internal/wire" ) @@ -34,6 +35,8 @@ type SentPacketHandler interface { GetLossDetectionTimeout() time.Time OnLossDetectionTimeout() error + + SetCongestionControl(congestion.CongestionControl) } type sentPacketTracker interface { diff --git a/internal/ackhandler/sent_packet_handler.go b/internal/ackhandler/sent_packet_handler.go index 732bbc3a1d6..c76e41ba37d 100644 --- a/internal/ackhandler/sent_packet_handler.go +++ b/internal/ackhandler/sent_packet_handler.go @@ -3,8 +3,10 @@ package ackhandler import ( "errors" "fmt" + "sync" "time" + congestionExt "github.com/quic-go/quic-go/congestion" "github.com/quic-go/quic-go/internal/congestion" "github.com/quic-go/quic-go/internal/protocol" "github.com/quic-go/quic-go/internal/qerr" @@ -79,8 +81,9 @@ type sentPacketHandler struct { bytesInFlight protocol.ByteCount - congestion congestion.SendAlgorithmWithDebugInfos - rttStats *utils.RTTStats + congestion congestion.SendAlgorithmWithDebugInfos + congestionMutex sync.RWMutex + rttStats *utils.RTTStats // The number of times a PTO has been sent without receiving an ack. ptoCount uint32 @@ -243,7 +246,8 @@ func (h *sentPacketHandler) SentPacket(p *Packet) { p = nil //nolint:ineffassign // This is just to be on the safe side. } if h.tracer != nil && isAckEliciting { - h.tracer.UpdatedMetrics(h.rttStats, h.congestion.GetCongestionWindow(), h.bytesInFlight, h.packetsInFlight()) + cc := h.getCongestionControl() + h.tracer.UpdatedMetrics(h.rttStats, cc.GetCongestionWindow(), h.bytesInFlight, h.packetsInFlight()) } if isAckEliciting || !h.peerCompletedAddressValidation { h.setLossDetectionTimer() @@ -283,7 +287,9 @@ func (h *sentPacketHandler) sentPacketImpl(packet *Packet) bool /* is ack-elicit h.numProbesToSend-- } } - h.congestion.OnPacketSent(packet.SendTime, h.bytesInFlight, packet.PacketNumber, packet.Length, isAckEliciting) + + cc := h.getCongestionControl() + cc.OnPacketSent(packet.SendTime, h.bytesInFlight, packet.PacketNumber, packet.Length, isAckEliciting) return isAckEliciting } @@ -315,6 +321,9 @@ func (h *sentPacketHandler) ReceivedAck(ack *wire.AckFrame, encLevel protocol.En if err != nil || len(ackedPackets) == 0 { return false, err } + + cc := h.getCongestionControl() + // update the RTT, if the largest acked is newly acknowledged if len(ackedPackets) > 0 { if p := ackedPackets[len(ackedPackets)-1]; p.PacketNumber == ack.LargestAcked() { @@ -327,7 +336,7 @@ func (h *sentPacketHandler) ReceivedAck(ack *wire.AckFrame, encLevel protocol.En if h.logger.Debug() { h.logger.Debugf("\tupdated RTT: %s (σ: %s)", h.rttStats.SmoothedRTT(), h.rttStats.MeanDeviation()) } - h.congestion.MaybeExitSlowStart() + cc.MaybeExitSlowStart() } } if err := h.detectLostPackets(rcvTime, encLevel); err != nil { @@ -336,7 +345,7 @@ func (h *sentPacketHandler) ReceivedAck(ack *wire.AckFrame, encLevel protocol.En var acked1RTTPacket bool for _, p := range ackedPackets { if p.includedInBytesInFlight && !p.declaredLost { - h.congestion.OnPacketAcked(p.PacketNumber, p.Length, priorInFlight, rcvTime) + cc.OnPacketAcked(p.PacketNumber, p.Length, priorInFlight, rcvTime) } if p.EncryptionLevel == protocol.Encryption1RTT { acked1RTTPacket = true @@ -358,7 +367,7 @@ func (h *sentPacketHandler) ReceivedAck(ack *wire.AckFrame, encLevel protocol.En h.numProbesToSend = 0 if h.tracer != nil { - h.tracer.UpdatedMetrics(h.rttStats, h.congestion.GetCongestionWindow(), h.bytesInFlight, h.packetsInFlight()) + h.tracer.UpdatedMetrics(h.rttStats, cc.GetCongestionWindow(), h.bytesInFlight, h.packetsInFlight()) } pnSpace.history.DeleteOldPackets(rcvTime) @@ -586,6 +595,8 @@ func (h *sentPacketHandler) detectLostPackets(now time.Time, encLevel protocol.E // Packets sent before this time are deemed lost. lostSendTime := now.Add(-lossDelay) + cc := h.getCongestionControl() + priorInFlight := h.bytesInFlight return pnSpace.history.Iterate(func(p *Packet) (bool, error) { if p.PacketNumber > pnSpace.largestAcked { @@ -626,7 +637,7 @@ func (h *sentPacketHandler) detectLostPackets(now time.Time, encLevel protocol.E h.removeFromBytesInFlight(p) h.queueFramesForRetransmission(p) if !p.IsPathMTUProbePacket { - h.congestion.OnPacketLost(p.PacketNumber, p.Length, priorInFlight) + cc.OnPacketLost(p.PacketNumber, p.Length, priorInFlight) } } return true, nil @@ -746,9 +757,10 @@ func (h *sentPacketHandler) SendMode() SendMode { return h.ptoMode } // Only send ACKs if we're congestion limited. - if !h.congestion.CanSend(h.bytesInFlight) { + cc := h.getCongestionControl() + if !cc.CanSend(h.bytesInFlight) { if h.logger.Debug() { - h.logger.Debugf("Congestion limited: bytes in flight %d, window %d", h.bytesInFlight, h.congestion.GetCongestionWindow()) + h.logger.Debugf("Congestion limited: bytes in flight %d, window %d", h.bytesInFlight, cc.GetCongestionWindow()) } return SendAck } @@ -762,15 +774,15 @@ func (h *sentPacketHandler) SendMode() SendMode { } func (h *sentPacketHandler) TimeUntilSend() time.Time { - return h.congestion.TimeUntilSend(h.bytesInFlight) + return h.getCongestionControl().TimeUntilSend(h.bytesInFlight) } func (h *sentPacketHandler) HasPacingBudget() bool { - return h.congestion.HasPacingBudget() + return h.getCongestionControl().HasPacingBudget() } func (h *sentPacketHandler) SetMaxDatagramSize(s protocol.ByteCount) { - h.congestion.SetMaxDatagramSize(s) + h.getCongestionControl().SetMaxDatagramSize(s) } func (h *sentPacketHandler) isAmplificationLimited() bool { @@ -836,7 +848,8 @@ func (h *sentPacketHandler) ResetForRetry() error { h.logger.Debugf("\tupdated RTT: %s (σ: %s)", h.rttStats.SmoothedRTT(), h.rttStats.MeanDeviation()) } if h.tracer != nil { - h.tracer.UpdatedMetrics(h.rttStats, h.congestion.GetCongestionWindow(), h.bytesInFlight, h.packetsInFlight()) + cc := h.getCongestionControl() + h.tracer.UpdatedMetrics(h.rttStats, cc.GetCongestionWindow(), h.bytesInFlight, h.packetsInFlight()) } } h.initialPackets = newPacketNumberSpace(h.initialPackets.pns.Pop(), false, h.rttStats) @@ -859,3 +872,17 @@ func (h *sentPacketHandler) SetHandshakeConfirmed() { // Make sure the timer is armed now, if necessary. h.setLossDetectionTimer() } + +func (h *sentPacketHandler) getCongestionControl() congestion.SendAlgorithmWithDebugInfos { + h.congestionMutex.RLock() + cc := h.congestion + h.congestionMutex.RUnlock() + return cc +} + +func (h *sentPacketHandler) SetCongestionControl(cc congestionExt.CongestionControl) { + h.congestionMutex.Lock() + cc.SetRTTStatsProvider(h.rttStats) + h.congestion = &ccAdapter{cc} + h.congestionMutex.Unlock() +} diff --git a/internal/mocks/ackhandler/sent_packet_handler.go b/internal/mocks/ackhandler/sent_packet_handler.go index 82073ed4a8c..d84332245fd 100644 --- a/internal/mocks/ackhandler/sent_packet_handler.go +++ b/internal/mocks/ackhandler/sent_packet_handler.go @@ -9,6 +9,7 @@ import ( time "time" gomock "github.com/golang/mock/gomock" + congestion "github.com/quic-go/quic-go/congestion" ackhandler "github.com/quic-go/quic-go/internal/ackhandler" protocol "github.com/quic-go/quic-go/internal/protocol" wire "github.com/quic-go/quic-go/internal/wire" @@ -201,6 +202,18 @@ func (mr *MockSentPacketHandlerMockRecorder) SentPacket(arg0 interface{}) *gomoc return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SentPacket", reflect.TypeOf((*MockSentPacketHandler)(nil).SentPacket), arg0) } +// SetCongestionControl mocks base method. +func (m *MockSentPacketHandler) SetCongestionControl(arg0 congestion.CongestionControl) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetCongestionControl", arg0) +} + +// SetCongestionControl indicates an expected call of SetCongestionControl. +func (mr *MockSentPacketHandlerMockRecorder) SetCongestionControl(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCongestionControl", reflect.TypeOf((*MockSentPacketHandler)(nil).SetCongestionControl), arg0) +} + // SetHandshakeConfirmed mocks base method. func (m *MockSentPacketHandler) SetHandshakeConfirmed() { m.ctrl.T.Helper() diff --git a/internal/mocks/quic/early_conn.go b/internal/mocks/quic/early_conn.go index 174c70de9d9..65d8b2439be 100644 --- a/internal/mocks/quic/early_conn.go +++ b/internal/mocks/quic/early_conn.go @@ -11,6 +11,7 @@ import ( gomock "github.com/golang/mock/gomock" quic "github.com/quic-go/quic-go" + congestion "github.com/quic-go/quic-go/congestion" qerr "github.com/quic-go/quic-go/internal/qerr" ) @@ -253,3 +254,15 @@ func (mr *MockEarlyConnectionMockRecorder) SendMessage(arg0 interface{}) *gomock mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMessage", reflect.TypeOf((*MockEarlyConnection)(nil).SendMessage), arg0) } + +// SetCongestionControl mocks base method. +func (m *MockEarlyConnection) SetCongestionControl(arg0 congestion.CongestionControl) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetCongestionControl", arg0) +} + +// SetCongestionControl indicates an expected call of SetCongestionControl. +func (mr *MockEarlyConnectionMockRecorder) SetCongestionControl(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCongestionControl", reflect.TypeOf((*MockEarlyConnection)(nil).SetCongestionControl), arg0) +} diff --git a/internal/protocol/params.go b/internal/protocol/params.go index fe3a7562580..31ef294289e 100644 --- a/internal/protocol/params.go +++ b/internal/protocol/params.go @@ -3,10 +3,10 @@ package protocol import "time" // DesiredReceiveBufferSize is the kernel UDP receive buffer size that we'd like to use. -const DesiredReceiveBufferSize = (1 << 20) * 2 // 2 MB +const DesiredReceiveBufferSize = (1 << 20) * 8 // 8 MB // DesiredSendBufferSize is the kernel UDP send buffer size that we'd like to use. -const DesiredSendBufferSize = (1 << 20) * 2 // 2 MB +const DesiredSendBufferSize = (1 << 20) * 8 // 8 MB // InitialPacketSizeIPv4 is the maximum packet size that we use for sending IPv4 packets. const InitialPacketSizeIPv4 = 1252 @@ -15,7 +15,7 @@ const InitialPacketSizeIPv4 = 1252 const InitialPacketSizeIPv6 = 1232 // MaxCongestionWindowPackets is the maximum congestion window in packet. -const MaxCongestionWindowPackets = 10000 +const MaxCongestionWindowPackets = 20000 // MaxUndecryptablePackets limits the number of undecryptable packets that are queued in the connection. const MaxUndecryptablePackets = 32 @@ -25,7 +25,7 @@ const MaxUndecryptablePackets = 32 const ConnectionFlowControlMultiplier = 1.5 // DefaultInitialMaxStreamData is the default initial stream-level flow control window for receiving data -const DefaultInitialMaxStreamData = (1 << 10) * 512 // 512 kb +const DefaultInitialMaxStreamData = (1 << 20) * 2 // 2 MB // DefaultInitialMaxData is the connection-level flow control window for receiving data const DefaultInitialMaxData = ConnectionFlowControlMultiplier * DefaultInitialMaxStreamData @@ -84,7 +84,7 @@ const MaxNonAckElicitingAcks = 19 // MaxStreamFrameSorterGaps is the maximum number of gaps between received StreamFrames // prevents DoS attacks against the streamFrameSorter -const MaxStreamFrameSorterGaps = 1000 +const MaxStreamFrameSorterGaps = 20000 // MinStreamFrameBufferSize is the minimum data length of a received STREAM frame // that we use the buffer for. This protects against a DoS where an attacker would send us diff --git a/mock_quic_conn_test.go b/mock_quic_conn_test.go index c1d867c318f..3f760ad2fc6 100644 --- a/mock_quic_conn_test.go +++ b/mock_quic_conn_test.go @@ -10,6 +10,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" + congestion "github.com/quic-go/quic-go/congestion" protocol "github.com/quic-go/quic-go/internal/protocol" qerr "github.com/quic-go/quic-go/internal/qerr" ) @@ -268,6 +269,18 @@ func (mr *MockQUICConnMockRecorder) SendMessage(arg0 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMessage", reflect.TypeOf((*MockQUICConn)(nil).SendMessage), arg0) } +// SetCongestionControl mocks base method. +func (m *MockQUICConn) SetCongestionControl(arg0 congestion.CongestionControl) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetCongestionControl", arg0) +} + +// SetCongestionControl indicates an expected call of SetCongestionControl. +func (mr *MockQUICConnMockRecorder) SetCongestionControl(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCongestionControl", reflect.TypeOf((*MockQUICConn)(nil).SetCongestionControl), arg0) +} + // destroy mocks base method. func (m *MockQUICConn) destroy(arg0 error) { m.ctrl.T.Helper() diff --git a/transport.go b/transport.go index c62ee38803b..b650fafc4a0 100644 --- a/transport.go +++ b/transport.go @@ -5,7 +5,6 @@ import ( "crypto/rand" "crypto/tls" "errors" - "log" "net" "os" "strconv" @@ -286,7 +285,7 @@ func (t *Transport) listen(conn rawConn) { if disable, _ := strconv.ParseBool(os.Getenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING")); disable { return } - log.Printf("%s. See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.", err) + // log.Printf("%s. See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.", err) }) } } @@ -296,7 +295,7 @@ func (t *Transport) listen(conn rawConn) { if disable, _ := strconv.ParseBool(os.Getenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING")); disable { return } - log.Printf("%s. See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.", err) + // log.Printf("%s. See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.", err) }) } } From a23d9337e191c5a80f6080097eec36ee0e84d29b Mon Sep 17 00:00:00 2001 From: tobyxdd Date: Fri, 2 Jun 2023 19:07:10 -0700 Subject: [PATCH 02/14] feat: disable set DF errors --- sys_conn_df_linux.go | 2 +- sys_conn_df_windows.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys_conn_df_linux.go b/sys_conn_df_linux.go index 98542b4102b..051b19a209d 100644 --- a/sys_conn_df_linux.go +++ b/sys_conn_df_linux.go @@ -29,7 +29,7 @@ func setDF(rawConn syscall.RawConn) error { case errDFIPv4 != nil && errDFIPv6 == nil: utils.DefaultLogger.Debugf("Setting DF for IPv6.") case errDFIPv4 != nil && errDFIPv6 != nil: - return errors.New("setting DF failed for both IPv4 and IPv6") + utils.DefaultLogger.Debugf("Setting DF failed for both IPv4 and IPv6.") } return nil } diff --git a/sys_conn_df_windows.go b/sys_conn_df_windows.go index 9855e8de8d6..b7fc3f48000 100644 --- a/sys_conn_df_windows.go +++ b/sys_conn_df_windows.go @@ -35,7 +35,7 @@ func setDF(rawConn syscall.RawConn) error { case errDFIPv4 != nil && errDFIPv6 == nil: utils.DefaultLogger.Debugf("Setting DF for IPv6.") case errDFIPv4 != nil && errDFIPv6 != nil: - return errors.New("setting DF failed for both IPv4 and IPv6") + utils.DefaultLogger.Debugf("Setting DF failed for both IPv4 and IPv6.") } return nil } From 877043077b055a6f320f80fefe25fc259d139742 Mon Sep 17 00:00:00 2001 From: tobyxdd Date: Fri, 2 Jun 2023 19:21:20 -0700 Subject: [PATCH 03/14] feat: connection migration --- connection.go | 7 +++++++ mock_send_conn_test.go | 12 ++++++++++++ send_conn.go | 5 +++++ 3 files changed, 24 insertions(+) diff --git a/connection.go b/connection.go index e658634b1bb..27efc2f9224 100644 --- a/connection.go +++ b/connection.go @@ -904,6 +904,13 @@ func (s *connection) handlePacketImpl(rp *receivedPacket) bool { } } + // Hysteria connection migration + // Set remote address to the address of the last received valid packet + if s.perspective == protocol.PerspectiveServer && processed { + // Connection migration + s.conn.SetRemoteAddr(rp.remoteAddr) + } + p.buffer.MaybeRelease() return processed } diff --git a/mock_send_conn_test.go b/mock_send_conn_test.go index a0fb66f00a8..99dc5c1b8a5 100644 --- a/mock_send_conn_test.go +++ b/mock_send_conn_test.go @@ -76,6 +76,18 @@ func (mr *MockSendConnMockRecorder) RemoteAddr() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockSendConn)(nil).RemoteAddr)) } +// SetRemoteAddr mocks base method. +func (m *MockSendConn) SetRemoteAddr(arg0 net.Addr) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetRemoteAddr", arg0) +} + +// SetRemoteAddr indicates an expected call of SetRemoteAddr. +func (mr *MockSendConnMockRecorder) SetRemoteAddr(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRemoteAddr", reflect.TypeOf((*MockSendConn)(nil).SetRemoteAddr), arg0) +} + // Write mocks base method. func (m *MockSendConn) Write(arg0 []byte) error { m.ctrl.T.Helper() diff --git a/send_conn.go b/send_conn.go index 0ac270378e3..97baa53d204 100644 --- a/send_conn.go +++ b/send_conn.go @@ -10,6 +10,7 @@ type sendConn interface { Close() error LocalAddr() net.Addr RemoteAddr() net.Addr + SetRemoteAddr(net.Addr) } type sconn struct { @@ -40,6 +41,10 @@ func (c *sconn) RemoteAddr() net.Addr { return c.remoteAddr } +func (c *sconn) SetRemoteAddr(addr net.Addr) { + c.remoteAddr = addr +} + func (c *sconn) LocalAddr() net.Addr { addr := c.rawConn.LocalAddr() if c.info != nil { From 555a0f623ad4299998db532f1f1451e90d9b0c94 Mon Sep 17 00:00:00 2001 From: tobyxdd Date: Fri, 2 Jun 2023 20:31:00 -0700 Subject: [PATCH 04/14] feat: frame sorter tree optimization --- frame_sorter.go | 114 +++--- frame_sorter_test.go | 27 +- internal/utils/streamframe_interval.go | 45 +++ internal/utils/tree/tree.go | 507 +++++++++++++++++++++++++ internal/utils/tree/tree_match_test.go | 95 +++++ internal/utils/tree/tree_test.go | 254 +++++++++++++ 6 files changed, 967 insertions(+), 75 deletions(-) create mode 100644 internal/utils/streamframe_interval.go create mode 100644 internal/utils/tree/tree.go create mode 100644 internal/utils/tree/tree_match_test.go create mode 100644 internal/utils/tree/tree_test.go diff --git a/frame_sorter.go b/frame_sorter.go index bee0abadb53..1637a3ee49f 100644 --- a/frame_sorter.go +++ b/frame_sorter.go @@ -2,10 +2,10 @@ package quic import ( "errors" - "sync" "github.com/quic-go/quic-go/internal/protocol" - list "github.com/quic-go/quic-go/internal/utils/linkedlist" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/utils/tree" ) // byteInterval is an interval from one ByteCount to the other @@ -14,12 +14,6 @@ type byteInterval struct { End protocol.ByteCount } -var byteIntervalElementPool sync.Pool - -func init() { - byteIntervalElementPool = *list.NewPool[byteInterval]() -} - type frameSorterEntry struct { Data []byte DoneCb func() @@ -28,17 +22,17 @@ type frameSorterEntry struct { type frameSorter struct { queue map[protocol.ByteCount]frameSorterEntry readPos protocol.ByteCount - gaps *list.List[byteInterval] + gapTree *tree.Btree[utils.ByteInterval] } var errDuplicateStreamData = errors.New("duplicate stream data") func newFrameSorter() *frameSorter { s := frameSorter{ - gaps: list.NewWithPool[byteInterval](&byteIntervalElementPool), - queue: make(map[protocol.ByteCount]frameSorterEntry), + gapTree: tree.New[utils.ByteInterval](), + queue: make(map[protocol.ByteCount]frameSorterEntry), } - s.gaps.PushFront(byteInterval{Start: 0, End: protocol.MaxByteCount}) + s.gapTree.Insert(utils.ByteInterval{Start: 0, End: protocol.MaxByteCount}) return &s } @@ -60,25 +54,30 @@ func (s *frameSorter) push(data []byte, offset protocol.ByteCount, doneCb func() start := offset end := offset + protocol.ByteCount(len(data)) + covInterval := utils.ByteInterval{Start: start, End: end} - if end <= s.gaps.Front().Value.Start { + gaps := s.gapTree.Match(covInterval) + + if len(gaps) == 0 { + // No overlap with any existing gap return errDuplicateStreamData } - startGap, startsInGap := s.findStartGap(start) - endGap, endsInGap := s.findEndGap(startGap, end) - - startGapEqualsEndGap := startGap == endGap + startGap := gaps[0] + endGap := gaps[len(gaps)-1] + startGapEqualsEndGap := len(gaps) == 1 - if (startGapEqualsEndGap && end <= startGap.Value.Start) || - (!startGapEqualsEndGap && startGap.Value.End >= endGap.Value.Start && end <= startGap.Value.Start) { + if startGapEqualsEndGap && end <= startGap.Start { return errDuplicateStreamData } - startGapNext := startGap.Next() - startGapEnd := startGap.Value.End // save it, in case startGap is modified - endGapStart := endGap.Value.Start // save it, in case endGap is modified - endGapEnd := endGap.Value.End // save it, in case endGap is modified + startsInGap := covInterval.Start >= startGap.Start && covInterval.Start <= startGap.End + endsInGap := covInterval.End >= endGap.Start && covInterval.End < endGap.End + + startGapEnd := startGap.End // save it, in case startGap is modified + endGapStart := endGap.Start // save it, in case endGap is modified + endGapEnd := endGap.End // save it, in case endGap is modified + var adjustedStartGapEnd bool var wasCut bool @@ -113,29 +112,36 @@ func (s *frameSorter) push(data []byte, offset protocol.ByteCount, doneCb func() if !startsInGap && !hasReplacedAtLeastOne { // cut the frame, such that it starts at the start of the gap - data = data[startGap.Value.Start-start:] - start = startGap.Value.Start + data = data[startGap.Start-start:] + start = startGap.Start wasCut = true } - if start <= startGap.Value.Start { - if end >= startGap.Value.End { + if start <= startGap.Start { + if end >= startGap.End { // The frame covers the whole startGap. Delete the gap. - s.gaps.Remove(startGap) + s.gapTree.Delete(startGap) } else { - startGap.Value.Start = end + s.gapTree.Delete(startGap) + startGap.Start = end + // Re-insert the gap, but with the new start. + s.gapTree.Insert(startGap) } } else if !hasReplacedAtLeastOne { - startGap.Value.End = start + s.gapTree.Delete(startGap) + startGap.End = start + // Re-insert the gap, but with the new end. + s.gapTree.Insert(startGap) adjustedStartGapEnd = true } if !startGapEqualsEndGap { s.deleteConsecutive(startGapEnd) - var nextGap *list.Element[byteInterval] - for gap := startGapNext; gap.Value.End < endGapStart; gap = nextGap { - nextGap = gap.Next() - s.deleteConsecutive(gap.Value.End) - s.gaps.Remove(gap) + for _, g := range gaps[1:] { + if g.End >= endGapStart { + break + } + s.deleteConsecutive(g.End) + s.gapTree.Delete(g) } } @@ -148,14 +154,17 @@ func (s *frameSorter) push(data []byte, offset protocol.ByteCount, doneCb func() if end == endGapEnd { if !startGapEqualsEndGap { // The frame covers the whole endGap. Delete the gap. - s.gaps.Remove(endGap) + s.gapTree.Delete(endGap) } } else { if startGapEqualsEndGap && adjustedStartGapEnd { // The frame split the existing gap into two. - s.gaps.InsertAfter(byteInterval{Start: end, End: startGapEnd}, startGap) + s.gapTree.Insert(utils.ByteInterval{Start: end, End: startGapEnd}) } else if !startGapEqualsEndGap { - endGap.Value.Start = end + s.gapTree.Delete(endGap) + endGap.Start = end + // Re-insert the gap, but with the new start. + s.gapTree.Insert(endGap) } } @@ -169,7 +178,7 @@ func (s *frameSorter) push(data []byte, offset protocol.ByteCount, doneCb func() } } - if s.gaps.Len() > protocol.MaxStreamFrameSorterGaps { + if s.gapTree.Len() > protocol.MaxStreamFrameSorterGaps { return errors.New("too many gaps in received data") } @@ -177,30 +186,6 @@ func (s *frameSorter) push(data []byte, offset protocol.ByteCount, doneCb func() return nil } -func (s *frameSorter) findStartGap(offset protocol.ByteCount) (*list.Element[byteInterval], bool) { - for gap := s.gaps.Front(); gap != nil; gap = gap.Next() { - if offset >= gap.Value.Start && offset <= gap.Value.End { - return gap, true - } - if offset < gap.Value.Start { - return gap, false - } - } - panic("no gap found") -} - -func (s *frameSorter) findEndGap(startGap *list.Element[byteInterval], offset protocol.ByteCount) (*list.Element[byteInterval], bool) { - for gap := startGap; gap != nil; gap = gap.Next() { - if offset >= gap.Value.Start && offset < gap.Value.End { - return gap, true - } - if offset < gap.Value.Start { - return gap.Prev(), false - } - } - panic("no gap found") -} - // deleteConsecutive deletes consecutive frames from the queue, starting at pos func (s *frameSorter) deleteConsecutive(pos protocol.ByteCount) { for { @@ -225,9 +210,6 @@ func (s *frameSorter) Pop() (protocol.ByteCount, []byte, func()) { delete(s.queue, s.readPos) offset := s.readPos s.readPos += protocol.ByteCount(len(entry.Data)) - if s.gaps.Front().Value.End <= s.readPos { - panic("frame sorter BUG: read position higher than a gap") - } return offset, entry.Data, entry.DoneCb } diff --git a/frame_sorter_test.go b/frame_sorter_test.go index 451c3a025bf..03f9b0d2f72 100644 --- a/frame_sorter_test.go +++ b/frame_sorter_test.go @@ -8,6 +8,8 @@ import ( "time" "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/utils/tree" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -17,18 +19,25 @@ var _ = Describe("frame sorter", func() { var s *frameSorter checkGaps := func(expectedGaps []byteInterval) { - if s.gaps.Len() != len(expectedGaps) { + if s.gapTree.Len() != len(expectedGaps) { fmt.Println("Gaps:") - for gap := s.gaps.Front(); gap != nil; gap = gap.Next() { - fmt.Printf("\t%d - %d\n", gap.Value.Start, gap.Value.End) - } - ExpectWithOffset(1, s.gaps.Len()).To(Equal(len(expectedGaps))) + s.gapTree.Ascend(func(n *tree.Node[utils.ByteInterval], i int) bool { + gap := n.Value + fmt.Printf("\t%d - %d\n", gap.Start, gap.End) + return true + }) + ExpectWithOffset(1, s.gapTree.Len()).To(Equal(len(expectedGaps))) } var i int - for gap := s.gaps.Front(); gap != nil; gap = gap.Next() { - ExpectWithOffset(1, gap.Value).To(Equal(expectedGaps[i])) + s.gapTree.Ascend(func(n *tree.Node[utils.ByteInterval], _ int) bool { + gap := n.Value + ExpectWithOffset(1, gap).To(Equal(utils.ByteInterval{ + Start: expectedGaps[i].Start, + End: expectedGaps[i].End, + })) i++ - } + return true + }) } type callbackTracker struct { @@ -1377,7 +1386,7 @@ var _ = Describe("frame sorter", func() { for i := 0; i < protocol.MaxStreamFrameSorterGaps; i++ { Expect(s.Push([]byte("foobar"), protocol.ByteCount(i*7), nil)).To(Succeed()) } - Expect(s.gaps.Len()).To(Equal(protocol.MaxStreamFrameSorterGaps)) + Expect(s.gapTree.Len()).To(Equal(protocol.MaxStreamFrameSorterGaps)) err := s.Push([]byte("foobar"), protocol.ByteCount(protocol.MaxStreamFrameSorterGaps*7)+100, nil) Expect(err).To(MatchError("too many gaps in received data")) }) diff --git a/internal/utils/streamframe_interval.go b/internal/utils/streamframe_interval.go new file mode 100644 index 00000000000..78c411242b1 --- /dev/null +++ b/internal/utils/streamframe_interval.go @@ -0,0 +1,45 @@ +package utils + +import ( + "fmt" + + "github.com/quic-go/quic-go/internal/protocol" +) + +// ByteInterval is an interval from one ByteCount to the other +type ByteInterval struct { + Start protocol.ByteCount + End protocol.ByteCount +} + +func (i ByteInterval) Comp(v ByteInterval) int8 { + if i.Start < v.Start { + return -1 + } + if i.Start > v.Start { + return 1 + } + if i.End < v.End { + return -1 + } + if i.End > v.End { + return 1 + } + return 0 +} + +func (i ByteInterval) Match(n ByteInterval) int8 { + // check if there is an overlap + if i.Start <= n.End && i.End >= n.Start { + return 0 + } + if i.Start > n.End { + return 1 + } else { + return -1 + } +} + +func (i ByteInterval) String() string { + return fmt.Sprintf("[%d, %d]", i.Start, i.End) +} diff --git a/internal/utils/tree/tree.go b/internal/utils/tree/tree.go new file mode 100644 index 00000000000..e0b82899035 --- /dev/null +++ b/internal/utils/tree/tree.go @@ -0,0 +1,507 @@ +// Originated from https://github.com/ross-oreto/go-tree/blob/master/btree.go with the following changes: +// 1. Genericized the code +// 2. Added Match function for our frame sorter use case +// 3. Fixed a bug in deleteNode where in some cases the deleted flag was not set to true + +/* +Copyright (c) 2017 Ross Oreto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +package tree + +import ( + "fmt" +) + +type Val[T any] interface { + Comp(val T) int8 // returns 1 if > val, -1 if < val, 0 if equals to val + Match(cond T) int8 // returns 1 if > cond, -1 if < cond, 0 if matches cond +} + +// Btree represents an AVL tree +type Btree[T Val[T]] struct { + root *Node[T] + values []T + len int +} + +// Node represents a node in the tree with a value, left and right children, and a height/balance of the node. +type Node[T Val[T]] struct { + Value T + left, right *Node[T] + height int8 +} + +// New returns a new btree +func New[T Val[T]]() *Btree[T] { return new(Btree[T]).Init() } + +// Init initializes all values/clears the tree and returns the tree pointer +func (t *Btree[T]) Init() *Btree[T] { + t.root = nil + t.values = nil + t.len = 0 + return t +} + +// String returns a string representation of the tree values +func (t *Btree[T]) String() string { + return fmt.Sprint(t.Values()) +} + +// Empty returns true if the tree is empty +func (t *Btree[T]) Empty() bool { + return t.root == nil +} + +// NotEmpty returns true if the tree is not empty +func (t *Btree[T]) NotEmpty() bool { + return t.root != nil +} + +// Insert inserts a new value into the tree and returns the tree pointer +func (t *Btree[T]) Insert(value T) *Btree[T] { + added := false + t.root = insert(t.root, value, &added) + if added { + t.len++ + } + t.values = nil + return t +} + +func insert[T Val[T]](n *Node[T], value T, added *bool) *Node[T] { + if n == nil { + *added = true + return (&Node[T]{Value: value}).Init() + } + c := value.Comp(n.Value) + if c > 0 { + n.right = insert(n.right, value, added) + } else if c < 0 { + n.left = insert(n.left, value, added) + } else { + n.Value = value + *added = false + return n + } + + n.height = n.maxHeight() + 1 + c = balance(n) + + if c > 1 { + c = value.Comp(n.left.Value) + if c < 0 { + return n.rotateRight() + } else if c > 0 { + n.left = n.left.rotateLeft() + return n.rotateRight() + } + } else if c < -1 { + c = value.Comp(n.right.Value) + if c > 0 { + return n.rotateLeft() + } else if c < 0 { + n.right = n.right.rotateRight() + return n.rotateLeft() + } + } + return n +} + +// InsertAll inserts all the values into the tree and returns the tree pointer +func (t *Btree[T]) InsertAll(values []T) *Btree[T] { + for _, v := range values { + t.Insert(v) + } + return t +} + +// Contains returns true if the tree contains the specified value +func (t *Btree[T]) Contains(value T) bool { + return t.Get(value) != nil +} + +// ContainsAny returns true if the tree contains any of the values +func (t *Btree[T]) ContainsAny(values []T) bool { + for _, v := range values { + if t.Contains(v) { + return true + } + } + return false +} + +// ContainsAll returns true if the tree contains all of the values +func (t *Btree[T]) ContainsAll(values []T) bool { + for _, v := range values { + if !t.Contains(v) { + return false + } + } + return true +} + +// Get returns the node value associated with the search value +func (t *Btree[T]) Get(value T) *T { + var node *Node[T] + if t.root != nil { + node = t.root.get(value) + } + if node != nil { + return &node.Value + } + return nil +} + +func (t *Btree[T]) Match(cond T) []T { + var matches []T + if t.root != nil { + t.root.match(cond, &matches) + } + return matches +} + +// Len return the number of nodes in the tree +func (t *Btree[T]) Len() int { + return t.len +} + +// Head returns the first value in the tree +func (t *Btree[T]) Head() *T { + if t.root == nil { + return nil + } + beginning := t.root + for beginning.left != nil { + beginning = beginning.left + } + if beginning == nil { + for beginning.right != nil { + beginning = beginning.right + } + } + if beginning != nil { + return &beginning.Value + } + return nil +} + +// Tail returns the last value in the tree +func (t *Btree[T]) Tail() *T { + if t.root == nil { + return nil + } + beginning := t.root + for beginning.right != nil { + beginning = beginning.right + } + if beginning == nil { + for beginning.left != nil { + beginning = beginning.left + } + } + if beginning != nil { + return &beginning.Value + } + return nil +} + +// Values returns a slice of all the values in tree in order +func (t *Btree[T]) Values() []T { + if t.values == nil { + t.values = make([]T, t.len) + t.Ascend(func(n *Node[T], i int) bool { + t.values[i] = n.Value + return true + }) + } + return t.values +} + +// Delete deletes the node from the tree associated with the search value +func (t *Btree[T]) Delete(value T) *Btree[T] { + deleted := false + t.root = deleteNode(t.root, value, &deleted) + if deleted { + t.len-- + } + t.values = nil + return t +} + +// DeleteAll deletes the nodes from the tree associated with the search values +func (t *Btree[T]) DeleteAll(values []T) *Btree[T] { + for _, v := range values { + t.Delete(v) + } + return t +} + +func deleteNode[T Val[T]](n *Node[T], value T, deleted *bool) *Node[T] { + if n == nil { + return n + } + + c := value.Comp(n.Value) + + if c < 0 { + n.left = deleteNode(n.left, value, deleted) + } else if c > 0 { + n.right = deleteNode(n.right, value, deleted) + } else { + if n.left == nil { + t := n.right + n.Init() + *deleted = true + return t + } else if n.right == nil { + t := n.left + n.Init() + *deleted = true + return t + } + t := n.right.min() + n.Value = t.Value + n.right = deleteNode(n.right, t.Value, deleted) + *deleted = true + } + + // re-balance + if n == nil { + return n + } + n.height = n.maxHeight() + 1 + bal := balance(n) + if bal > 1 { + if balance(n.left) >= 0 { + return n.rotateRight() + } + n.left = n.left.rotateLeft() + return n.rotateRight() + } else if bal < -1 { + if balance(n.right) <= 0 { + return n.rotateLeft() + } + n.right = n.right.rotateRight() + return n.rotateLeft() + } + + return n +} + +// Pop deletes the last node from the tree and returns its value +func (t *Btree[T]) Pop() *T { + value := t.Tail() + if value != nil { + t.Delete(*value) + } + return value +} + +// Pull deletes the first node from the tree and returns its value +func (t *Btree[T]) Pull() *T { + value := t.Head() + if value != nil { + t.Delete(*value) + } + return value +} + +// NodeIterator expresses the iterator function used for traversals +type NodeIterator[T Val[T]] func(n *Node[T], i int) bool + +// Ascend performs an ascending order traversal of the tree calling the iterator function on each node +// the iterator will continue as long as the NodeIterator returns true +func (t *Btree[T]) Ascend(iterator NodeIterator[T]) { + var i int + if t.root != nil { + t.root.iterate(iterator, &i, true) + } +} + +// Descend performs a descending order traversal of the tree using the iterator +// the iterator will continue as long as the NodeIterator returns true +func (t *Btree[T]) Descend(iterator NodeIterator[T]) { + var i int + if t.root != nil { + t.root.rIterate(iterator, &i, true) + } +} + +// Debug prints out useful debug information about the tree for debugging purposes +func (t *Btree[T]) Debug() { + fmt.Println("----------------------------------------------------------------------------------------------") + if t.Empty() { + fmt.Println("tree is empty") + } else { + fmt.Println(t.Len(), "elements") + } + + t.Ascend(func(n *Node[T], i int) bool { + if t.root.Value.Comp(n.Value) == 0 { + fmt.Print("ROOT ** ") + } + n.Debug() + return true + }) + fmt.Println("----------------------------------------------------------------------------------------------") +} + +// Init initializes the values of the node or clears the node and returns the node pointer +func (n *Node[T]) Init() *Node[T] { + n.height = 1 + n.left = nil + n.right = nil + return n +} + +// String returns a string representing the node +func (n *Node[T]) String() string { + return fmt.Sprint(n.Value) +} + +// Debug prints out useful debug information about the tree node for debugging purposes +func (n *Node[T]) Debug() { + var children string + if n.left == nil && n.right == nil { + children = "no children |" + } else if n.left != nil && n.right != nil { + children = fmt.Sprint("left child:", n.left.String(), " right child:", n.right.String()) + } else if n.right != nil { + children = fmt.Sprint("right child:", n.right.String()) + } else { + children = fmt.Sprint("left child:", n.left.String()) + } + + fmt.Println(n.String(), "|", "height", n.height, "|", "balance", balance(n), "|", children) +} + +func height[T Val[T]](n *Node[T]) int8 { + if n != nil { + return n.height + } + return 0 +} + +func balance[T Val[T]](n *Node[T]) int8 { + if n == nil { + return 0 + } + return height(n.left) - height(n.right) +} + +func (n *Node[T]) get(val T) *Node[T] { + var node *Node[T] + c := val.Comp(n.Value) + if c < 0 { + if n.left != nil { + node = n.left.get(val) + } + } else if c > 0 { + if n.right != nil { + node = n.right.get(val) + } + } else { + node = n + } + return node +} + +func (n *Node[T]) match(cond T, results *[]T) { + c := n.Value.Match(cond) + if c > 0 { + if n.left != nil { + n.left.match(cond, results) + } + } else if c < 0 { + if n.right != nil { + n.right.match(cond, results) + } + } else { + // other matching nodes could be on both sides + if n.left != nil { + n.left.match(cond, results) + } + *results = append(*results, n.Value) + if n.right != nil { + n.right.match(cond, results) + } + } +} + +func (n *Node[T]) rotateRight() *Node[T] { + l := n.left + // Rotation + l.right, n.left = n, l.right + + // update heights + n.height = n.maxHeight() + 1 + l.height = l.maxHeight() + 1 + + return l +} + +func (n *Node[T]) rotateLeft() *Node[T] { + r := n.right + // Rotation + r.left, n.right = n, r.left + + // update heights + n.height = n.maxHeight() + 1 + r.height = r.maxHeight() + 1 + + return r +} + +func (n *Node[T]) iterate(iterator NodeIterator[T], i *int, cont bool) { + if n != nil && cont { + n.left.iterate(iterator, i, cont) + cont = iterator(n, *i) + *i++ + n.right.iterate(iterator, i, cont) + } +} + +func (n *Node[T]) rIterate(iterator NodeIterator[T], i *int, cont bool) { + if n != nil && cont { + n.right.iterate(iterator, i, cont) + cont = iterator(n, *i) + *i++ + n.left.iterate(iterator, i, cont) + } +} + +func (n *Node[T]) min() *Node[T] { + current := n + for current.left != nil { + current = current.left + } + return current +} + +func (n *Node[T]) maxHeight() int8 { + rh := height(n.right) + lh := height(n.left) + if rh > lh { + return rh + } + return lh +} diff --git a/internal/utils/tree/tree_match_test.go b/internal/utils/tree/tree_match_test.go new file mode 100644 index 00000000000..bb6c5b16229 --- /dev/null +++ b/internal/utils/tree/tree_match_test.go @@ -0,0 +1,95 @@ +package tree + +import ( + "testing" +) + +type interval struct { + start, end int +} + +func (i interval) Comp(ot interval) int8 { + if i.start < ot.start { + return -1 + } + if i.start > ot.start { + return 1 + } + if i.end < ot.end { + return -1 + } + if i.end > ot.end { + return 1 + } + return 0 +} + +func (i interval) Match(ot interval) int8 { + // Check for overlap + if i.start <= ot.end && i.end >= ot.start { + return 0 + } + if i.start > ot.end { + return 1 + } else { + return -1 + } +} + +func TestBtree(t *testing.T) { + values := []interval{ + {start: 9, end: 10}, + {start: 3, end: 4}, + {start: 1, end: 2}, + {start: 5, end: 6}, + {start: 7, end: 8}, + {start: 20, end: 100}, + {start: 11, end: 12}, + } + btree := New[interval]() + btree.InsertAll(values) + + expect, actual := len(values), btree.Len() + if actual != expect { + t.Error("length should equal", expect, "actual", actual) + } + + rs := btree.Match(interval{start: 1, end: 6}) + if len(rs) != 3 { + t.Errorf("expected 3 results, got %d", len(rs)) + } + if rs[0].start != 1 || rs[0].end != 2 { + t.Errorf("expected result 1 to be [1, 2], got %v", rs[0]) + } + if rs[1].start != 3 || rs[1].end != 4 { + t.Errorf("expected result 2 to be [3, 4], got %v", rs[1]) + } + if rs[2].start != 5 || rs[2].end != 6 { + t.Errorf("expected result 3 to be [5, 6], got %v", rs[2]) + } + + btree.Delete(interval{start: 5, end: 6}) + + rs = btree.Match(interval{start: 1, end: 6}) + if len(rs) != 2 { + t.Errorf("expected 2 results, got %d", len(rs)) + } + if rs[0].start != 1 || rs[0].end != 2 { + t.Errorf("expected result 1 to be [1, 2], got %v", rs[0]) + } + if rs[1].start != 3 || rs[1].end != 4 { + t.Errorf("expected result 2 to be [3, 4], got %v", rs[1]) + } + + btree.Delete(interval{start: 11, end: 12}) + + rs = btree.Match(interval{start: 12, end: 19}) + if len(rs) != 0 { + t.Errorf("expected 0 results, got %d", len(rs)) + } + + expect, actual = len(values)-2, btree.Len() + if actual != expect { + t.Error("length should equal", expect, "actual", actual) + } +} diff --git a/internal/utils/tree/tree_test.go b/internal/utils/tree/tree_test.go new file mode 100644 index 00000000000..547bf4d450c --- /dev/null +++ b/internal/utils/tree/tree_test.go @@ -0,0 +1,254 @@ +package tree + +import ( + "reflect" + "testing" +) + +type IntVal int + +func (i IntVal) Comp(v IntVal) int8 { + if i > v { + return 1 + } else if i < v { + return -1 + } else { + return 0 + } +} + +func (i IntVal) Match(v IntVal) int8 { + // Unused + return 0 +} + +type StringVal string + +func (i StringVal) Comp(v StringVal) int8 { + if i > v { + return 1 + } else if i < v { + return -1 + } else { + return 0 + } +} + +func (i StringVal) Match(v StringVal) int8 { + // Unused + return 0 +} + +func btreeInOrder(n int) *Btree[IntVal] { + btree := New[IntVal]() + for i := 1; i <= n; i++ { + btree.Insert(IntVal(i)) + } + return btree +} + +func btreeFixed[T Val[T]](values []T) *Btree[T] { + btree := New[T]() + btree.InsertAll(values) + return btree +} + +func TestBtree_Get(t *testing.T) { + values := []IntVal{9, 4, 2, 6, 8, 0, 3, 1, 7, 5} + btree := btreeFixed[IntVal](values).InsertAll(values) + + expect, actual := len(values), btree.Len() + if actual != expect { + t.Error("length should equal", expect, "actual", actual) + } + + expect2 := IntVal(2) + if btree.Get(expect2) == nil || *btree.Get(expect2) != expect2 { + t.Error("value should equal", expect2) + } +} + +func TestBtreeString_Get(t *testing.T) { + tree := New[StringVal]() + tree.Insert("Oreto").Insert("Michael").Insert("Ross") + + expect := StringVal("Ross") + if tree.Get(expect) == nil || *tree.Get(expect) != expect { + t.Error("value should equal", expect) + } +} + +func TestBtree_Contains(t *testing.T) { + btree := btreeInOrder(1000) + + test := IntVal(1) + if !btree.Contains(test) { + t.Error("tree should contain", test) + } + + test2 := []IntVal{1, 2, 3, 4} + if !btree.ContainsAll(test2) { + t.Error("tree should contain", test2) + } + + test2 = []IntVal{5} + if !btree.ContainsAny(test2) { + t.Error("tree should contain", test2) + } + + test2 = []IntVal{5000, 2000} + if btree.ContainsAny(test2) { + t.Error("tree should not contain any", test2) + } +} + +func TestBtree_String(t *testing.T) { + btree := btreeFixed[IntVal]([]IntVal{1, 2, 3, 4, 5, 6}) + s1 := btree.String() + s2 := "[1 2 3 4 5 6]" + if s1 != s2 { + t.Error(s1, "tree string representation should equal", s2) + } +} + +func TestBtree_Values(t *testing.T) { + const capacity = 3 + btree := btreeFixed[IntVal]([]IntVal{1, 2}) + + b := btree.Values() + c := []IntVal{1, 2} + if !reflect.DeepEqual(c, b) { + t.Error(c, "should equal", b) + } + btree.Insert(IntVal(3)) + + desc := [capacity]IntVal{} + btree.Descend(func(n *Node[IntVal], i int) bool { + desc[i] = n.Value + return true + }) + d := [capacity]IntVal{3, 2, 1} + if !reflect.DeepEqual(desc, d) { + t.Error(desc, "should equal", d) + } + + e := []IntVal{1, 2, 3} + for i, v := range btree.Values() { + if e[i] != v { + t.Error(e[i], "should equal", v) + } + } +} + +func TestBtree_Delete(t *testing.T) { + test := []IntVal{1, 2, 3} + btree := btreeFixed(test) + + btree.DeleteAll(test) + + if !btree.Empty() { + t.Error("tree should be empty") + } + + btree = btreeFixed(test) + pop := btree.Pop() + if pop == nil || *pop != IntVal(3) { + t.Error(pop, "should be 3") + } + pull := btree.Pull() + if pull == nil || *pull != IntVal(1) { + t.Error(pop, "should be 3") + } + if !btree.Delete(*btree.Pop()).Empty() { + t.Error("tree should be empty") + } + btree.Pop() + btree.Pull() +} + +func TestBtree_HeadTail(t *testing.T) { + btree := btreeFixed[IntVal]([]IntVal{1, 2, 3}) + if btree.Head() == nil || *btree.Head() != IntVal(1) { + t.Error("head element should be 1") + } + if btree.Tail() == nil || *btree.Tail() != IntVal(3) { + t.Error("head element should be 3") + } + btree.Init() + if btree.Head() != nil { + t.Error("head element should be nil") + } +} + +type TestKey1 struct { + Name string +} + +func (testkey TestKey1) Comp(tk TestKey1) int8 { + var c int8 + if testkey.Name > tk.Name { + c = 1 + } else if testkey.Name < tk.Name { + c = -1 + } + return c +} + +func (testkey TestKey1) Match(tk TestKey1) int8 { + // Unused + return 0 +} + +func TestBtree_CustomKey(t *testing.T) { + btree := New[TestKey1]() + btree.InsertAll([]TestKey1{ + {Name: "Ross"}, + {Name: "Michael"}, + {Name: "Angelo"}, + {Name: "Jason"}, + }) + + rootName := btree.root.Value.Name + if btree.root.Value.Name != "Michael" { + t.Error(rootName, "should equal Michael") + } + btree.Init() + btree.InsertAll([]TestKey1{ + {Name: "Ross"}, + {Name: "Michael"}, + {Name: "Angelo"}, + {Name: "Jason"}, + }) + btree.Debug() + s := btree.String() + test := "[{Angelo} {Jason} {Michael} {Ross}]" + if s != test { + t.Error(s, "should equal", test) + } + + btree.Delete(TestKey1{Name: "Michael"}) + if btree.Len() != 3 { + t.Error("tree length should be 3") + } + test = "Jason" + if btree.root.Value.Name != test { + t.Error(btree.root.Value, "root of the tree should be", test) + } + for !btree.Empty() { + btree.Delete(btree.root.Value) + } + btree.Debug() +} + +func TestBtree_Duplicates(t *testing.T) { + btree := New[IntVal]() + btree.InsertAll([]IntVal{ + 0, 2, 5, 10, 15, 20, 12, 14, + 13, 25, 0, 2, 5, 10, 15, 20, 12, 14, 13, 25, + }) + test := 10 + length := btree.Len() + if length != test { + t.Error(length, "tree length should be", test) + } +} From 1657f2ab6f57c5234d479e3c15c50b8a6255b1c9 Mon Sep 17 00:00:00 2001 From: tobyxdd Date: Fri, 2 Jun 2023 21:26:31 -0700 Subject: [PATCH 05/14] fix: disable buffer size warning logs properly --- transport.go | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/transport.go b/transport.go index b650fafc4a0..28d9048b4d5 100644 --- a/transport.go +++ b/transport.go @@ -6,9 +6,6 @@ import ( "crypto/tls" "errors" "net" - "os" - "strconv" - "strings" "sync" "time" @@ -272,33 +269,12 @@ func (t *Transport) close(e error) { t.closed = true } -// only print warnings about the UDP receive buffer size once -var setBufferWarningOnce sync.Once - func (t *Transport) listen(conn rawConn) { defer close(t.listening) defer getMultiplexer().RemoveConn(t.Conn) - if err := setReceiveBuffer(t.Conn, t.logger); err != nil { - if !strings.Contains(err.Error(), "use of closed network connection") { - setBufferWarningOnce.Do(func() { - if disable, _ := strconv.ParseBool(os.Getenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING")); disable { - return - } - // log.Printf("%s. See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.", err) - }) - } - } - if err := setSendBuffer(t.Conn, t.logger); err != nil { - if !strings.Contains(err.Error(), "use of closed network connection") { - setBufferWarningOnce.Do(func() { - if disable, _ := strconv.ParseBool(os.Getenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING")); disable { - return - } - // log.Printf("%s. See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.", err) - }) - } - } + _ = setReceiveBuffer(t.Conn, t.logger) + _ = setSendBuffer(t.Conn, t.logger) for { p, err := conn.ReadPacket() From 6dccf9f8de2c1bb20084d4faffe369759dd4906d Mon Sep 17 00:00:00 2001 From: Toby Date: Mon, 31 Jul 2023 16:50:18 -0700 Subject: [PATCH 06/14] feat: rename the module to "github.com/apernet/quic-go" & add a rename script --- Changelog.md | 4 +- README.md | 4 +- SECURITY.md | 4 +- buffer_pool.go | 2 +- buffer_pool_test.go | 2 +- client.go | 6 +-- client_test.go | 8 ++-- closed_conn.go | 4 +- closed_conn_test.go | 4 +- config.go | 6 +-- config_test.go | 6 +-- congestion/interface.go | 2 +- conn_id_generator.go | 8 ++-- conn_id_generator_test.go | 6 +-- conn_id_manager.go | 10 ++-- conn_id_manager_test.go | 6 +-- connection.go | 26 +++++----- connection_test.go | 22 ++++----- connection_timer.go | 2 +- crypto_stream.go | 8 ++-- crypto_stream_manager.go | 6 +-- crypto_stream_manager_test.go | 4 +- crypto_stream_test.go | 6 +-- datagram_queue.go | 6 +-- datagram_queue_test.go | 4 +- errors.go | 2 +- example/client/main.go | 12 ++--- example/echo/echo.go | 2 +- example/main.go | 12 ++--- frame_sorter.go | 6 +-- frame_sorter_test.go | 6 +-- framer.go | 10 ++-- framer_test.go | 6 +-- fuzzing/frames/cmd/corpus.go | 8 ++-- fuzzing/frames/fuzz.go | 4 +- fuzzing/handshake/cmd/corpus.go | 14 +++--- fuzzing/handshake/fuzz.go | 10 ++-- fuzzing/header/cmd/corpus.go | 8 ++-- fuzzing/header/fuzz.go | 4 +- fuzzing/tokens/fuzz.go | 4 +- fuzzing/transportparameters/cmd/corpus.go | 8 ++-- fuzzing/transportparameters/fuzz.go | 6 +-- go.mod | 2 +- http3/body.go | 2 +- http3/body_test.go | 4 +- http3/capsule.go | 2 +- http3/capsule_test.go | 2 +- http3/client.go | 8 ++-- http3/client_test.go | 10 ++-- http3/error_codes.go | 2 +- http3/frames.go | 4 +- http3/frames_test.go | 2 +- http3/http_stream.go | 4 +- http3/http_stream_test.go | 4 +- http3/mock_quic_early_listener_test.go | 4 +- http3/mock_roundtripcloser_test.go | 2 +- http3/mockgen.go | 4 +- http3/request_writer.go | 4 +- http3/request_writer_test.go | 4 +- http3/response_writer.go | 4 +- http3/response_writer_test.go | 4 +- http3/roundtrip.go | 2 +- http3/roundtrip_test.go | 4 +- http3/server.go | 8 ++-- http3/server_test.go | 12 ++--- integrationtests/gomodvendor/go.mod | 4 +- integrationtests/gomodvendor/main.go | 2 +- integrationtests/self/benchmark_test.go | 2 +- integrationtests/self/cancelation_test.go | 4 +- integrationtests/self/close_test.go | 4 +- integrationtests/self/conn_id_test.go | 4 +- integrationtests/self/datagram_test.go | 6 +-- integrationtests/self/deadline_test.go | 2 +- integrationtests/self/drop_test.go | 4 +- integrationtests/self/early_data_test.go | 4 +- integrationtests/self/handshake_drop_test.go | 8 ++-- integrationtests/self/handshake_rtt_test.go | 4 +- integrationtests/self/handshake_test.go | 8 ++-- integrationtests/self/hotswap_test.go | 4 +- integrationtests/self/http_test.go | 4 +- integrationtests/self/key_update_test.go | 8 ++-- integrationtests/self/mitm_test.go | 10 ++-- integrationtests/self/multiplex_test.go | 2 +- integrationtests/self/packetization_test.go | 6 +-- integrationtests/self/resumption_test.go | 2 +- integrationtests/self/rtt_test.go | 4 +- integrationtests/self/self_suite_test.go | 12 ++--- integrationtests/self/stateless_reset_test.go | 4 +- integrationtests/self/stream_test.go | 2 +- integrationtests/self/timeout_test.go | 8 ++-- integrationtests/self/tracer_test.go | 10 ++-- integrationtests/self/uni_stream_test.go | 4 +- integrationtests/self/zero_rtt_oldgo_test.go | 10 ++-- integrationtests/self/zero_rtt_test.go | 10 ++-- integrationtests/tools/proxy/proxy.go | 4 +- integrationtests/tools/proxy/proxy_test.go | 4 +- integrationtests/tools/qlog.go | 8 ++-- .../versionnegotiation/handshake_test.go | 8 ++-- .../versionnegotiation/rtt_test.go | 6 +-- .../versionnegotiation_suite_test.go | 6 +-- interface.go | 8 ++-- internal/ackhandler/ack_eliciting.go | 2 +- internal/ackhandler/ack_eliciting_test.go | 2 +- internal/ackhandler/ackhandler.go | 6 +-- internal/ackhandler/cc_adapter.go | 4 +- internal/ackhandler/frame.go | 2 +- internal/ackhandler/interfaces.go | 6 +-- .../mock_sent_packet_tracker_test.go | 4 +- internal/ackhandler/mockgen.go | 2 +- internal/ackhandler/packet.go | 2 +- .../ackhandler/packet_number_generator.go | 4 +- .../packet_number_generator_test.go | 2 +- .../ackhandler/received_packet_handler.go | 6 +-- .../received_packet_handler_test.go | 6 +-- .../ackhandler/received_packet_history.go | 6 +-- .../received_packet_history_test.go | 4 +- .../ackhandler/received_packet_tracker.go | 6 +-- .../received_packet_tracker_test.go | 6 +-- internal/ackhandler/sent_packet_handler.go | 14 +++--- .../ackhandler/sent_packet_handler_test.go | 10 ++-- internal/ackhandler/sent_packet_history.go | 2 +- .../ackhandler/sent_packet_history_test.go | 2 +- internal/congestion/bandwidth.go | 2 +- internal/congestion/cubic.go | 4 +- internal/congestion/cubic_sender.go | 6 +-- internal/congestion/cubic_sender_test.go | 4 +- internal/congestion/cubic_test.go | 2 +- internal/congestion/hybrid_slow_start.go | 4 +- internal/congestion/hybrid_slow_start_test.go | 2 +- internal/congestion/interface.go | 2 +- internal/congestion/pacer.go | 4 +- internal/congestion/pacer_test.go | 2 +- internal/flowcontrol/base_flow_controller.go | 4 +- .../flowcontrol/base_flow_controller_test.go | 4 +- .../flowcontrol/connection_flow_controller.go | 6 +-- .../connection_flow_controller_test.go | 4 +- internal/flowcontrol/interface.go | 2 +- .../flowcontrol/stream_flow_controller.go | 6 +-- .../stream_flow_controller_test.go | 6 +-- internal/handshake/aead.go | 4 +- internal/handshake/aead_test.go | 2 +- internal/handshake/crypto_setup.go | 14 +++--- internal/handshake/crypto_setup_test.go | 12 ++--- internal/handshake/header_protector.go | 2 +- internal/handshake/initial_aead.go | 2 +- internal/handshake/initial_aead_test.go | 2 +- internal/handshake/interface.go | 4 +- internal/handshake/retry.go | 2 +- internal/handshake/retry_test.go | 2 +- internal/handshake/session_ticket.go | 4 +- internal/handshake/session_ticket_test.go | 4 +- internal/handshake/token_generator.go | 2 +- internal/handshake/token_generator_test.go | 2 +- internal/handshake/updatable_aead.go | 8 ++-- internal/handshake/updatable_aead_test.go | 8 ++-- internal/logutils/frame.go | 6 +-- internal/logutils/frame_test.go | 4 +- .../ackhandler/received_packet_handler.go | 6 +-- .../mocks/ackhandler/sent_packet_handler.go | 10 ++-- internal/mocks/congestion.go | 4 +- internal/mocks/connection_flow_controller.go | 4 +- internal/mocks/crypto_setup.go | 6 +-- internal/mocks/logging/connection_tracer.go | 10 ++-- internal/mocks/logging/tracer.go | 8 ++-- internal/mocks/long_header_opener.go | 4 +- internal/mocks/mockgen.go | 26 +++++----- internal/mocks/quic/early_conn.go | 8 ++-- internal/mocks/quic/stream.go | 6 +-- internal/mocks/short_header_opener.go | 4 +- internal/mocks/short_header_sealer.go | 4 +- internal/mocks/stream_flow_controller.go | 4 +- internal/qerr/error_codes.go | 2 +- internal/qerr/errors.go | 2 +- internal/qerr/errors_test.go | 2 +- internal/qtls/cipher_suite_test.go | 2 +- internal/qtls/client_session_cache_test.go | 2 +- internal/qtls/go120.go | 2 +- internal/qtls/go120_test.go | 2 +- internal/qtls/go121.go | 2 +- internal/qtls/go121_test.go | 2 +- internal/qtls/go_oldversion.go | 2 +- internal/testutils/testutils.go | 6 +-- internal/utils/log.go | 2 +- internal/utils/ringbuffer/ringbuffer.go | 2 +- internal/utils/rtt_stats.go | 2 +- internal/utils/rtt_stats_test.go | 2 +- internal/utils/streamframe_interval.go | 2 +- internal/wire/ack_frame.go | 6 +-- internal/wire/ack_frame_test.go | 4 +- internal/wire/ack_range.go | 2 +- internal/wire/connection_close_frame.go | 4 +- internal/wire/connection_close_frame_test.go | 2 +- internal/wire/crypto_frame.go | 4 +- internal/wire/crypto_frame_test.go | 4 +- internal/wire/data_blocked_frame.go | 4 +- internal/wire/data_blocked_frame_test.go | 4 +- internal/wire/datagram_frame.go | 4 +- internal/wire/datagram_frame_test.go | 4 +- internal/wire/extended_header.go | 6 +-- internal/wire/extended_header_test.go | 6 +-- internal/wire/frame_parser.go | 6 +-- internal/wire/frame_parser_test.go | 4 +- internal/wire/handshake_done_frame.go | 2 +- internal/wire/handshake_done_frame_test.go | 2 +- internal/wire/header.go | 6 +-- internal/wire/header_test.go | 2 +- internal/wire/interface.go | 2 +- internal/wire/log.go | 4 +- internal/wire/log_test.go | 4 +- internal/wire/max_data_frame.go | 4 +- internal/wire/max_data_frame_test.go | 4 +- internal/wire/max_stream_data_frame.go | 4 +- internal/wire/max_stream_data_frame_test.go | 4 +- internal/wire/max_streams_frame.go | 4 +- internal/wire/max_streams_frame_test.go | 4 +- internal/wire/new_connection_id_frame.go | 4 +- internal/wire/new_connection_id_frame_test.go | 2 +- internal/wire/new_token_frame.go | 4 +- internal/wire/new_token_frame_test.go | 4 +- internal/wire/path_challenge_frame.go | 2 +- internal/wire/path_challenge_frame_test.go | 2 +- internal/wire/path_response_frame.go | 2 +- internal/wire/path_response_frame_test.go | 2 +- internal/wire/ping_frame.go | 2 +- internal/wire/ping_frame_test.go | 2 +- internal/wire/pool.go | 2 +- internal/wire/reset_stream_frame.go | 6 +-- internal/wire/reset_stream_frame_test.go | 6 +-- internal/wire/retire_connection_id_frame.go | 4 +- .../wire/retire_connection_id_frame_test.go | 2 +- internal/wire/short_header.go | 4 +- internal/wire/short_header_test.go | 4 +- internal/wire/stop_sending_frame.go | 6 +-- internal/wire/stop_sending_frame_test.go | 6 +-- internal/wire/stream_data_blocked_frame.go | 4 +- .../wire/stream_data_blocked_frame_test.go | 4 +- internal/wire/stream_frame.go | 4 +- internal/wire/stream_frame_test.go | 4 +- internal/wire/streams_blocked_frame.go | 4 +- internal/wire/streams_blocked_frame_test.go | 4 +- internal/wire/transport_parameter_test.go | 6 +-- internal/wire/transport_parameters.go | 8 ++-- internal/wire/version_negotiation.go | 4 +- internal/wire/version_negotiation_test.go | 2 +- internal/wire/wire_suite_test.go | 4 +- interop/client/main.go | 14 +++--- interop/http09/client.go | 2 +- interop/http09/http_test.go | 4 +- interop/http09/server.go | 2 +- interop/server/main.go | 10 ++-- interop/utils/logging.go | 8 ++-- logging/frame.go | 2 +- logging/interface.go | 8 ++-- logging/mock_connection_tracer_test.go | 8 ++-- logging/mock_tracer_test.go | 6 +-- logging/mockgen.go | 4 +- logging/multiplex_test.go | 4 +- logging/packet_header.go | 2 +- logging/packet_header_test.go | 4 +- mock_ack_frame_source_test.go | 6 +-- mock_conn_runner_test.go | 4 +- mock_crypto_data_handler_test.go | 6 +-- mock_crypto_stream_test.go | 6 +-- mock_frame_source_test.go | 6 +-- mock_mtu_discoverer_test.go | 6 +-- mock_packer_test.go | 8 ++-- mock_packet_handler_manager_test.go | 4 +- mock_packet_handler_test.go | 4 +- mock_quic_conn_test.go | 8 ++-- mock_receive_stream_internal_test.go | 8 ++-- mock_sealing_manager_test.go | 4 +- mock_send_conn_test.go | 4 +- mock_send_stream_internal_test.go | 10 ++-- mock_sender_test.go | 4 +- mock_stream_getter_test.go | 4 +- mock_stream_internal_test.go | 10 ++-- mock_stream_manager_test.go | 6 +-- mock_stream_sender_test.go | 6 +-- mock_token_store_test.go | 2 +- mock_unknown_packet_handler_test.go | 2 +- mock_unpacker_test.go | 6 +-- mockgen.go | 48 +++++++++---------- module_rename.py | 33 +++++++++++++ mtu_discoverer.go | 8 ++-- mtu_discoverer_test.go | 4 +- multiplexer.go | 4 +- oss-fuzz.sh | 12 ++--- packet_handler_map.go | 4 +- packet_handler_map_test.go | 4 +- packet_packer.go | 10 ++-- packet_packer_test.go | 16 +++---- packet_unpacker.go | 8 ++-- packet_unpacker_test.go | 10 ++-- qlog/event.go | 8 ++-- qlog/frame.go | 4 +- qlog/frame_test.go | 6 +-- qlog/packet_header.go | 4 +- qlog/packet_header_test.go | 6 +-- qlog/qlog.go | 12 ++--- qlog/qlog_test.go | 10 ++-- qlog/trace.go | 4 +- qlog/types.go | 6 +-- qlog/types_test.go | 6 +-- quicvarint/varint.go | 2 +- receive_stream.go | 10 ++-- receive_stream_test.go | 6 +-- retransmission_queue.go | 6 +-- retransmission_queue_test.go | 4 +- send_conn.go | 2 +- send_queue.go | 2 +- send_queue_test.go | 2 +- send_stream.go | 12 ++--- send_stream_test.go | 8 ++-- server.go | 12 ++--- server_test.go | 16 +++---- stream.go | 8 ++-- stream_test.go | 6 +-- streams_map.go | 8 ++-- streams_map_incoming.go | 4 +- streams_map_incoming_test.go | 4 +- streams_map_outgoing.go | 4 +- streams_map_outgoing_test.go | 4 +- streams_map_test.go | 10 ++-- sys_conn.go | 8 ++-- sys_conn_buffers.go | 4 +- sys_conn_buffers_write.go | 4 +- sys_conn_df_darwin.go | 4 +- sys_conn_df_linux.go | 2 +- sys_conn_df_windows.go | 2 +- sys_conn_oob.go | 4 +- sys_conn_oob_test.go | 4 +- sys_conn_test.go | 2 +- token_store.go | 4 +- transport.go | 10 ++-- transport_test.go | 8 ++-- window_update_queue.go | 6 +-- window_update_queue_test.go | 6 +-- 337 files changed, 928 insertions(+), 895 deletions(-) create mode 100644 module_rename.py diff --git a/Changelog.md b/Changelog.md index 82df5fb2457..4b3692a1091 100644 --- a/Changelog.md +++ b/Changelog.md @@ -101,8 +101,8 @@ - Add a `quic.Config` option to configure keep-alive - Rename the STK to Cookie - Implement `net.Conn`-style deadlines for streams -- Remove the `tls.Config` from the `quic.Config`. The `tls.Config` must now be passed to the `Dial` and `Listen` functions as a separate parameter. See the [Godoc](https://godoc.org/github.com/quic-go/quic-go) for details. -- Changed the log level environment variable to only accept strings ("DEBUG", "INFO", "ERROR"), see [the wiki](https://github.com/quic-go/quic-go/wiki/Logging) for more details. +- Remove the `tls.Config` from the `quic.Config`. The `tls.Config` must now be passed to the `Dial` and `Listen` functions as a separate parameter. See the [Godoc](https://godoc.org/github.com/apernet/quic-go) for details. +- Changed the log level environment variable to only accept strings ("DEBUG", "INFO", "ERROR"), see [the wiki](https://github.com/apernet/quic-go/wiki/Logging) for more details. - Rename the `h2quic.QuicRoundTripper` to `h2quic.RoundTripper` - Changed `h2quic.Server.Serve()` to accept a `net.PacketConn` - Drop support for Go 1.7 and 1.8. diff --git a/README.md b/README.md index 3eaf0583b3f..7e9ba9926e4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -[![PkgGoDev](https://pkg.go.dev/badge/github.com/quic-go/quic-go)](https://pkg.go.dev/github.com/quic-go/quic-go) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/apernet/quic-go)](https://pkg.go.dev/github.com/apernet/quic-go) [![Code Coverage](https://img.shields.io/codecov/c/github/quic-go/quic-go/master.svg?style=flat-square)](https://codecov.io/gh/quic-go/quic-go/) quic-go is an implementation of the QUIC protocol ([RFC 9000](https://datatracker.ietf.org/doc/html/rfc9000), [RFC 9001](https://datatracker.ietf.org/doc/html/rfc9001), [RFC 9002](https://datatracker.ietf.org/doc/html/rfc9002)) in Go. It has support for HTTP/3 ([RFC 9114](https://datatracker.ietf.org/doc/html/rfc9114)), including QPACK ([RFC 9204](https://datatracker.ietf.org/doc/html/rfc9204)). @@ -225,4 +225,4 @@ This had led to a lot of pain in the Go ecosystem, and we're happy that we can r ## Contributing -We are always happy to welcome new contributors! We have a number of self-contained issues that are suitable for first-time contributors, they are tagged with [help wanted](https://github.com/quic-go/quic-go/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). If you have any questions, please feel free to reach out by opening an issue or leaving a comment. +We are always happy to welcome new contributors! We have a number of self-contained issues that are suitable for first-time contributors, they are tagged with [help wanted](https://github.com/apernet/quic-go/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). If you have any questions, please feel free to reach out by opening an issue or leaving a comment. diff --git a/SECURITY.md b/SECURITY.md index c24c08f8630..62c2ce89893 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -8,7 +8,7 @@ please bring it to our attention right away! ## Reporting a Vulnerability If you find a vulnerability that may affect live deployments -- for example, by exposing -a remote execution exploit -- please [**report privately**](https://github.com/quic-go/quic-go/security/advisories/new). +a remote execution exploit -- please [**report privately**](https://github.com/apernet/quic-go/security/advisories/new). Please **DO NOT file a public issue**. If the issue is an implementation weakness that cannot be immediately exploited or @@ -16,4 +16,4 @@ something not yet deployed, just discuss it openly. ## Reporting a non security bug -For non-security bugs, please simply file a GitHub [issue](https://github.com/quic-go/quic-go/issues/new). +For non-security bugs, please simply file a GitHub [issue](https://github.com/apernet/quic-go/issues/new). diff --git a/buffer_pool.go b/buffer_pool.go index 48589e12365..34f3d1ca1ea 100644 --- a/buffer_pool.go +++ b/buffer_pool.go @@ -3,7 +3,7 @@ package quic import ( "sync" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) type packetBuffer struct { diff --git a/buffer_pool_test.go b/buffer_pool_test.go index c565d4a48e1..851bdc1fa44 100644 --- a/buffer_pool_test.go +++ b/buffer_pool_test.go @@ -1,7 +1,7 @@ package quic import ( - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/client.go b/client.go index 4dfacb50d4e..92c5264644a 100644 --- a/client.go +++ b/client.go @@ -6,9 +6,9 @@ import ( "errors" "net" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" ) type client struct { diff --git a/client_test.go b/client_test.go index 503468915ce..97c21ab8b6f 100644 --- a/client_test.go +++ b/client_test.go @@ -7,10 +7,10 @@ import ( "net" "time" - mocklogging "github.com/quic-go/quic-go/internal/mocks/logging" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" + mocklogging "github.com/apernet/quic-go/internal/mocks/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" "github.com/golang/mock/gomock" diff --git a/closed_conn.go b/closed_conn.go index 0c988b53e3f..6c4063c660b 100644 --- a/closed_conn.go +++ b/closed_conn.go @@ -4,8 +4,8 @@ import ( "math/bits" "net" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) // A closedLocalConn is a connection that we closed locally. diff --git a/closed_conn_test.go b/closed_conn_test.go index ac9da31e643..e3d0712ed58 100644 --- a/closed_conn_test.go +++ b/closed_conn_test.go @@ -3,8 +3,8 @@ package quic import ( "net" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/config.go b/config.go index 59df4cfd952..9de1e20d849 100644 --- a/config.go +++ b/config.go @@ -5,9 +5,9 @@ import ( "net" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/quicvarint" ) // Clone clones a Config diff --git a/config_test.go b/config_test.go index 1eca3d5d4df..3acb0650ddb 100644 --- a/config_test.go +++ b/config_test.go @@ -8,9 +8,9 @@ import ( "reflect" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/logging" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/logging" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/congestion/interface.go b/congestion/interface.go index 51cc18fcb8c..07083880995 100644 --- a/congestion/interface.go +++ b/congestion/interface.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) type ( diff --git a/conn_id_generator.go b/conn_id_generator.go index 2d28dc619c3..bdbea63842a 100644 --- a/conn_id_generator.go +++ b/conn_id_generator.go @@ -3,10 +3,10 @@ package quic import ( "fmt" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" ) type connIDGenerator struct { diff --git a/conn_id_generator_test.go b/conn_id_generator_test.go index 2252de84b74..5d637b864b3 100644 --- a/conn_id_generator_test.go +++ b/conn_id_generator_test.go @@ -3,9 +3,9 @@ package quic import ( "fmt" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/conn_id_manager.go b/conn_id_manager.go index ba65aec0438..023d485029a 100644 --- a/conn_id_manager.go +++ b/conn_id_manager.go @@ -3,11 +3,11 @@ package quic import ( "fmt" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - list "github.com/quic-go/quic-go/internal/utils/linkedlist" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + list "github.com/apernet/quic-go/internal/utils/linkedlist" + "github.com/apernet/quic-go/internal/wire" ) type newConnID struct { diff --git a/conn_id_manager_test.go b/conn_id_manager_test.go index 40d848f19b8..f03f9bb6db1 100644 --- a/conn_id_manager_test.go +++ b/conn_id_manager_test.go @@ -1,9 +1,9 @@ package quic import ( - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/connection.go b/connection.go index 3d287809eb1..3d50d9dbb42 100644 --- a/connection.go +++ b/connection.go @@ -13,16 +13,16 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go/congestion" - "github.com/quic-go/quic-go/internal/ackhandler" - "github.com/quic-go/quic-go/internal/flowcontrol" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/logutils" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/congestion" + "github.com/apernet/quic-go/internal/ackhandler" + "github.com/apernet/quic-go/internal/flowcontrol" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/logutils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" ) type unpacker interface { @@ -301,7 +301,7 @@ var newConnection = func( // different from protocol.DefaultActiveConnectionIDLimit. // If set to the default value, it will be omitted from the transport parameters, which will make // old quic-go versions interpret it as 0, instead of the default value of 2. - // See https://github.com/quic-go/quic-go/pull/3806. + // See https://github.com/apernet/quic-go/pull/3806. ActiveConnectionIDLimit: protocol.MaxActiveConnectionIDs, InitialSourceConnectionID: srcConnID, RetrySourceConnectionID: retrySrcConnID, @@ -408,7 +408,7 @@ var newClientConnection = func( // different from protocol.DefaultActiveConnectionIDLimit. // If set to the default value, it will be omitted from the transport parameters, which will make // old quic-go versions interpret it as 0, instead of the default value of 2. - // See https://github.com/quic-go/quic-go/pull/3806. + // See https://github.com/apernet/quic-go/pull/3806. ActiveConnectionIDLimit: protocol.MaxActiveConnectionIDs, InitialSourceConnectionID: srcConnID, } @@ -864,7 +864,7 @@ func (s *connection) handlePacketImpl(rp receivedPacket) bool { // Set remote address to the address of the last received valid packet if s.perspective == protocol.PerspectiveServer && processed { // Connection migration - s.conn.SetRemoteAddr(rp.remoteAddr) + // s.conn.SetRemoteAddr(rp.remoteAddr) } p.buffer.MaybeRelease() diff --git a/connection_test.go b/connection_test.go index 20e9872b4bf..28984a505b7 100644 --- a/connection_test.go +++ b/connection_test.go @@ -13,17 +13,17 @@ import ( "strings" "time" - "github.com/quic-go/quic-go/internal/ackhandler" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/mocks" - mockackhandler "github.com/quic-go/quic-go/internal/mocks/ackhandler" - mocklogging "github.com/quic-go/quic-go/internal/mocks/logging" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/testutils" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/ackhandler" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/mocks" + mockackhandler "github.com/apernet/quic-go/internal/mocks/ackhandler" + mocklogging "github.com/apernet/quic-go/internal/mocks/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/testutils" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" "github.com/golang/mock/gomock" diff --git a/connection_timer.go b/connection_timer.go index 171fdd01384..f6024c488f5 100644 --- a/connection_timer.go +++ b/connection_timer.go @@ -3,7 +3,7 @@ package quic import ( "time" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/utils" ) var deadlineSendImmediately = time.Time{}.Add(42 * time.Millisecond) // any value > time.Time{} and before time.Now() is fine diff --git a/crypto_stream.go b/crypto_stream.go index 4be2a07ae1a..80af089407e 100644 --- a/crypto_stream.go +++ b/crypto_stream.go @@ -4,10 +4,10 @@ import ( "fmt" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" ) type cryptoStream interface { diff --git a/crypto_stream_manager.go b/crypto_stream_manager.go index c48e238a78a..8a937e1fdd7 100644 --- a/crypto_stream_manager.go +++ b/crypto_stream_manager.go @@ -3,9 +3,9 @@ package quic import ( "fmt" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) type cryptoDataHandler interface { diff --git a/crypto_stream_manager_test.go b/crypto_stream_manager_test.go index daffffe6a9a..42141606777 100644 --- a/crypto_stream_manager_test.go +++ b/crypto_stream_manager_test.go @@ -1,8 +1,8 @@ package quic import ( - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/crypto_stream_test.go b/crypto_stream_test.go index 9a4a2ee57f9..dad3943f0bf 100644 --- a/crypto_stream_test.go +++ b/crypto_stream_test.go @@ -3,9 +3,9 @@ package quic import ( "fmt" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/datagram_queue.go b/datagram_queue.go index ca80d404cbf..8eba2e96b4b 100644 --- a/datagram_queue.go +++ b/datagram_queue.go @@ -4,9 +4,9 @@ import ( "context" "sync" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" ) type datagramQueue struct { diff --git a/datagram_queue_test.go b/datagram_queue_test.go index de3f8f57bf3..3e01ab87a65 100644 --- a/datagram_queue_test.go +++ b/datagram_queue_test.go @@ -4,8 +4,8 @@ import ( "context" "errors" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/errors.go b/errors.go index c9fb0a07b08..5699700e8f2 100644 --- a/errors.go +++ b/errors.go @@ -3,7 +3,7 @@ package quic import ( "fmt" - "github.com/quic-go/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/qerr" ) type ( diff --git a/example/client/main.go b/example/client/main.go index 83f810fd1a7..1c29e596dfd 100644 --- a/example/client/main.go +++ b/example/client/main.go @@ -14,12 +14,12 @@ import ( "os" "sync" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/http3" - "github.com/quic-go/quic-go/internal/testdata" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" - "github.com/quic-go/quic-go/qlog" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/http3" + "github.com/apernet/quic-go/internal/testdata" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" + "github.com/apernet/quic-go/qlog" ) func main() { diff --git a/example/echo/echo.go b/example/echo/echo.go index 011c70a3f40..7e01db60e97 100644 --- a/example/echo/echo.go +++ b/example/echo/echo.go @@ -12,7 +12,7 @@ import ( "log" "math/big" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" ) const addr = "localhost:4242" diff --git a/example/main.go b/example/main.go index 058144050e8..ce11bb1659f 100644 --- a/example/main.go +++ b/example/main.go @@ -18,12 +18,12 @@ import ( _ "net/http/pprof" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/http3" - "github.com/quic-go/quic-go/internal/testdata" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" - "github.com/quic-go/quic-go/qlog" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/http3" + "github.com/apernet/quic-go/internal/testdata" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" + "github.com/apernet/quic-go/qlog" ) type binds []string diff --git a/frame_sorter.go b/frame_sorter.go index 1637a3ee49f..3e072e17fd3 100644 --- a/frame_sorter.go +++ b/frame_sorter.go @@ -3,9 +3,9 @@ package quic import ( "errors" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/utils/tree" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/utils/tree" ) // byteInterval is an interval from one ByteCount to the other diff --git a/frame_sorter_test.go b/frame_sorter_test.go index 46fb7078277..90d6eb98de7 100644 --- a/frame_sorter_test.go +++ b/frame_sorter_test.go @@ -8,9 +8,9 @@ import ( "golang.org/x/exp/rand" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/utils/tree" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/utils/tree" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/framer.go b/framer.go index 9409af4c2ee..fb951715448 100644 --- a/framer.go +++ b/framer.go @@ -4,11 +4,11 @@ import ( "errors" "sync" - "github.com/quic-go/quic-go/internal/ackhandler" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils/ringbuffer" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/ackhandler" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils/ringbuffer" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/quicvarint" ) type framer interface { diff --git a/framer_test.go b/framer_test.go index 9615e78e21c..0fbea505cbd 100644 --- a/framer_test.go +++ b/framer_test.go @@ -4,9 +4,9 @@ import ( "bytes" "math/rand" - "github.com/quic-go/quic-go/internal/ackhandler" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/ackhandler" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" "github.com/golang/mock/gomock" diff --git a/fuzzing/frames/cmd/corpus.go b/fuzzing/frames/cmd/corpus.go index 5baed928649..e5856b1573c 100644 --- a/fuzzing/frames/cmd/corpus.go +++ b/fuzzing/frames/cmd/corpus.go @@ -6,10 +6,10 @@ import ( "golang.org/x/exp/rand" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/fuzzing/internal/helper" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/fuzzing/internal/helper" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) const version = protocol.Version1 diff --git a/fuzzing/frames/fuzz.go b/fuzzing/frames/fuzz.go index 44d2eee31b7..b17ca92b66e 100644 --- a/fuzzing/frames/fuzz.go +++ b/fuzzing/frames/fuzz.go @@ -3,8 +3,8 @@ package frames import ( "fmt" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) const version = protocol.Version1 diff --git a/fuzzing/handshake/cmd/corpus.go b/fuzzing/handshake/cmd/corpus.go index bf7b34a05b7..4de7f2c3cb4 100644 --- a/fuzzing/handshake/cmd/corpus.go +++ b/fuzzing/handshake/cmd/corpus.go @@ -5,13 +5,13 @@ import ( "log" "net" - fuzzhandshake "github.com/quic-go/quic-go/fuzzing/handshake" - "github.com/quic-go/quic-go/fuzzing/internal/helper" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/testdata" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + fuzzhandshake "github.com/apernet/quic-go/fuzzing/handshake" + "github.com/apernet/quic-go/fuzzing/internal/helper" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/testdata" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" ) const alpn = "fuzz" diff --git a/fuzzing/handshake/fuzz.go b/fuzzing/handshake/fuzz.go index 2c5c1259b9b..639af6b8aa5 100644 --- a/fuzzing/handshake/fuzz.go +++ b/fuzzing/handshake/fuzz.go @@ -14,11 +14,11 @@ import ( "net" "time" - "github.com/quic-go/quic-go/fuzzing/internal/helper" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/fuzzing/internal/helper" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" ) var ( diff --git a/fuzzing/header/cmd/corpus.go b/fuzzing/header/cmd/corpus.go index 226dc106f55..2f456871dbf 100644 --- a/fuzzing/header/cmd/corpus.go +++ b/fuzzing/header/cmd/corpus.go @@ -5,10 +5,10 @@ import ( "golang.org/x/exp/rand" - "github.com/quic-go/quic-go/fuzzing/header" - "github.com/quic-go/quic-go/fuzzing/internal/helper" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/fuzzing/header" + "github.com/apernet/quic-go/fuzzing/internal/helper" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) const version = protocol.Version1 diff --git a/fuzzing/header/fuzz.go b/fuzzing/header/fuzz.go index 62154f300cf..4065903b220 100644 --- a/fuzzing/header/fuzz.go +++ b/fuzzing/header/fuzz.go @@ -4,8 +4,8 @@ import ( "bytes" "fmt" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) const version = protocol.Version1 diff --git a/fuzzing/tokens/fuzz.go b/fuzzing/tokens/fuzz.go index ea261fb6d77..bc705b283db 100644 --- a/fuzzing/tokens/fuzz.go +++ b/fuzzing/tokens/fuzz.go @@ -6,8 +6,8 @@ import ( "net" "time" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/protocol" ) func Fuzz(data []byte) int { diff --git a/fuzzing/transportparameters/cmd/corpus.go b/fuzzing/transportparameters/cmd/corpus.go index 9e59cfba798..6ae4989339a 100644 --- a/fuzzing/transportparameters/cmd/corpus.go +++ b/fuzzing/transportparameters/cmd/corpus.go @@ -8,10 +8,10 @@ import ( "golang.org/x/exp/rand" - "github.com/quic-go/quic-go/fuzzing/internal/helper" - "github.com/quic-go/quic-go/fuzzing/transportparameters" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/fuzzing/internal/helper" + "github.com/apernet/quic-go/fuzzing/transportparameters" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) func getRandomData(l int) []byte { diff --git a/fuzzing/transportparameters/fuzz.go b/fuzzing/transportparameters/fuzz.go index a3ca143d3ee..3720dfb5ed2 100644 --- a/fuzzing/transportparameters/fuzz.go +++ b/fuzzing/transportparameters/fuzz.go @@ -4,9 +4,9 @@ import ( "bytes" "fmt" - "github.com/quic-go/quic-go/fuzzing/internal/helper" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/fuzzing/internal/helper" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) // PrefixLen is the number of bytes used for configuration diff --git a/go.mod b/go.mod index 53612c67a9a..99e61a225c4 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/quic-go/quic-go +module github.com/apernet/quic-go go 1.20 diff --git a/http3/body.go b/http3/body.go index 63ff4366451..1bace1d9848 100644 --- a/http3/body.go +++ b/http3/body.go @@ -5,7 +5,7 @@ import ( "io" "net" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" ) // The HTTPStreamer allows taking over a HTTP/3 stream. The interface is implemented by: diff --git a/http3/body_test.go b/http3/body_test.go index 5bcca2e9cd7..e0f13d8a522 100644 --- a/http3/body_test.go +++ b/http3/body_test.go @@ -3,8 +3,8 @@ package http3 import ( "errors" - "github.com/quic-go/quic-go" - mockquic "github.com/quic-go/quic-go/internal/mocks/quic" + "github.com/apernet/quic-go" + mockquic "github.com/apernet/quic-go/internal/mocks/quic" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/http3/capsule.go b/http3/capsule.go index 7bdcd4e5778..c071d506be5 100644 --- a/http3/capsule.go +++ b/http3/capsule.go @@ -3,7 +3,7 @@ package http3 import ( "io" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/quicvarint" ) // CapsuleType is the type of the capsule. diff --git a/http3/capsule_test.go b/http3/capsule_test.go index 4920e887a74..eeafed64dac 100644 --- a/http3/capsule_test.go +++ b/http3/capsule_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/http3/client.go b/http3/client.go index cc2400e2c0d..a97ba527fc9 100644 --- a/http3/client.go +++ b/http3/client.go @@ -13,10 +13,10 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/quicvarint" "github.com/quic-go/qpack" ) diff --git a/http3/client_test.go b/http3/client_test.go index babcb064302..4cdc3a6b222 100644 --- a/http3/client_test.go +++ b/http3/client_test.go @@ -12,11 +12,11 @@ import ( "sync" "time" - "github.com/quic-go/quic-go" - mockquic "github.com/quic-go/quic-go/internal/mocks/quic" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go" + mockquic "github.com/apernet/quic-go/internal/mocks/quic" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/quicvarint" "github.com/golang/mock/gomock" "github.com/quic-go/qpack" diff --git a/http3/error_codes.go b/http3/error_codes.go index 67b215d8548..e1a4d040e5c 100644 --- a/http3/error_codes.go +++ b/http3/error_codes.go @@ -3,7 +3,7 @@ package http3 import ( "fmt" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" ) type ErrCode quic.ApplicationErrorCode diff --git a/http3/frames.go b/http3/frames.go index cdd97bc5e5d..6868034757a 100644 --- a/http3/frames.go +++ b/http3/frames.go @@ -6,8 +6,8 @@ import ( "fmt" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // FrameType is the frame type of a HTTP/3 frame diff --git a/http3/frames_test.go b/http3/frames_test.go index 04e583d222c..f5cbfd8716e 100644 --- a/http3/frames_test.go +++ b/http3/frames_test.go @@ -6,7 +6,7 @@ import ( "fmt" "io" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/http3/http_stream.go b/http3/http_stream.go index 1c0ec4f1898..7a48efe66be 100644 --- a/http3/http_stream.go +++ b/http3/http_stream.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/utils" ) // A Stream is a HTTP/3 stream. diff --git a/http3/http_stream_test.go b/http3/http_stream_test.go index cff5476b8fe..f3e707dda3f 100644 --- a/http3/http_stream_test.go +++ b/http3/http_stream_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go" - mockquic "github.com/quic-go/quic-go/internal/mocks/quic" + "github.com/apernet/quic-go" + mockquic "github.com/apernet/quic-go/internal/mocks/quic" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/http3/mock_quic_early_listener_test.go b/http3/mock_quic_early_listener_test.go index ab40f0605de..848de62229b 100644 --- a/http3/mock_quic_early_listener_test.go +++ b/http3/mock_quic_early_listener_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/http3 (interfaces: QUICEarlyListener) +// Source: github.com/apernet/quic-go/http3 (interfaces: QUICEarlyListener) // Package http3 is a generated GoMock package. package http3 @@ -10,7 +10,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - quic "github.com/quic-go/quic-go" + quic "github.com/apernet/quic-go" ) // MockQUICEarlyListener is a mock of QUICEarlyListener interface. diff --git a/http3/mock_roundtripcloser_test.go b/http3/mock_roundtripcloser_test.go index 7aa19ee3f80..6fe1c8b7655 100644 --- a/http3/mock_roundtripcloser_test.go +++ b/http3/mock_roundtripcloser_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/http3 (interfaces: RoundTripCloser) +// Source: github.com/apernet/quic-go/http3 (interfaces: RoundTripCloser) // Package http3 is a generated GoMock package. package http3 diff --git a/http3/mockgen.go b/http3/mockgen.go index 38939e605cd..4d414ea7ecf 100644 --- a/http3/mockgen.go +++ b/http3/mockgen.go @@ -2,7 +2,7 @@ package http3 -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package http3 -destination mock_roundtripcloser_test.go github.com/quic-go/quic-go/http3 RoundTripCloser" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package http3 -destination mock_roundtripcloser_test.go github.com/apernet/quic-go/http3 RoundTripCloser" type RoundTripCloser = roundTripCloser -//go:generate sh -c "go run github.com/golang/mock/mockgen -package http3 -destination mock_quic_early_listener_test.go github.com/quic-go/quic-go/http3 QUICEarlyListener" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package http3 -destination mock_quic_early_listener_test.go github.com/apernet/quic-go/http3 QUICEarlyListener" diff --git a/http3/request_writer.go b/http3/request_writer.go index 875f4031ae2..a37b237e4c3 100644 --- a/http3/request_writer.go +++ b/http3/request_writer.go @@ -16,8 +16,8 @@ import ( "golang.org/x/net/idna" "github.com/quic-go/qpack" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/utils" ) const bodyCopyBufferSize = 8 * 1024 diff --git a/http3/request_writer_test.go b/http3/request_writer_test.go index 74fd239870c..78bc953514f 100644 --- a/http3/request_writer_test.go +++ b/http3/request_writer_test.go @@ -5,8 +5,8 @@ import ( "io" "net/http" - mockquic "github.com/quic-go/quic-go/internal/mocks/quic" - "github.com/quic-go/quic-go/internal/utils" + mockquic "github.com/apernet/quic-go/internal/mocks/quic" + "github.com/apernet/quic-go/internal/utils" "github.com/golang/mock/gomock" "github.com/quic-go/qpack" diff --git a/http3/response_writer.go b/http3/response_writer.go index 3d9271858d6..c4f29ce16e4 100644 --- a/http3/response_writer.go +++ b/http3/response_writer.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/utils" "github.com/quic-go/qpack" ) diff --git a/http3/response_writer_test.go b/http3/response_writer_test.go index c803adb73b5..2e275db785c 100644 --- a/http3/response_writer_test.go +++ b/http3/response_writer_test.go @@ -6,8 +6,8 @@ import ( "net/http" "time" - mockquic "github.com/quic-go/quic-go/internal/mocks/quic" - "github.com/quic-go/quic-go/internal/utils" + mockquic "github.com/apernet/quic-go/internal/mocks/quic" + "github.com/apernet/quic-go/internal/utils" "github.com/golang/mock/gomock" "github.com/quic-go/qpack" diff --git a/http3/roundtrip.go b/http3/roundtrip.go index 066b762b85c..28adb407268 100644 --- a/http3/roundtrip.go +++ b/http3/roundtrip.go @@ -14,7 +14,7 @@ import ( "golang.org/x/net/http/httpguts" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" ) type roundTripCloser interface { diff --git a/http3/roundtrip_test.go b/http3/roundtrip_test.go index 0c219db7e93..207420f6419 100644 --- a/http3/roundtrip_test.go +++ b/http3/roundtrip_test.go @@ -10,8 +10,8 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/qerr" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/qerr" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/http3/server.go b/http3/server.go index b90c850c112..dee12686050 100644 --- a/http3/server.go +++ b/http3/server.go @@ -13,10 +13,10 @@ import ( "sync" "time" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/quicvarint" "github.com/quic-go/qpack" ) diff --git a/http3/server_test.go b/http3/server_test.go index f180ef0d5c2..8a96166e222 100644 --- a/http3/server_test.go +++ b/http3/server_test.go @@ -13,12 +13,12 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - mockquic "github.com/quic-go/quic-go/internal/mocks/quic" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/testdata" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go" + mockquic "github.com/apernet/quic-go/internal/mocks/quic" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/testdata" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/quicvarint" "github.com/golang/mock/gomock" "github.com/quic-go/qpack" diff --git a/integrationtests/gomodvendor/go.mod b/integrationtests/gomodvendor/go.mod index c37e26d6a4b..2cb25c99f4b 100644 --- a/integrationtests/gomodvendor/go.mod +++ b/integrationtests/gomodvendor/go.mod @@ -3,6 +3,6 @@ module test go 1.16 // The version doesn't matter here, as we're replacing it with the currently checked out code anyway. -require github.com/quic-go/quic-go v0.21.0 +require github.com/apernet/quic-go v0.21.0 -replace github.com/quic-go/quic-go => ../../ +replace github.com/apernet/quic-go => ../../ diff --git a/integrationtests/gomodvendor/main.go b/integrationtests/gomodvendor/main.go index b19bd3fd784..053601d1d53 100644 --- a/integrationtests/gomodvendor/main.go +++ b/integrationtests/gomodvendor/main.go @@ -1,6 +1,6 @@ package main -import "github.com/quic-go/quic-go/http3" +import "github.com/apernet/quic-go/http3" // The contents of this script don't matter. // We just need to make sure that quic-go is imported. diff --git a/integrationtests/self/benchmark_test.go b/integrationtests/self/benchmark_test.go index 983d8b7dd89..7a539d29089 100644 --- a/integrationtests/self/benchmark_test.go +++ b/integrationtests/self/benchmark_test.go @@ -6,7 +6,7 @@ import ( "net" "testing" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" ) func BenchmarkHandshake(b *testing.B) { diff --git a/integrationtests/self/cancelation_test.go b/integrationtests/self/cancelation_test.go index 5f95c0b73cf..ac0722119b0 100644 --- a/integrationtests/self/cancelation_test.go +++ b/integrationtests/self/cancelation_test.go @@ -10,7 +10,7 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -172,7 +172,7 @@ var _ = Describe("Stream Cancellations", func() { It("allows concurrent Read and CancelRead calls", func() { // This test is especially valuable when run with race detector, - // see https://github.com/quic-go/quic-go/issues/3239. + // see https://github.com/apernet/quic-go/issues/3239. serverCanceledCounterChan := runServer(make([]byte, 100)) // make sure the FIN is sent with the STREAM frame conn, err := quic.DialAddr( diff --git a/integrationtests/self/close_test.go b/integrationtests/self/close_test.go index d0bcf7f01a4..2f5b2ce1819 100644 --- a/integrationtests/self/close_test.go +++ b/integrationtests/self/close_test.go @@ -7,8 +7,8 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/conn_id_test.go b/integrationtests/self/conn_id_test.go index 0d8c4b446bf..7844b70c3ed 100644 --- a/integrationtests/self/conn_id_test.go +++ b/integrationtests/self/conn_id_test.go @@ -8,8 +8,8 @@ import ( mrand "math/rand" "net" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/datagram_test.go b/integrationtests/self/datagram_test.go index 35d0718a978..b5d691c2ba8 100644 --- a/integrationtests/self/datagram_test.go +++ b/integrationtests/self/datagram_test.go @@ -10,9 +10,9 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/deadline_test.go b/integrationtests/self/deadline_test.go index b165aff0e90..c42346d40a7 100644 --- a/integrationtests/self/deadline_test.go +++ b/integrationtests/self/deadline_test.go @@ -7,7 +7,7 @@ import ( "net" "time" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/drop_test.go b/integrationtests/self/drop_test.go index 4eac657aa8a..20a5845bd47 100644 --- a/integrationtests/self/drop_test.go +++ b/integrationtests/self/drop_test.go @@ -8,8 +8,8 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/early_data_test.go b/integrationtests/self/early_data_test.go index 136c3d0b29b..0ca5ab5423e 100644 --- a/integrationtests/self/early_data_test.go +++ b/integrationtests/self/early_data_test.go @@ -7,8 +7,8 @@ import ( "net" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/handshake_drop_test.go b/integrationtests/self/handshake_drop_test.go index ae4837715e4..957491e81a6 100644 --- a/integrationtests/self/handshake_drop_test.go +++ b/integrationtests/self/handshake_drop_test.go @@ -11,11 +11,11 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/quicvarint" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/handshake_rtt_test.go b/integrationtests/self/handshake_rtt_test.go index 36ea7c787a8..057e898dd23 100644 --- a/integrationtests/self/handshake_rtt_test.go +++ b/integrationtests/self/handshake_rtt_test.go @@ -8,8 +8,8 @@ import ( "net" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/handshake_test.go b/integrationtests/self/handshake_test.go index 9652cb0d369..10bf66910ae 100644 --- a/integrationtests/self/handshake_test.go +++ b/integrationtests/self/handshake_test.go @@ -9,10 +9,10 @@ import ( "net" "time" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/qtls" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/qtls" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/hotswap_test.go b/integrationtests/self/hotswap_test.go index ac75a49450e..184685f4c55 100644 --- a/integrationtests/self/hotswap_test.go +++ b/integrationtests/self/hotswap_test.go @@ -9,8 +9,8 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/http3" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/http3" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/http_test.go b/integrationtests/self/http_test.go index e41dc85e4a7..32d530f8f97 100644 --- a/integrationtests/self/http_test.go +++ b/integrationtests/self/http_test.go @@ -16,8 +16,8 @@ import ( "golang.org/x/sync/errgroup" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/http3" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/http3" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/key_update_test.go b/integrationtests/self/key_update_test.go index c24bef27d2e..dc815d34b45 100644 --- a/integrationtests/self/key_update_test.go +++ b/integrationtests/self/key_update_test.go @@ -6,10 +6,10 @@ import ( "io" "net" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/mitm_test.go b/integrationtests/self/mitm_test.go index a5f07f77a6d..60f45cfce4f 100644 --- a/integrationtests/self/mitm_test.go +++ b/integrationtests/self/mitm_test.go @@ -12,11 +12,11 @@ import ( "golang.org/x/exp/rand" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/testutils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/testutils" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/multiplex_test.go b/integrationtests/self/multiplex_test.go index 9b00bc34358..4ebc7a96f76 100644 --- a/integrationtests/self/multiplex_test.go +++ b/integrationtests/self/multiplex_test.go @@ -7,7 +7,7 @@ import ( "runtime" "time" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/packetization_test.go b/integrationtests/self/packetization_test.go index 740956c5492..40531977c48 100644 --- a/integrationtests/self/packetization_test.go +++ b/integrationtests/self/packetization_test.go @@ -6,9 +6,9 @@ import ( "net" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/resumption_test.go b/integrationtests/self/resumption_test.go index 264f832ebf5..dac28d6c323 100644 --- a/integrationtests/self/resumption_test.go +++ b/integrationtests/self/resumption_test.go @@ -7,7 +7,7 @@ import ( "net" "time" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/rtt_test.go b/integrationtests/self/rtt_test.go index 97d9b981243..3ee5248c1f7 100644 --- a/integrationtests/self/rtt_test.go +++ b/integrationtests/self/rtt_test.go @@ -7,8 +7,8 @@ import ( "net" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/self_suite_test.go b/integrationtests/self/self_suite_test.go index 4b7ee5ef328..d21120326fa 100644 --- a/integrationtests/self/self_suite_test.go +++ b/integrationtests/self/self_suite_test.go @@ -16,12 +16,12 @@ import ( "testing" "time" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/integrationtests/tools" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/integrationtests/tools" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/stateless_reset_test.go b/integrationtests/self/stateless_reset_test.go index 8db9477b31d..8826b11a4b0 100644 --- a/integrationtests/self/stateless_reset_test.go +++ b/integrationtests/self/stateless_reset_test.go @@ -8,8 +8,8 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/stream_test.go b/integrationtests/self/stream_test.go index 332cd505e30..ee64bd3b7e4 100644 --- a/integrationtests/self/stream_test.go +++ b/integrationtests/self/stream_test.go @@ -9,7 +9,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" ) var _ = Describe("Bidirectional streams", func() { diff --git a/integrationtests/self/timeout_test.go b/integrationtests/self/timeout_test.go index c5ec46d4b4c..48cc3da909d 100644 --- a/integrationtests/self/timeout_test.go +++ b/integrationtests/self/timeout_test.go @@ -9,10 +9,10 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/tracer_test.go b/integrationtests/self/tracer_test.go index 3bfae3c6b8a..9faab9c398d 100644 --- a/integrationtests/self/tracer_test.go +++ b/integrationtests/self/tracer_test.go @@ -9,11 +9,11 @@ import ( mrand "math/rand" "net" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" - "github.com/quic-go/quic-go/qlog" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" + "github.com/apernet/quic-go/qlog" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/uni_stream_test.go b/integrationtests/self/uni_stream_test.go index a2fe4e50163..46a35c453e9 100644 --- a/integrationtests/self/uni_stream_test.go +++ b/integrationtests/self/uni_stream_test.go @@ -7,8 +7,8 @@ import ( "net" "sync" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/zero_rtt_oldgo_test.go b/integrationtests/self/zero_rtt_oldgo_test.go index beaf351e249..0ed2e15ae72 100644 --- a/integrationtests/self/zero_rtt_oldgo_test.go +++ b/integrationtests/self/zero_rtt_oldgo_test.go @@ -13,11 +13,11 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/zero_rtt_test.go b/integrationtests/self/zero_rtt_test.go index 2de283aca12..14709c3c5b7 100644 --- a/integrationtests/self/zero_rtt_test.go +++ b/integrationtests/self/zero_rtt_test.go @@ -13,11 +13,11 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/tools/proxy/proxy.go b/integrationtests/tools/proxy/proxy.go index 4ed2d89de0e..01206cbdc1a 100644 --- a/integrationtests/tools/proxy/proxy.go +++ b/integrationtests/tools/proxy/proxy.go @@ -6,8 +6,8 @@ import ( "sync" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) // Connection is a UDP connection diff --git a/integrationtests/tools/proxy/proxy_test.go b/integrationtests/tools/proxy/proxy_test.go index 81e13b23346..fb3a47eea97 100644 --- a/integrationtests/tools/proxy/proxy_test.go +++ b/integrationtests/tools/proxy/proxy_test.go @@ -10,8 +10,8 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/tools/qlog.go b/integrationtests/tools/qlog.go index 352e0a613d3..d84a0116e2c 100644 --- a/integrationtests/tools/qlog.go +++ b/integrationtests/tools/qlog.go @@ -8,10 +8,10 @@ import ( "log" "os" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" - "github.com/quic-go/quic-go/qlog" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" + "github.com/apernet/quic-go/qlog" ) func NewQlogger(logger io.Writer) func(context.Context, logging.Perspective, quic.ConnectionID) logging.ConnectionTracer { diff --git a/integrationtests/versionnegotiation/handshake_test.go b/integrationtests/versionnegotiation/handshake_test.go index 965700c1560..c150b77cde2 100644 --- a/integrationtests/versionnegotiation/handshake_test.go +++ b/integrationtests/versionnegotiation/handshake_test.go @@ -6,10 +6,10 @@ import ( "fmt" "net" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/integrationtests/tools/israce" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/integrationtests/tools/israce" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/versionnegotiation/rtt_test.go b/integrationtests/versionnegotiation/rtt_test.go index ce9cba1bed0..1e9ea1df171 100644 --- a/integrationtests/versionnegotiation/rtt_test.go +++ b/integrationtests/versionnegotiation/rtt_test.go @@ -4,9 +4,9 @@ import ( "context" "time" - "github.com/quic-go/quic-go" - quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go" + quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/versionnegotiation/versionnegotiation_suite_test.go b/integrationtests/versionnegotiation/versionnegotiation_suite_test.go index a01ac1f8a58..12036330a54 100644 --- a/integrationtests/versionnegotiation/versionnegotiation_suite_test.go +++ b/integrationtests/versionnegotiation/versionnegotiation_suite_test.go @@ -7,10 +7,10 @@ import ( "flag" "testing" - "github.com/quic-go/quic-go/integrationtests/tools" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/integrationtests/tools" + "github.com/apernet/quic-go/logging" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/interface.go b/interface.go index 812f8f513a8..013340c841c 100644 --- a/interface.go +++ b/interface.go @@ -8,10 +8,10 @@ import ( "net" "time" - "github.com/quic-go/quic-go/congestion" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/congestion" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/logging" ) // The StreamID is the ID of a QUIC stream. diff --git a/internal/ackhandler/ack_eliciting.go b/internal/ackhandler/ack_eliciting.go index 34506b12e01..56a8155293a 100644 --- a/internal/ackhandler/ack_eliciting.go +++ b/internal/ackhandler/ack_eliciting.go @@ -1,6 +1,6 @@ package ackhandler -import "github.com/quic-go/quic-go/internal/wire" +import "github.com/apernet/quic-go/internal/wire" // IsFrameAckEliciting returns true if the frame is ack-eliciting. func IsFrameAckEliciting(f wire.Frame) bool { diff --git a/internal/ackhandler/ack_eliciting_test.go b/internal/ackhandler/ack_eliciting_test.go index cdd1c7e9624..b243c6c5858 100644 --- a/internal/ackhandler/ack_eliciting_test.go +++ b/internal/ackhandler/ack_eliciting_test.go @@ -3,7 +3,7 @@ package ackhandler import ( "reflect" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/ackhandler.go b/internal/ackhandler/ackhandler.go index 2c7cc4fcf0b..8600ec04c15 100644 --- a/internal/ackhandler/ackhandler.go +++ b/internal/ackhandler/ackhandler.go @@ -1,9 +1,9 @@ package ackhandler import ( - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" ) // NewAckHandler creates a new SentPacketHandler and a new ReceivedPacketHandler. diff --git a/internal/ackhandler/cc_adapter.go b/internal/ackhandler/cc_adapter.go index b70e66ac9c8..19f42b1a80d 100644 --- a/internal/ackhandler/cc_adapter.go +++ b/internal/ackhandler/cc_adapter.go @@ -3,8 +3,8 @@ package ackhandler import ( "time" - "github.com/quic-go/quic-go/congestion" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/congestion" + "github.com/apernet/quic-go/internal/protocol" ) type ccAdapter struct { diff --git a/internal/ackhandler/frame.go b/internal/ackhandler/frame.go index e03a8080ce1..edab8dfe9c8 100644 --- a/internal/ackhandler/frame.go +++ b/internal/ackhandler/frame.go @@ -1,7 +1,7 @@ package ackhandler import ( - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/wire" ) // FrameHandler handles the acknowledgement and the loss of a frame. diff --git a/internal/ackhandler/interfaces.go b/internal/ackhandler/interfaces.go index 155ad90a9bd..523395be96f 100644 --- a/internal/ackhandler/interfaces.go +++ b/internal/ackhandler/interfaces.go @@ -3,9 +3,9 @@ package ackhandler import ( "time" - "github.com/quic-go/quic-go/congestion" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/congestion" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) // SentPacketHandler handles ACKs received for outgoing packets diff --git a/internal/ackhandler/mock_sent_packet_tracker_test.go b/internal/ackhandler/mock_sent_packet_tracker_test.go index 83c28fd54a9..ca541aa221f 100644 --- a/internal/ackhandler/mock_sent_packet_tracker_test.go +++ b/internal/ackhandler/mock_sent_packet_tracker_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/internal/ackhandler (interfaces: SentPacketTracker) +// Source: github.com/apernet/quic-go/internal/ackhandler (interfaces: SentPacketTracker) // Package ackhandler is a generated GoMock package. package ackhandler @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockSentPacketTracker is a mock of SentPacketTracker interface. diff --git a/internal/ackhandler/mockgen.go b/internal/ackhandler/mockgen.go index d61783671bf..cda0d4816b0 100644 --- a/internal/ackhandler/mockgen.go +++ b/internal/ackhandler/mockgen.go @@ -2,5 +2,5 @@ package ackhandler -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_sent_packet_tracker_test.go github.com/quic-go/quic-go/internal/ackhandler SentPacketTracker" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_sent_packet_tracker_test.go github.com/apernet/quic-go/internal/ackhandler SentPacketTracker" type SentPacketTracker = sentPacketTracker diff --git a/internal/ackhandler/packet.go b/internal/ackhandler/packet.go index 5f43689b596..e6d2b48f337 100644 --- a/internal/ackhandler/packet.go +++ b/internal/ackhandler/packet.go @@ -4,7 +4,7 @@ import ( "sync" "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // A Packet is a packet diff --git a/internal/ackhandler/packet_number_generator.go b/internal/ackhandler/packet_number_generator.go index e84171e3cd5..6c11ed73fe2 100644 --- a/internal/ackhandler/packet_number_generator.go +++ b/internal/ackhandler/packet_number_generator.go @@ -1,8 +1,8 @@ package ackhandler import ( - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) type packetNumberGenerator interface { diff --git a/internal/ackhandler/packet_number_generator_test.go b/internal/ackhandler/packet_number_generator_test.go index 4384c8f8eee..d532841b5f0 100644 --- a/internal/ackhandler/packet_number_generator_test.go +++ b/internal/ackhandler/packet_number_generator_test.go @@ -4,7 +4,7 @@ import ( "fmt" "math" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/received_packet_handler.go b/internal/ackhandler/received_packet_handler.go index e11ee1eeb9e..0084bada6be 100644 --- a/internal/ackhandler/received_packet_handler.go +++ b/internal/ackhandler/received_packet_handler.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" ) type receivedPacketHandler struct { diff --git a/internal/ackhandler/received_packet_handler_test.go b/internal/ackhandler/received_packet_handler_test.go index b07d617869a..283f6da45b3 100644 --- a/internal/ackhandler/received_packet_handler_test.go +++ b/internal/ackhandler/received_packet_handler_test.go @@ -5,9 +5,9 @@ import ( "github.com/golang/mock/gomock" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/received_packet_history.go b/internal/ackhandler/received_packet_history.go index 3143bfe1204..7b48fb72472 100644 --- a/internal/ackhandler/received_packet_history.go +++ b/internal/ackhandler/received_packet_history.go @@ -3,9 +3,9 @@ package ackhandler import ( "sync" - "github.com/quic-go/quic-go/internal/protocol" - list "github.com/quic-go/quic-go/internal/utils/linkedlist" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + list "github.com/apernet/quic-go/internal/utils/linkedlist" + "github.com/apernet/quic-go/internal/wire" ) // interval is an interval from one PacketNumber to the other diff --git a/internal/ackhandler/received_packet_history_test.go b/internal/ackhandler/received_packet_history_test.go index af6385be36f..b1992d98a3e 100644 --- a/internal/ackhandler/received_packet_history_test.go +++ b/internal/ackhandler/received_packet_history_test.go @@ -5,8 +5,8 @@ import ( "math/rand" "sort" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/received_packet_tracker.go b/internal/ackhandler/received_packet_tracker.go index b188386631d..a27d5048935 100644 --- a/internal/ackhandler/received_packet_tracker.go +++ b/internal/ackhandler/received_packet_tracker.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" ) // number of ack-eliciting packets received before sending an ack. diff --git a/internal/ackhandler/received_packet_tracker_test.go b/internal/ackhandler/received_packet_tracker_test.go index 4818bd090ad..771ae06df69 100644 --- a/internal/ackhandler/received_packet_tracker_test.go +++ b/internal/ackhandler/received_packet_tracker_test.go @@ -3,9 +3,9 @@ package ackhandler import ( "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/sent_packet_handler.go b/internal/ackhandler/sent_packet_handler.go index c17e4a36250..98d760d79b7 100644 --- a/internal/ackhandler/sent_packet_handler.go +++ b/internal/ackhandler/sent_packet_handler.go @@ -6,13 +6,13 @@ import ( "sync" "time" - congestionExt "github.com/quic-go/quic-go/congestion" - "github.com/quic-go/quic-go/internal/congestion" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + congestionExt "github.com/apernet/quic-go/congestion" + "github.com/apernet/quic-go/internal/congestion" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" ) const ( diff --git a/internal/ackhandler/sent_packet_handler_test.go b/internal/ackhandler/sent_packet_handler_test.go index 6c603c87a4d..de01ef68011 100644 --- a/internal/ackhandler/sent_packet_handler_test.go +++ b/internal/ackhandler/sent_packet_handler_test.go @@ -6,11 +6,11 @@ import ( "github.com/golang/mock/gomock" - "github.com/quic-go/quic-go/internal/mocks" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/mocks" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/sent_packet_history.go b/internal/ackhandler/sent_packet_history.go index c14c0f49bae..889274fcfba 100644 --- a/internal/ackhandler/sent_packet_history.go +++ b/internal/ackhandler/sent_packet_history.go @@ -3,7 +3,7 @@ package ackhandler import ( "fmt" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) type sentPacketHistory struct { diff --git a/internal/ackhandler/sent_packet_history_test.go b/internal/ackhandler/sent_packet_history_test.go index 0f05b63e1d2..c309f5d52b8 100644 --- a/internal/ackhandler/sent_packet_history_test.go +++ b/internal/ackhandler/sent_packet_history_test.go @@ -4,7 +4,7 @@ import ( "errors" "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/congestion/bandwidth.go b/internal/congestion/bandwidth.go index 1d03abbb8ad..362c8ed1d80 100644 --- a/internal/congestion/bandwidth.go +++ b/internal/congestion/bandwidth.go @@ -4,7 +4,7 @@ import ( "math" "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // Bandwidth of a connection diff --git a/internal/congestion/cubic.go b/internal/congestion/cubic.go index a73cf82aa5e..8aee5b8b8f4 100644 --- a/internal/congestion/cubic.go +++ b/internal/congestion/cubic.go @@ -4,8 +4,8 @@ import ( "math" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) // This cubic implementation is based on the one found in Chromiums's QUIC diff --git a/internal/congestion/cubic_sender.go b/internal/congestion/cubic_sender.go index 2e5084751a9..624c9e93ece 100644 --- a/internal/congestion/cubic_sender.go +++ b/internal/congestion/cubic_sender.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" ) const ( diff --git a/internal/congestion/cubic_sender_test.go b/internal/congestion/cubic_sender_test.go index 85d81167879..8fbf7256c3a 100644 --- a/internal/congestion/cubic_sender_test.go +++ b/internal/congestion/cubic_sender_test.go @@ -3,8 +3,8 @@ package congestion import ( "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/congestion/cubic_test.go b/internal/congestion/cubic_test.go index c1ad621d7f5..3b03796771a 100644 --- a/internal/congestion/cubic_test.go +++ b/internal/congestion/cubic_test.go @@ -4,7 +4,7 @@ import ( "math" "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/congestion/hybrid_slow_start.go b/internal/congestion/hybrid_slow_start.go index b2f7c908ed1..680b7977afb 100644 --- a/internal/congestion/hybrid_slow_start.go +++ b/internal/congestion/hybrid_slow_start.go @@ -3,8 +3,8 @@ package congestion import ( "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) // Note(pwestin): the magic clamping numbers come from the original code in diff --git a/internal/congestion/hybrid_slow_start_test.go b/internal/congestion/hybrid_slow_start_test.go index 5d9517998d7..2a016428763 100644 --- a/internal/congestion/hybrid_slow_start_test.go +++ b/internal/congestion/hybrid_slow_start_test.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/congestion/interface.go b/internal/congestion/interface.go index 484bd5f8135..323eae4b8fc 100644 --- a/internal/congestion/interface.go +++ b/internal/congestion/interface.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // A SendAlgorithm performs congestion control diff --git a/internal/congestion/pacer.go b/internal/congestion/pacer.go index 09ea268066d..492ed60cf28 100644 --- a/internal/congestion/pacer.go +++ b/internal/congestion/pacer.go @@ -4,8 +4,8 @@ import ( "math" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) const maxBurstSizePackets = 10 diff --git a/internal/congestion/pacer_test.go b/internal/congestion/pacer_test.go index 69f58fcc251..cac1c6d512d 100644 --- a/internal/congestion/pacer_test.go +++ b/internal/congestion/pacer_test.go @@ -4,7 +4,7 @@ import ( "math/rand" "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/flowcontrol/base_flow_controller.go b/internal/flowcontrol/base_flow_controller.go index f3f24a60edd..49a56587287 100644 --- a/internal/flowcontrol/base_flow_controller.go +++ b/internal/flowcontrol/base_flow_controller.go @@ -4,8 +4,8 @@ import ( "sync" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) type baseFlowController struct { diff --git a/internal/flowcontrol/base_flow_controller_test.go b/internal/flowcontrol/base_flow_controller_test.go index 6c26e7f83de..c65822b0f11 100644 --- a/internal/flowcontrol/base_flow_controller_test.go +++ b/internal/flowcontrol/base_flow_controller_test.go @@ -5,8 +5,8 @@ import ( "strconv" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/flowcontrol/connection_flow_controller.go b/internal/flowcontrol/connection_flow_controller.go index 13e69d6c437..1f55796d83a 100644 --- a/internal/flowcontrol/connection_flow_controller.go +++ b/internal/flowcontrol/connection_flow_controller.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" ) type connectionFlowController struct { diff --git a/internal/flowcontrol/connection_flow_controller_test.go b/internal/flowcontrol/connection_flow_controller_test.go index 8be70eef648..cf9642cdb4f 100644 --- a/internal/flowcontrol/connection_flow_controller_test.go +++ b/internal/flowcontrol/connection_flow_controller_test.go @@ -3,8 +3,8 @@ package flowcontrol import ( "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/flowcontrol/interface.go b/internal/flowcontrol/interface.go index 946519d520b..db3c6e450d7 100644 --- a/internal/flowcontrol/interface.go +++ b/internal/flowcontrol/interface.go @@ -1,6 +1,6 @@ package flowcontrol -import "github.com/quic-go/quic-go/internal/protocol" +import "github.com/apernet/quic-go/internal/protocol" type flowController interface { // for sending diff --git a/internal/flowcontrol/stream_flow_controller.go b/internal/flowcontrol/stream_flow_controller.go index 1770a9c8487..cef0d90c1ae 100644 --- a/internal/flowcontrol/stream_flow_controller.go +++ b/internal/flowcontrol/stream_flow_controller.go @@ -3,9 +3,9 @@ package flowcontrol import ( "fmt" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" ) type streamFlowController struct { diff --git a/internal/flowcontrol/stream_flow_controller_test.go b/internal/flowcontrol/stream_flow_controller_test.go index c8c3835c823..6751d3e18b7 100644 --- a/internal/flowcontrol/stream_flow_controller_test.go +++ b/internal/flowcontrol/stream_flow_controller_test.go @@ -3,9 +3,9 @@ package flowcontrol import ( "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/aead.go b/internal/handshake/aead.go index 6aa89fb3f3e..e868f3a3157 100644 --- a/internal/handshake/aead.go +++ b/internal/handshake/aead.go @@ -4,8 +4,8 @@ import ( "crypto/cipher" "encoding/binary" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) func createAEAD(suite *cipherSuite, trafficSecret []byte, v protocol.VersionNumber) cipher.AEAD { diff --git a/internal/handshake/aead_test.go b/internal/handshake/aead_test.go index 85fe28d82f2..c33dcd2ff21 100644 --- a/internal/handshake/aead_test.go +++ b/internal/handshake/aead_test.go @@ -8,7 +8,7 @@ import ( "crypto/tls" "fmt" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/crypto_setup.go b/internal/handshake/crypto_setup.go index b528f08ebf3..4d0280a6233 100644 --- a/internal/handshake/crypto_setup.go +++ b/internal/handshake/crypto_setup.go @@ -11,13 +11,13 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/qtls" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/qtls" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" + "github.com/apernet/quic-go/quicvarint" ) type quicVersionContextKey struct{} diff --git a/internal/handshake/crypto_setup_test.go b/internal/handshake/crypto_setup_test.go index 4b210d20747..dabc4dc53da 100644 --- a/internal/handshake/crypto_setup_test.go +++ b/internal/handshake/crypto_setup_test.go @@ -10,12 +10,12 @@ import ( "net" "time" - mocktls "github.com/quic-go/quic-go/internal/mocks/tls" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/testdata" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + mocktls "github.com/apernet/quic-go/internal/mocks/tls" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/testdata" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" "github.com/golang/mock/gomock" diff --git a/internal/handshake/header_protector.go b/internal/handshake/header_protector.go index fb6092e040a..1edbca97da5 100644 --- a/internal/handshake/header_protector.go +++ b/internal/handshake/header_protector.go @@ -9,7 +9,7 @@ import ( "golang.org/x/crypto/chacha20" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) type headerProtector interface { diff --git a/internal/handshake/initial_aead.go b/internal/handshake/initial_aead.go index b0377c39a81..13d2974189f 100644 --- a/internal/handshake/initial_aead.go +++ b/internal/handshake/initial_aead.go @@ -6,7 +6,7 @@ import ( "golang.org/x/crypto/hkdf" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) var ( diff --git a/internal/handshake/initial_aead_test.go b/internal/handshake/initial_aead_test.go index 6cd840de470..8e1b01588db 100644 --- a/internal/handshake/initial_aead_test.go +++ b/internal/handshake/initial_aead_test.go @@ -4,7 +4,7 @@ import ( "crypto/rand" "fmt" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/interface.go b/internal/handshake/interface.go index fab224f9bdb..e441679362d 100644 --- a/internal/handshake/interface.go +++ b/internal/handshake/interface.go @@ -6,8 +6,8 @@ import ( "io" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) var ( diff --git a/internal/handshake/retry.go b/internal/handshake/retry.go index 68fa53ed134..3cc1074c4af 100644 --- a/internal/handshake/retry.go +++ b/internal/handshake/retry.go @@ -7,7 +7,7 @@ import ( "fmt" "sync" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) var ( diff --git a/internal/handshake/retry_test.go b/internal/handshake/retry_test.go index 560e7af5b43..9db95366aef 100644 --- a/internal/handshake/retry_test.go +++ b/internal/handshake/retry_test.go @@ -3,7 +3,7 @@ package handshake import ( "encoding/binary" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/session_ticket.go b/internal/handshake/session_ticket.go index d3efeb2941c..a091b3b5aca 100644 --- a/internal/handshake/session_ticket.go +++ b/internal/handshake/session_ticket.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/quicvarint" ) const sessionTicketRevision = 3 diff --git a/internal/handshake/session_ticket_test.go b/internal/handshake/session_ticket_test.go index 67e33b2252f..f13612305cc 100644 --- a/internal/handshake/session_ticket_test.go +++ b/internal/handshake/session_ticket_test.go @@ -3,8 +3,8 @@ package handshake import ( "time" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/token_generator.go b/internal/handshake/token_generator.go index e5e90bb3ba8..a3187fdccb2 100644 --- a/internal/handshake/token_generator.go +++ b/internal/handshake/token_generator.go @@ -8,7 +8,7 @@ import ( "net" "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) const ( diff --git a/internal/handshake/token_generator_test.go b/internal/handshake/token_generator_test.go index 870ba3edcc6..5cc5bdef241 100644 --- a/internal/handshake/token_generator_test.go +++ b/internal/handshake/token_generator_test.go @@ -6,7 +6,7 @@ import ( "net" "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/updatable_aead.go b/internal/handshake/updatable_aead.go index 919b8a5bcf0..3209a8fb685 100644 --- a/internal/handshake/updatable_aead.go +++ b/internal/handshake/updatable_aead.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" ) // KeyUpdateInterval is the maximum number of packets we send or receive before initiating a key update. diff --git a/internal/handshake/updatable_aead_test.go b/internal/handshake/updatable_aead_test.go index db3cf56e1bf..bc0d6790b58 100644 --- a/internal/handshake/updatable_aead_test.go +++ b/internal/handshake/updatable_aead_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - mocklogging "github.com/quic-go/quic-go/internal/mocks/logging" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" + mocklogging "github.com/apernet/quic-go/internal/mocks/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/internal/logutils/frame.go b/internal/logutils/frame.go index a6032fc20d7..665585456ba 100644 --- a/internal/logutils/frame.go +++ b/internal/logutils/frame.go @@ -1,9 +1,9 @@ package logutils import ( - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" ) // ConvertFrame converts a wire.Frame into a logging.Frame. diff --git a/internal/logutils/frame_test.go b/internal/logutils/frame_test.go index 6db71561d30..9425b31675f 100644 --- a/internal/logutils/frame_test.go +++ b/internal/logutils/frame_test.go @@ -1,8 +1,8 @@ package logutils import ( - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/mocks/ackhandler/received_packet_handler.go b/internal/mocks/ackhandler/received_packet_handler.go index c73727e0f44..621ed4922d8 100644 --- a/internal/mocks/ackhandler/received_packet_handler.go +++ b/internal/mocks/ackhandler/received_packet_handler.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/internal/ackhandler (interfaces: ReceivedPacketHandler) +// Source: github.com/apernet/quic-go/internal/ackhandler (interfaces: ReceivedPacketHandler) // Package mockackhandler is a generated GoMock package. package mockackhandler @@ -9,8 +9,8 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - wire "github.com/quic-go/quic-go/internal/wire" + protocol "github.com/apernet/quic-go/internal/protocol" + wire "github.com/apernet/quic-go/internal/wire" ) // MockReceivedPacketHandler is a mock of ReceivedPacketHandler interface. diff --git a/internal/mocks/ackhandler/sent_packet_handler.go b/internal/mocks/ackhandler/sent_packet_handler.go index 75b0ca68570..c71bb388ffe 100644 --- a/internal/mocks/ackhandler/sent_packet_handler.go +++ b/internal/mocks/ackhandler/sent_packet_handler.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/internal/ackhandler (interfaces: SentPacketHandler) +// Source: github.com/apernet/quic-go/internal/ackhandler (interfaces: SentPacketHandler) // Package mockackhandler is a generated GoMock package. package mockackhandler @@ -9,10 +9,10 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - congestion "github.com/quic-go/quic-go/congestion" - ackhandler "github.com/quic-go/quic-go/internal/ackhandler" - protocol "github.com/quic-go/quic-go/internal/protocol" - wire "github.com/quic-go/quic-go/internal/wire" + congestion "github.com/apernet/quic-go/congestion" + ackhandler "github.com/apernet/quic-go/internal/ackhandler" + protocol "github.com/apernet/quic-go/internal/protocol" + wire "github.com/apernet/quic-go/internal/wire" ) // MockSentPacketHandler is a mock of SentPacketHandler interface. diff --git a/internal/mocks/congestion.go b/internal/mocks/congestion.go index 6a5e46adddf..88b0cd2cbe6 100644 --- a/internal/mocks/congestion.go +++ b/internal/mocks/congestion.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/internal/congestion (interfaces: SendAlgorithmWithDebugInfos) +// Source: github.com/apernet/quic-go/internal/congestion (interfaces: SendAlgorithmWithDebugInfos) // Package mocks is a generated GoMock package. package mocks @@ -9,7 +9,7 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockSendAlgorithmWithDebugInfos is a mock of SendAlgorithmWithDebugInfos interface. diff --git a/internal/mocks/connection_flow_controller.go b/internal/mocks/connection_flow_controller.go index a0c252f3e3d..fa1a254e3ad 100644 --- a/internal/mocks/connection_flow_controller.go +++ b/internal/mocks/connection_flow_controller.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/internal/flowcontrol (interfaces: ConnectionFlowController) +// Source: github.com/apernet/quic-go/internal/flowcontrol (interfaces: ConnectionFlowController) // Package mocks is a generated GoMock package. package mocks @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockConnectionFlowController is a mock of ConnectionFlowController interface. diff --git a/internal/mocks/crypto_setup.go b/internal/mocks/crypto_setup.go index 1c707b9cb0b..1e20ec468a2 100644 --- a/internal/mocks/crypto_setup.go +++ b/internal/mocks/crypto_setup.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/internal/handshake (interfaces: CryptoSetup) +// Source: github.com/apernet/quic-go/internal/handshake (interfaces: CryptoSetup) // Package mocks is a generated GoMock package. package mocks @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - handshake "github.com/quic-go/quic-go/internal/handshake" - protocol "github.com/quic-go/quic-go/internal/protocol" + handshake "github.com/apernet/quic-go/internal/handshake" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockCryptoSetup is a mock of CryptoSetup interface. diff --git a/internal/mocks/logging/connection_tracer.go b/internal/mocks/logging/connection_tracer.go index 2a7d2f13708..cdc9c1cf749 100644 --- a/internal/mocks/logging/connection_tracer.go +++ b/internal/mocks/logging/connection_tracer.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/logging (interfaces: ConnectionTracer) +// Source: github.com/apernet/quic-go/logging (interfaces: ConnectionTracer) // Package mocklogging is a generated GoMock package. package mocklogging @@ -10,10 +10,10 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - utils "github.com/quic-go/quic-go/internal/utils" - wire "github.com/quic-go/quic-go/internal/wire" - logging "github.com/quic-go/quic-go/logging" + protocol "github.com/apernet/quic-go/internal/protocol" + utils "github.com/apernet/quic-go/internal/utils" + wire "github.com/apernet/quic-go/internal/wire" + logging "github.com/apernet/quic-go/logging" ) // MockConnectionTracer is a mock of ConnectionTracer interface. diff --git a/internal/mocks/logging/tracer.go b/internal/mocks/logging/tracer.go index 56741ef2925..5d3a84b70f2 100644 --- a/internal/mocks/logging/tracer.go +++ b/internal/mocks/logging/tracer.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/logging (interfaces: Tracer) +// Source: github.com/apernet/quic-go/logging (interfaces: Tracer) // Package mocklogging is a generated GoMock package. package mocklogging @@ -9,9 +9,9 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - wire "github.com/quic-go/quic-go/internal/wire" - logging "github.com/quic-go/quic-go/logging" + protocol "github.com/apernet/quic-go/internal/protocol" + wire "github.com/apernet/quic-go/internal/wire" + logging "github.com/apernet/quic-go/logging" ) // MockTracer is a mock of Tracer interface. diff --git a/internal/mocks/long_header_opener.go b/internal/mocks/long_header_opener.go index cb4970d1e0b..d38c2e0be05 100644 --- a/internal/mocks/long_header_opener.go +++ b/internal/mocks/long_header_opener.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/internal/handshake (interfaces: LongHeaderOpener) +// Source: github.com/apernet/quic-go/internal/handshake (interfaces: LongHeaderOpener) // Package mocks is a generated GoMock package. package mocks @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockLongHeaderOpener is a mock of LongHeaderOpener interface. diff --git a/internal/mocks/mockgen.go b/internal/mocks/mockgen.go index 8717fce09e2..e333feef8a0 100644 --- a/internal/mocks/mockgen.go +++ b/internal/mocks/mockgen.go @@ -1,18 +1,18 @@ package mocks -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockquic -destination quic/stream.go github.com/quic-go/quic-go Stream" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockquic -destination quic/early_conn_tmp.go github.com/quic-go/quic-go EarlyConnection && sed 's/qtls.ConnectionState/quic.ConnectionState/g' quic/early_conn_tmp.go > quic/early_conn.go && rm quic/early_conn_tmp.go && go run golang.org/x/tools/cmd/goimports -w quic/early_conn.go" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocklogging -destination logging/tracer.go github.com/quic-go/quic-go/logging Tracer" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocklogging -destination logging/connection_tracer.go github.com/quic-go/quic-go/logging ConnectionTracer" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination short_header_sealer.go github.com/quic-go/quic-go/internal/handshake ShortHeaderSealer" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination short_header_opener.go github.com/quic-go/quic-go/internal/handshake ShortHeaderOpener" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination long_header_opener.go github.com/quic-go/quic-go/internal/handshake LongHeaderOpener" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination crypto_setup_tmp.go github.com/quic-go/quic-go/internal/handshake CryptoSetup && sed -E 's~github.com/quic-go/qtls[[:alnum:]_-]*~github.com/quic-go/quic-go/internal/qtls~g; s~qtls.ConnectionStateWith0RTT~qtls.ConnectionState~g' crypto_setup_tmp.go > crypto_setup.go && rm crypto_setup_tmp.go && go run golang.org/x/tools/cmd/goimports -w crypto_setup.go" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination stream_flow_controller.go github.com/quic-go/quic-go/internal/flowcontrol StreamFlowController" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination congestion.go github.com/quic-go/quic-go/internal/congestion SendAlgorithmWithDebugInfos" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination connection_flow_controller.go github.com/quic-go/quic-go/internal/flowcontrol ConnectionFlowController" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockackhandler -destination ackhandler/sent_packet_handler.go github.com/quic-go/quic-go/internal/ackhandler SentPacketHandler" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockackhandler -destination ackhandler/received_packet_handler.go github.com/quic-go/quic-go/internal/ackhandler ReceivedPacketHandler" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockquic -destination quic/stream.go github.com/apernet/quic-go Stream" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockquic -destination quic/early_conn_tmp.go github.com/apernet/quic-go EarlyConnection && sed 's/qtls.ConnectionState/quic.ConnectionState/g' quic/early_conn_tmp.go > quic/early_conn.go && rm quic/early_conn_tmp.go && go run golang.org/x/tools/cmd/goimports -w quic/early_conn.go" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocklogging -destination logging/tracer.go github.com/apernet/quic-go/logging Tracer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocklogging -destination logging/connection_tracer.go github.com/apernet/quic-go/logging ConnectionTracer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination short_header_sealer.go github.com/apernet/quic-go/internal/handshake ShortHeaderSealer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination short_header_opener.go github.com/apernet/quic-go/internal/handshake ShortHeaderOpener" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination long_header_opener.go github.com/apernet/quic-go/internal/handshake LongHeaderOpener" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination crypto_setup_tmp.go github.com/apernet/quic-go/internal/handshake CryptoSetup && sed -E 's~github.com/quic-go/qtls[[:alnum:]_-]*~github.com/apernet/quic-go/internal/qtls~g; s~qtls.ConnectionStateWith0RTT~qtls.ConnectionState~g' crypto_setup_tmp.go > crypto_setup.go && rm crypto_setup_tmp.go && go run golang.org/x/tools/cmd/goimports -w crypto_setup.go" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination stream_flow_controller.go github.com/apernet/quic-go/internal/flowcontrol StreamFlowController" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination congestion.go github.com/apernet/quic-go/internal/congestion SendAlgorithmWithDebugInfos" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination connection_flow_controller.go github.com/apernet/quic-go/internal/flowcontrol ConnectionFlowController" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockackhandler -destination ackhandler/sent_packet_handler.go github.com/apernet/quic-go/internal/ackhandler SentPacketHandler" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockackhandler -destination ackhandler/received_packet_handler.go github.com/apernet/quic-go/internal/ackhandler ReceivedPacketHandler" // The following command produces a warning message on OSX, however, it still generates the correct mock file. // See https://github.com/golang/mock/issues/339 for details. diff --git a/internal/mocks/quic/early_conn.go b/internal/mocks/quic/early_conn.go index eec0ead5eeb..1e863be8bc7 100644 --- a/internal/mocks/quic/early_conn.go +++ b/internal/mocks/quic/early_conn.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: EarlyConnection) +// Source: github.com/apernet/quic-go (interfaces: EarlyConnection) // Package mockquic is a generated GoMock package. package mockquic @@ -10,9 +10,9 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - quic "github.com/quic-go/quic-go" - congestion "github.com/quic-go/quic-go/congestion" - qerr "github.com/quic-go/quic-go/internal/qerr" + quic "github.com/apernet/quic-go" + congestion "github.com/apernet/quic-go/congestion" + qerr "github.com/apernet/quic-go/internal/qerr" ) // MockEarlyConnection is a mock of EarlyConnection interface. diff --git a/internal/mocks/quic/stream.go b/internal/mocks/quic/stream.go index 1221ac3b7be..5405ef810d6 100644 --- a/internal/mocks/quic/stream.go +++ b/internal/mocks/quic/stream.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: Stream) +// Source: github.com/apernet/quic-go (interfaces: Stream) // Package mockquic is a generated GoMock package. package mockquic @@ -10,8 +10,8 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - qerr "github.com/quic-go/quic-go/internal/qerr" + protocol "github.com/apernet/quic-go/internal/protocol" + qerr "github.com/apernet/quic-go/internal/qerr" ) // MockStream is a mock of Stream interface. diff --git a/internal/mocks/short_header_opener.go b/internal/mocks/short_header_opener.go index 47e858cb256..1221d6277f8 100644 --- a/internal/mocks/short_header_opener.go +++ b/internal/mocks/short_header_opener.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/internal/handshake (interfaces: ShortHeaderOpener) +// Source: github.com/apernet/quic-go/internal/handshake (interfaces: ShortHeaderOpener) // Package mocks is a generated GoMock package. package mocks @@ -9,7 +9,7 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockShortHeaderOpener is a mock of ShortHeaderOpener interface. diff --git a/internal/mocks/short_header_sealer.go b/internal/mocks/short_header_sealer.go index 666fd8fb1a2..e2ff4a70d6b 100644 --- a/internal/mocks/short_header_sealer.go +++ b/internal/mocks/short_header_sealer.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/internal/handshake (interfaces: ShortHeaderSealer) +// Source: github.com/apernet/quic-go/internal/handshake (interfaces: ShortHeaderSealer) // Package mocks is a generated GoMock package. package mocks @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockShortHeaderSealer is a mock of ShortHeaderSealer interface. diff --git a/internal/mocks/stream_flow_controller.go b/internal/mocks/stream_flow_controller.go index 9d730eba150..a04df5acbdb 100644 --- a/internal/mocks/stream_flow_controller.go +++ b/internal/mocks/stream_flow_controller.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/internal/flowcontrol (interfaces: StreamFlowController) +// Source: github.com/apernet/quic-go/internal/flowcontrol (interfaces: StreamFlowController) // Package mocks is a generated GoMock package. package mocks @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockStreamFlowController is a mock of StreamFlowController interface. diff --git a/internal/qerr/error_codes.go b/internal/qerr/error_codes.go index a037acd22e6..011fe8fefe3 100644 --- a/internal/qerr/error_codes.go +++ b/internal/qerr/error_codes.go @@ -3,7 +3,7 @@ package qerr import ( "fmt" - "github.com/quic-go/quic-go/internal/qtls" + "github.com/apernet/quic-go/internal/qtls" ) // TransportErrorCode is a QUIC transport error. diff --git a/internal/qerr/errors.go b/internal/qerr/errors.go index 26ea344521b..34e6b38c26f 100644 --- a/internal/qerr/errors.go +++ b/internal/qerr/errors.go @@ -4,7 +4,7 @@ import ( "fmt" "net" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) var ( diff --git a/internal/qerr/errors_test.go b/internal/qerr/errors_test.go index 52d5c9e9fbc..c972f0a4a01 100644 --- a/internal/qerr/errors_test.go +++ b/internal/qerr/errors_test.go @@ -4,7 +4,7 @@ import ( "errors" "net" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/qtls/cipher_suite_test.go b/internal/qtls/cipher_suite_test.go index 57de9ad899f..59da59bb2c1 100644 --- a/internal/qtls/cipher_suite_test.go +++ b/internal/qtls/cipher_suite_test.go @@ -7,7 +7,7 @@ import ( "fmt" "net" - "github.com/quic-go/quic-go/internal/testdata" + "github.com/apernet/quic-go/internal/testdata" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/qtls/client_session_cache_test.go b/internal/qtls/client_session_cache_test.go index a299551a29d..7f5562387e2 100644 --- a/internal/qtls/client_session_cache_test.go +++ b/internal/qtls/client_session_cache_test.go @@ -7,7 +7,7 @@ import ( "fmt" "net" - "github.com/quic-go/quic-go/internal/testdata" + "github.com/apernet/quic-go/internal/testdata" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/qtls/go120.go b/internal/qtls/go120.go index 595e6e663ba..7906e585a02 100644 --- a/internal/qtls/go120.go +++ b/internal/qtls/go120.go @@ -7,7 +7,7 @@ import ( "fmt" "unsafe" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" "github.com/quic-go/qtls-go1-20" ) diff --git a/internal/qtls/go120_test.go b/internal/qtls/go120_test.go index cbd1ab43622..ddea011ccec 100644 --- a/internal/qtls/go120_test.go +++ b/internal/qtls/go120_test.go @@ -3,7 +3,7 @@ package qtls import ( - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" "github.com/quic-go/qtls-go1-20" diff --git a/internal/qtls/go121.go b/internal/qtls/go121.go index 1137556e6a4..7991acb1bf0 100644 --- a/internal/qtls/go121.go +++ b/internal/qtls/go121.go @@ -7,7 +7,7 @@ import ( "crypto/tls" "fmt" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) type ( diff --git a/internal/qtls/go121_test.go b/internal/qtls/go121_test.go index 2aaafcee647..77d1a0263e1 100644 --- a/internal/qtls/go121_test.go +++ b/internal/qtls/go121_test.go @@ -5,7 +5,7 @@ package qtls import ( "crypto/tls" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/qtls/go_oldversion.go b/internal/qtls/go_oldversion.go index 0fca80a3881..ce8c5a4e6af 100644 --- a/internal/qtls/go_oldversion.go +++ b/internal/qtls/go_oldversion.go @@ -2,4 +2,4 @@ package qtls -var _ int = "The version of quic-go you're using can't be built using outdated Go versions. For more details, please see https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions." +var _ int = "The version of quic-go you're using can't be built using outdated Go versions. For more details, please see https://github.com/apernet/quic-go/wiki/quic-go-and-Go-versions." diff --git a/internal/testutils/testutils.go b/internal/testutils/testutils.go index ab322093dac..bc32b9dc3aa 100644 --- a/internal/testutils/testutils.go +++ b/internal/testutils/testutils.go @@ -3,9 +3,9 @@ package testutils import ( "fmt" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) // Utilities for simulating packet injection and man-in-the-middle (MITM) attacker tests. diff --git a/internal/utils/log.go b/internal/utils/log.go index 89b52c0d9a7..de9dd64e72f 100644 --- a/internal/utils/log.go +++ b/internal/utils/log.go @@ -125,7 +125,7 @@ func readLoggingEnv() LogLevel { case "error": return LogLevelError default: - fmt.Fprintln(os.Stderr, "invalid quic-go log level, see https://github.com/quic-go/quic-go/wiki/Logging") + fmt.Fprintln(os.Stderr, "invalid quic-go log level, see https://github.com/apernet/quic-go/wiki/Logging") return LogLevelNothing } } diff --git a/internal/utils/ringbuffer/ringbuffer.go b/internal/utils/ringbuffer/ringbuffer.go index 81a5ad44b8a..555e9e8e669 100644 --- a/internal/utils/ringbuffer/ringbuffer.go +++ b/internal/utils/ringbuffer/ringbuffer.go @@ -50,7 +50,7 @@ func (r *RingBuffer[T]) PushBack(t T) { // callers might need to check if there are elements in the buffer first. func (r *RingBuffer[T]) PopFront() T { if r.Empty() { - panic("github.com/quic-go/quic-go/internal/utils/ringbuffer: pop from an empty queue") + panic("github.com/apernet/quic-go/internal/utils/ringbuffer: pop from an empty queue") } r.full = false t := r.ring[r.headPos] diff --git a/internal/utils/rtt_stats.go b/internal/utils/rtt_stats.go index 2cd9a1919b1..9764bf8d388 100644 --- a/internal/utils/rtt_stats.go +++ b/internal/utils/rtt_stats.go @@ -3,7 +3,7 @@ package utils import ( "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) const ( diff --git a/internal/utils/rtt_stats_test.go b/internal/utils/rtt_stats_test.go index eae31926b5b..1ac30492420 100644 --- a/internal/utils/rtt_stats_test.go +++ b/internal/utils/rtt_stats_test.go @@ -3,7 +3,7 @@ package utils import ( "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/utils/streamframe_interval.go b/internal/utils/streamframe_interval.go index 78c411242b1..e63ea2fa4ce 100644 --- a/internal/utils/streamframe_interval.go +++ b/internal/utils/streamframe_interval.go @@ -3,7 +3,7 @@ package utils import ( "fmt" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // ByteInterval is an interval from one ByteCount to the other diff --git a/internal/wire/ack_frame.go b/internal/wire/ack_frame.go index 9b23cc25f9c..082f8ee3a41 100644 --- a/internal/wire/ack_frame.go +++ b/internal/wire/ack_frame.go @@ -6,9 +6,9 @@ import ( "sort" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/quicvarint" ) var errInvalidAckRanges = errors.New("AckFrame: ACK frame contains invalid ACK ranges") diff --git a/internal/wire/ack_frame_test.go b/internal/wire/ack_frame_test.go index c94c157d6dd..0d13598353c 100644 --- a/internal/wire/ack_frame_test.go +++ b/internal/wire/ack_frame_test.go @@ -6,8 +6,8 @@ import ( "math" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/ack_range.go b/internal/wire/ack_range.go index 03a1235ee0d..9c4f38be753 100644 --- a/internal/wire/ack_range.go +++ b/internal/wire/ack_range.go @@ -1,6 +1,6 @@ package wire -import "github.com/quic-go/quic-go/internal/protocol" +import "github.com/apernet/quic-go/internal/protocol" // AckRange is an ACK range type AckRange struct { diff --git a/internal/wire/connection_close_frame.go b/internal/wire/connection_close_frame.go index f56c2c0d845..00243f80cfa 100644 --- a/internal/wire/connection_close_frame.go +++ b/internal/wire/connection_close_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A ConnectionCloseFrame is a CONNECTION_CLOSE frame diff --git a/internal/wire/connection_close_frame_test.go b/internal/wire/connection_close_frame_test.go index 0b36c1f7df7..9cfc24fd2a8 100644 --- a/internal/wire/connection_close_frame_test.go +++ b/internal/wire/connection_close_frame_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/crypto_frame.go b/internal/wire/crypto_frame.go index 0f005c5ba4b..ee52098c7a5 100644 --- a/internal/wire/crypto_frame.go +++ b/internal/wire/crypto_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A CryptoFrame is a CRYPTO frame diff --git a/internal/wire/crypto_frame_test.go b/internal/wire/crypto_frame_test.go index fb683c37e81..489d8fa8001 100644 --- a/internal/wire/crypto_frame_test.go +++ b/internal/wire/crypto_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/data_blocked_frame.go b/internal/wire/data_blocked_frame.go index 0d4d1f5657f..6e4ae46f26f 100644 --- a/internal/wire/data_blocked_frame.go +++ b/internal/wire/data_blocked_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A DataBlockedFrame is a DATA_BLOCKED frame diff --git a/internal/wire/data_blocked_frame_test.go b/internal/wire/data_blocked_frame_test.go index 83c250401bf..c4b562acde1 100644 --- a/internal/wire/data_blocked_frame_test.go +++ b/internal/wire/data_blocked_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/datagram_frame.go b/internal/wire/datagram_frame.go index e6c45196181..36e7cd5fdab 100644 --- a/internal/wire/datagram_frame.go +++ b/internal/wire/datagram_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A DatagramFrame is a DATAGRAM frame diff --git a/internal/wire/datagram_frame_test.go b/internal/wire/datagram_frame_test.go index 63c914c6b62..e2a9c91956a 100644 --- a/internal/wire/datagram_frame_test.go +++ b/internal/wire/datagram_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/extended_header.go b/internal/wire/extended_header.go index d10820d6d90..161d7c6fa3e 100644 --- a/internal/wire/extended_header.go +++ b/internal/wire/extended_header.go @@ -7,9 +7,9 @@ import ( "fmt" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/quicvarint" ) // ErrInvalidReservedBits is returned when the reserved bits are incorrect. diff --git a/internal/wire/extended_header_test.go b/internal/wire/extended_header_test.go index 23a252337ea..d3d795badd2 100644 --- a/internal/wire/extended_header_test.go +++ b/internal/wire/extended_header_test.go @@ -5,9 +5,9 @@ import ( "log" "os" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/frame_parser.go b/internal/wire/frame_parser.go index ff35dd101ab..04b7cfe87fb 100644 --- a/internal/wire/frame_parser.go +++ b/internal/wire/frame_parser.go @@ -6,9 +6,9 @@ import ( "fmt" "reflect" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/quicvarint" ) const ( diff --git a/internal/wire/frame_parser_test.go b/internal/wire/frame_parser_test.go index 88079ff07e3..62baf808e83 100644 --- a/internal/wire/frame_parser_test.go +++ b/internal/wire/frame_parser_test.go @@ -3,8 +3,8 @@ package wire import ( "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/handshake_done_frame.go b/internal/wire/handshake_done_frame.go index 29521bc9e9f..e34c012e043 100644 --- a/internal/wire/handshake_done_frame.go +++ b/internal/wire/handshake_done_frame.go @@ -1,7 +1,7 @@ package wire import ( - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // A HandshakeDoneFrame is a HANDSHAKE_DONE frame diff --git a/internal/wire/handshake_done_frame_test.go b/internal/wire/handshake_done_frame_test.go index ee058414d15..9b567f222fa 100644 --- a/internal/wire/handshake_done_frame_test.go +++ b/internal/wire/handshake_done_frame_test.go @@ -1,7 +1,7 @@ package wire import ( - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/header.go b/internal/wire/header.go index e2dc72e421f..17e8115a049 100644 --- a/internal/wire/header.go +++ b/internal/wire/header.go @@ -7,9 +7,9 @@ import ( "fmt" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/quicvarint" ) // ParseConnectionID parses the destination connection ID of a packet. diff --git a/internal/wire/header_test.go b/internal/wire/header_test.go index bf083c3f054..f5c1e8af9f6 100644 --- a/internal/wire/header_test.go +++ b/internal/wire/header_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/interface.go b/internal/wire/interface.go index 7e0f9a03e0f..95286fac92c 100644 --- a/internal/wire/interface.go +++ b/internal/wire/interface.go @@ -1,7 +1,7 @@ package wire import ( - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // A Frame in QUIC diff --git a/internal/wire/log.go b/internal/wire/log.go index ec7d45d861c..8abb5b30241 100644 --- a/internal/wire/log.go +++ b/internal/wire/log.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) // LogFrame logs a frame, either sent or received diff --git a/internal/wire/log_test.go b/internal/wire/log_test.go index 8675cb715e9..097db606eb7 100644 --- a/internal/wire/log_test.go +++ b/internal/wire/log_test.go @@ -6,8 +6,8 @@ import ( "os" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/max_data_frame.go b/internal/wire/max_data_frame.go index e61b0f9f3b0..b804d2734fa 100644 --- a/internal/wire/max_data_frame.go +++ b/internal/wire/max_data_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A MaxDataFrame carries flow control information for the connection diff --git a/internal/wire/max_data_frame_test.go b/internal/wire/max_data_frame_test.go index c1f09119169..46f23f921c4 100644 --- a/internal/wire/max_data_frame_test.go +++ b/internal/wire/max_data_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/max_stream_data_frame.go b/internal/wire/max_stream_data_frame.go index fe3d1e3f70b..c22383a3e53 100644 --- a/internal/wire/max_stream_data_frame.go +++ b/internal/wire/max_stream_data_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A MaxStreamDataFrame is a MAX_STREAM_DATA frame diff --git a/internal/wire/max_stream_data_frame_test.go b/internal/wire/max_stream_data_frame_test.go index b87a919a6e2..55989b58c40 100644 --- a/internal/wire/max_stream_data_frame_test.go +++ b/internal/wire/max_stream_data_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/max_streams_frame.go b/internal/wire/max_streams_frame.go index bd278c02a87..2bc668d0daa 100644 --- a/internal/wire/max_streams_frame.go +++ b/internal/wire/max_streams_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "fmt" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A MaxStreamsFrame is a MAX_STREAMS frame diff --git a/internal/wire/max_streams_frame_test.go b/internal/wire/max_streams_frame_test.go index 47a5d446ec9..cfa49a9a634 100644 --- a/internal/wire/max_streams_frame_test.go +++ b/internal/wire/max_streams_frame_test.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/new_connection_id_frame.go b/internal/wire/new_connection_id_frame.go index 83102d5d144..09e34b589b8 100644 --- a/internal/wire/new_connection_id_frame.go +++ b/internal/wire/new_connection_id_frame.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A NewConnectionIDFrame is a NEW_CONNECTION_ID frame diff --git a/internal/wire/new_connection_id_frame_test.go b/internal/wire/new_connection_id_frame_test.go index 4628aaf24e3..026be93e0f6 100644 --- a/internal/wire/new_connection_id_frame_test.go +++ b/internal/wire/new_connection_id_frame_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/new_token_frame.go b/internal/wire/new_token_frame.go index c3fa178c17f..752d4baf017 100644 --- a/internal/wire/new_token_frame.go +++ b/internal/wire/new_token_frame.go @@ -5,8 +5,8 @@ import ( "errors" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A NewTokenFrame is a NEW_TOKEN frame diff --git a/internal/wire/new_token_frame_test.go b/internal/wire/new_token_frame_test.go index c991a6bbce4..15eedc35be1 100644 --- a/internal/wire/new_token_frame_test.go +++ b/internal/wire/new_token_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/path_challenge_frame.go b/internal/wire/path_challenge_frame.go index ad024330aca..567e46c404e 100644 --- a/internal/wire/path_challenge_frame.go +++ b/internal/wire/path_challenge_frame.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // A PathChallengeFrame is a PATH_CHALLENGE frame diff --git a/internal/wire/path_challenge_frame_test.go b/internal/wire/path_challenge_frame_test.go index 0f15a417497..ca6c8aad5cb 100644 --- a/internal/wire/path_challenge_frame_test.go +++ b/internal/wire/path_challenge_frame_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/path_response_frame.go b/internal/wire/path_response_frame.go index 76e65104963..22495184b0e 100644 --- a/internal/wire/path_response_frame.go +++ b/internal/wire/path_response_frame.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // A PathResponseFrame is a PATH_RESPONSE frame diff --git a/internal/wire/path_response_frame_test.go b/internal/wire/path_response_frame_test.go index 48e17742665..675b673be4f 100644 --- a/internal/wire/path_response_frame_test.go +++ b/internal/wire/path_response_frame_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/ping_frame.go b/internal/wire/ping_frame.go index dd24edc0c37..2562bc17693 100644 --- a/internal/wire/ping_frame.go +++ b/internal/wire/ping_frame.go @@ -1,7 +1,7 @@ package wire import ( - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // A PingFrame is a PING frame diff --git a/internal/wire/ping_frame_test.go b/internal/wire/ping_frame_test.go index 8f8fb5d973f..49c1a70ce8a 100644 --- a/internal/wire/ping_frame_test.go +++ b/internal/wire/ping_frame_test.go @@ -1,7 +1,7 @@ package wire import ( - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/pool.go b/internal/wire/pool.go index 18ab437937d..0ce69787044 100644 --- a/internal/wire/pool.go +++ b/internal/wire/pool.go @@ -3,7 +3,7 @@ package wire import ( "sync" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) var pool sync.Pool diff --git a/internal/wire/reset_stream_frame.go b/internal/wire/reset_stream_frame.go index cd94c9408fc..e36d98d0ace 100644 --- a/internal/wire/reset_stream_frame.go +++ b/internal/wire/reset_stream_frame.go @@ -3,9 +3,9 @@ package wire import ( "bytes" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/quicvarint" ) // A ResetStreamFrame is a RESET_STREAM frame in QUIC diff --git a/internal/wire/reset_stream_frame_test.go b/internal/wire/reset_stream_frame_test.go index 3f254d13586..8161f282b62 100644 --- a/internal/wire/reset_stream_frame_test.go +++ b/internal/wire/reset_stream_frame_test.go @@ -3,9 +3,9 @@ package wire import ( "bytes" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/retire_connection_id_frame.go b/internal/wire/retire_connection_id_frame.go index 8e9a41d89b5..a88155e36dd 100644 --- a/internal/wire/retire_connection_id_frame.go +++ b/internal/wire/retire_connection_id_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A RetireConnectionIDFrame is a RETIRE_CONNECTION_ID frame diff --git a/internal/wire/retire_connection_id_frame_test.go b/internal/wire/retire_connection_id_frame_test.go index b679e41e33f..f20ae000aba 100644 --- a/internal/wire/retire_connection_id_frame_test.go +++ b/internal/wire/retire_connection_id_frame_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/short_header.go b/internal/wire/short_header.go index 69aa8341185..c755df5cf70 100644 --- a/internal/wire/short_header.go +++ b/internal/wire/short_header.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) // ParseShortHeader parses a short header packet. diff --git a/internal/wire/short_header_test.go b/internal/wire/short_header_test.go index 64146ecfb02..780d4651d59 100644 --- a/internal/wire/short_header_test.go +++ b/internal/wire/short_header_test.go @@ -7,8 +7,8 @@ import ( "os" "testing" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/stop_sending_frame.go b/internal/wire/stop_sending_frame.go index d7b8b240290..c4b6e66eb70 100644 --- a/internal/wire/stop_sending_frame.go +++ b/internal/wire/stop_sending_frame.go @@ -3,9 +3,9 @@ package wire import ( "bytes" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/quicvarint" ) // A StopSendingFrame is a STOP_SENDING frame diff --git a/internal/wire/stop_sending_frame_test.go b/internal/wire/stop_sending_frame_test.go index fef3175219b..e9173a0d389 100644 --- a/internal/wire/stop_sending_frame_test.go +++ b/internal/wire/stop_sending_frame_test.go @@ -4,9 +4,9 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/stream_data_blocked_frame.go b/internal/wire/stream_data_blocked_frame.go index d42e59a2d58..1f3513278d2 100644 --- a/internal/wire/stream_data_blocked_frame.go +++ b/internal/wire/stream_data_blocked_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A StreamDataBlockedFrame is a STREAM_DATA_BLOCKED frame diff --git a/internal/wire/stream_data_blocked_frame_test.go b/internal/wire/stream_data_blocked_frame_test.go index 5bdb241b185..bf05732e8af 100644 --- a/internal/wire/stream_data_blocked_frame_test.go +++ b/internal/wire/stream_data_blocked_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/stream_frame.go b/internal/wire/stream_frame.go index d22e1c0526e..b45998099b5 100644 --- a/internal/wire/stream_frame.go +++ b/internal/wire/stream_frame.go @@ -5,8 +5,8 @@ import ( "errors" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A StreamFrame of QUIC diff --git a/internal/wire/stream_frame_test.go b/internal/wire/stream_frame_test.go index ed63c54ccc1..2b1446f485b 100644 --- a/internal/wire/stream_frame_test.go +++ b/internal/wire/stream_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/streams_blocked_frame.go b/internal/wire/streams_blocked_frame.go index 4a5951c625b..6ad2a098c35 100644 --- a/internal/wire/streams_blocked_frame.go +++ b/internal/wire/streams_blocked_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "fmt" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" ) // A StreamsBlockedFrame is a STREAMS_BLOCKED frame diff --git a/internal/wire/streams_blocked_frame_test.go b/internal/wire/streams_blocked_frame_test.go index fcf204528c8..e67a0631ae9 100644 --- a/internal/wire/streams_blocked_frame_test.go +++ b/internal/wire/streams_blocked_frame_test.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/transport_parameter_test.go b/internal/wire/transport_parameter_test.go index 95bfbafc70b..541252b4e78 100644 --- a/internal/wire/transport_parameter_test.go +++ b/internal/wire/transport_parameter_test.go @@ -9,9 +9,9 @@ import ( "golang.org/x/exp/rand" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/transport_parameters.go b/internal/wire/transport_parameters.go index 1ec1e59d3a3..78490880ea9 100644 --- a/internal/wire/transport_parameters.go +++ b/internal/wire/transport_parameters.go @@ -11,10 +11,10 @@ import ( "sort" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/quicvarint" ) // AdditionalTransportParametersClient are additional transport parameters that will be added diff --git a/internal/wire/version_negotiation.go b/internal/wire/version_negotiation.go index 3dc621135b3..53fe7301092 100644 --- a/internal/wire/version_negotiation.go +++ b/internal/wire/version_negotiation.go @@ -6,8 +6,8 @@ import ( "encoding/binary" "errors" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) // ParseVersionNegotiationPacket parses a Version Negotiation packet. diff --git a/internal/wire/version_negotiation_test.go b/internal/wire/version_negotiation_test.go index 65d0ba911a0..ece6cdab97f 100644 --- a/internal/wire/version_negotiation_test.go +++ b/internal/wire/version_negotiation_test.go @@ -5,7 +5,7 @@ import ( "golang.org/x/exp/rand" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/wire_suite_test.go b/internal/wire/wire_suite_test.go index d68c6ee75a1..b15ff07b5a6 100644 --- a/internal/wire/wire_suite_test.go +++ b/internal/wire/wire_suite_test.go @@ -4,8 +4,8 @@ import ( "encoding/binary" "testing" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/quicvarint" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/interop/client/main.go b/interop/client/main.go index 747619a09fb..c0121cc34be 100644 --- a/interop/client/main.go +++ b/interop/client/main.go @@ -14,13 +14,13 @@ import ( "golang.org/x/sync/errgroup" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/http3" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qtls" - "github.com/quic-go/quic-go/interop/http09" - "github.com/quic-go/quic-go/interop/utils" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/http3" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qtls" + "github.com/apernet/quic-go/interop/http09" + "github.com/apernet/quic-go/interop/utils" ) var errUnsupported = errors.New("unsupported test case") diff --git a/interop/http09/client.go b/interop/http09/client.go index b6de79efc4c..bc3d477b681 100644 --- a/interop/http09/client.go +++ b/interop/http09/client.go @@ -13,7 +13,7 @@ import ( "golang.org/x/net/idna" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" ) // MethodGet0RTT allows a GET request to be sent using 0-RTT. diff --git a/interop/http09/http_test.go b/interop/http09/http_test.go index f2d48994872..6b919a50307 100644 --- a/interop/http09/http_test.go +++ b/interop/http09/http_test.go @@ -8,8 +8,8 @@ import ( "net/http" "net/http/httptest" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/testdata" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/testdata" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/interop/http09/server.go b/interop/http09/server.go index b7b510d86ce..cc8bbe9b85b 100644 --- a/interop/http09/server.go +++ b/interop/http09/server.go @@ -12,7 +12,7 @@ import ( "strings" "sync" - "github.com/quic-go/quic-go" + "github.com/apernet/quic-go" ) const h09alpn = "hq-interop" diff --git a/interop/server/main.go b/interop/server/main.go index df7044624e3..289ec8c761a 100644 --- a/interop/server/main.go +++ b/interop/server/main.go @@ -8,11 +8,11 @@ import ( "net/http" "os" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/http3" - "github.com/quic-go/quic-go/internal/qtls" - "github.com/quic-go/quic-go/interop/http09" - "github.com/quic-go/quic-go/interop/utils" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/http3" + "github.com/apernet/quic-go/internal/qtls" + "github.com/apernet/quic-go/interop/http09" + "github.com/apernet/quic-go/interop/utils" ) var tlsConf *tls.Config diff --git a/interop/utils/logging.go b/interop/utils/logging.go index 30e3f663f7a..986cb285489 100644 --- a/interop/utils/logging.go +++ b/interop/utils/logging.go @@ -9,10 +9,10 @@ import ( "os" "strings" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" - "github.com/quic-go/quic-go/qlog" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" + "github.com/apernet/quic-go/qlog" ) // GetSSLKeyLog creates a file for the TLS key log diff --git a/logging/frame.go b/logging/frame.go index 9a055db3595..fea226582da 100644 --- a/logging/frame.go +++ b/logging/frame.go @@ -1,6 +1,6 @@ package logging -import "github.com/quic-go/quic-go/internal/wire" +import "github.com/apernet/quic-go/internal/wire" // A Frame is a QUIC frame type Frame interface{} diff --git a/logging/interface.go b/logging/interface.go index 2ce8582ecb9..342a62de061 100644 --- a/logging/interface.go +++ b/logging/interface.go @@ -6,10 +6,10 @@ import ( "net" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" ) type ( diff --git a/logging/mock_connection_tracer_test.go b/logging/mock_connection_tracer_test.go index ac6d5fd7cd9..beb30b504ff 100644 --- a/logging/mock_connection_tracer_test.go +++ b/logging/mock_connection_tracer_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/logging (interfaces: ConnectionTracer) +// Source: github.com/apernet/quic-go/logging (interfaces: ConnectionTracer) // Package logging is a generated GoMock package. package logging @@ -10,9 +10,9 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - utils "github.com/quic-go/quic-go/internal/utils" - wire "github.com/quic-go/quic-go/internal/wire" + protocol "github.com/apernet/quic-go/internal/protocol" + utils "github.com/apernet/quic-go/internal/utils" + wire "github.com/apernet/quic-go/internal/wire" ) // MockConnectionTracer is a mock of ConnectionTracer interface. diff --git a/logging/mock_tracer_test.go b/logging/mock_tracer_test.go index 8526cd3a366..6a35b7104c6 100644 --- a/logging/mock_tracer_test.go +++ b/logging/mock_tracer_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go/logging (interfaces: Tracer) +// Source: github.com/apernet/quic-go/logging (interfaces: Tracer) // Package logging is a generated GoMock package. package logging @@ -9,8 +9,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - wire "github.com/quic-go/quic-go/internal/wire" + protocol "github.com/apernet/quic-go/internal/protocol" + wire "github.com/apernet/quic-go/internal/wire" ) // MockTracer is a mock of Tracer interface. diff --git a/logging/mockgen.go b/logging/mockgen.go index d5091679967..9e68d2ceb20 100644 --- a/logging/mockgen.go +++ b/logging/mockgen.go @@ -1,4 +1,4 @@ package logging -//go:generate sh -c "go run github.com/golang/mock/mockgen -package logging -self_package github.com/quic-go/quic-go/logging -destination mock_connection_tracer_test.go github.com/quic-go/quic-go/logging ConnectionTracer" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package logging -self_package github.com/quic-go/quic-go/logging -destination mock_tracer_test.go github.com/quic-go/quic-go/logging Tracer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package logging -self_package github.com/apernet/quic-go/logging -destination mock_connection_tracer_test.go github.com/apernet/quic-go/logging ConnectionTracer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package logging -self_package github.com/apernet/quic-go/logging -destination mock_tracer_test.go github.com/apernet/quic-go/logging Tracer" diff --git a/logging/multiplex_test.go b/logging/multiplex_test.go index d22204999cb..205f1c759d7 100644 --- a/logging/multiplex_test.go +++ b/logging/multiplex_test.go @@ -5,8 +5,8 @@ import ( "net" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/logging/packet_header.go b/logging/packet_header.go index 6b8df58d8ac..0a1691d0a64 100644 --- a/logging/packet_header.go +++ b/logging/packet_header.go @@ -1,7 +1,7 @@ package logging import ( - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // PacketTypeFromHeader determines the packet type from a *wire.Header. diff --git a/logging/packet_header_test.go b/logging/packet_header_test.go index 6df41925bf2..7abc6a869e0 100644 --- a/logging/packet_header_test.go +++ b/logging/packet_header_test.go @@ -1,8 +1,8 @@ package logging import ( - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/mock_ack_frame_source_test.go b/mock_ack_frame_source_test.go index 1284752b64f..52c14fb1b05 100644 --- a/mock_ack_frame_source_test.go +++ b/mock_ack_frame_source_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: AckFrameSource) +// Source: github.com/apernet/quic-go (interfaces: AckFrameSource) // Package quic is a generated GoMock package. package quic @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - wire "github.com/quic-go/quic-go/internal/wire" + protocol "github.com/apernet/quic-go/internal/protocol" + wire "github.com/apernet/quic-go/internal/wire" ) // MockAckFrameSource is a mock of AckFrameSource interface. diff --git a/mock_conn_runner_test.go b/mock_conn_runner_test.go index ec5873231d9..1223649cbb8 100644 --- a/mock_conn_runner_test.go +++ b/mock_conn_runner_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: ConnRunner) +// Source: github.com/apernet/quic-go (interfaces: ConnRunner) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockConnRunner is a mock of ConnRunner interface. diff --git a/mock_crypto_data_handler_test.go b/mock_crypto_data_handler_test.go index d077886ccc1..21049c2ed82 100644 --- a/mock_crypto_data_handler_test.go +++ b/mock_crypto_data_handler_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: CryptoDataHandler) +// Source: github.com/apernet/quic-go (interfaces: CryptoDataHandler) // Package quic is a generated GoMock package. package quic @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - handshake "github.com/quic-go/quic-go/internal/handshake" - protocol "github.com/quic-go/quic-go/internal/protocol" + handshake "github.com/apernet/quic-go/internal/handshake" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockCryptoDataHandler is a mock of CryptoDataHandler interface. diff --git a/mock_crypto_stream_test.go b/mock_crypto_stream_test.go index c2048fa8cfa..e25e3449f0e 100644 --- a/mock_crypto_stream_test.go +++ b/mock_crypto_stream_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: CryptoStream) +// Source: github.com/apernet/quic-go (interfaces: CryptoStream) // Package quic is a generated GoMock package. package quic @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - wire "github.com/quic-go/quic-go/internal/wire" + protocol "github.com/apernet/quic-go/internal/protocol" + wire "github.com/apernet/quic-go/internal/wire" ) // MockCryptoStream is a mock of CryptoStream interface. diff --git a/mock_frame_source_test.go b/mock_frame_source_test.go index e23aa39d80a..7f134d1af73 100644 --- a/mock_frame_source_test.go +++ b/mock_frame_source_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: FrameSource) +// Source: github.com/apernet/quic-go (interfaces: FrameSource) // Package quic is a generated GoMock package. package quic @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - ackhandler "github.com/quic-go/quic-go/internal/ackhandler" - protocol "github.com/quic-go/quic-go/internal/protocol" + ackhandler "github.com/apernet/quic-go/internal/ackhandler" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockFrameSource is a mock of FrameSource interface. diff --git a/mock_mtu_discoverer_test.go b/mock_mtu_discoverer_test.go index 406943c580c..f882c99d7be 100644 --- a/mock_mtu_discoverer_test.go +++ b/mock_mtu_discoverer_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: MTUDiscoverer) +// Source: github.com/apernet/quic-go (interfaces: MTUDiscoverer) // Package quic is a generated GoMock package. package quic @@ -9,8 +9,8 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - ackhandler "github.com/quic-go/quic-go/internal/ackhandler" - protocol "github.com/quic-go/quic-go/internal/protocol" + ackhandler "github.com/apernet/quic-go/internal/ackhandler" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockMTUDiscoverer is a mock of MTUDiscoverer interface. diff --git a/mock_packer_test.go b/mock_packer_test.go index d54fe58b8d4..1a52bd24d68 100644 --- a/mock_packer_test.go +++ b/mock_packer_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: Packer) +// Source: github.com/apernet/quic-go (interfaces: Packer) // Package quic is a generated GoMock package. package quic @@ -8,9 +8,9 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - ackhandler "github.com/quic-go/quic-go/internal/ackhandler" - protocol "github.com/quic-go/quic-go/internal/protocol" - qerr "github.com/quic-go/quic-go/internal/qerr" + ackhandler "github.com/apernet/quic-go/internal/ackhandler" + protocol "github.com/apernet/quic-go/internal/protocol" + qerr "github.com/apernet/quic-go/internal/qerr" ) // MockPacker is a mock of Packer interface. diff --git a/mock_packet_handler_manager_test.go b/mock_packet_handler_manager_test.go index 7b70a8dbd9f..7703abb8198 100644 --- a/mock_packet_handler_manager_test.go +++ b/mock_packet_handler_manager_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: PacketHandlerManager) +// Source: github.com/apernet/quic-go (interfaces: PacketHandlerManager) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockPacketHandlerManager is a mock of PacketHandlerManager interface. diff --git a/mock_packet_handler_test.go b/mock_packet_handler_test.go index 529d1b8411b..4d950396b30 100644 --- a/mock_packet_handler_test.go +++ b/mock_packet_handler_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: PacketHandler) +// Source: github.com/apernet/quic-go (interfaces: PacketHandler) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockPacketHandler is a mock of PacketHandler interface. diff --git a/mock_quic_conn_test.go b/mock_quic_conn_test.go index ad7fb055364..35d467be6cc 100644 --- a/mock_quic_conn_test.go +++ b/mock_quic_conn_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: QUICConn) +// Source: github.com/apernet/quic-go (interfaces: QUICConn) // Package quic is a generated GoMock package. package quic @@ -10,9 +10,9 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - congestion "github.com/quic-go/quic-go/congestion" - protocol "github.com/quic-go/quic-go/internal/protocol" - qerr "github.com/quic-go/quic-go/internal/qerr" + congestion "github.com/apernet/quic-go/congestion" + protocol "github.com/apernet/quic-go/internal/protocol" + qerr "github.com/apernet/quic-go/internal/qerr" ) // MockQUICConn is a mock of QUICConn interface. diff --git a/mock_receive_stream_internal_test.go b/mock_receive_stream_internal_test.go index a4cbb276cff..c85b1322992 100644 --- a/mock_receive_stream_internal_test.go +++ b/mock_receive_stream_internal_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: ReceiveStreamI) +// Source: github.com/apernet/quic-go (interfaces: ReceiveStreamI) // Package quic is a generated GoMock package. package quic @@ -9,9 +9,9 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - qerr "github.com/quic-go/quic-go/internal/qerr" - wire "github.com/quic-go/quic-go/internal/wire" + protocol "github.com/apernet/quic-go/internal/protocol" + qerr "github.com/apernet/quic-go/internal/qerr" + wire "github.com/apernet/quic-go/internal/wire" ) // MockReceiveStreamI is a mock of ReceiveStreamI interface. diff --git a/mock_sealing_manager_test.go b/mock_sealing_manager_test.go index 26e442e5994..e01693bf60c 100644 --- a/mock_sealing_manager_test.go +++ b/mock_sealing_manager_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: SealingManager) +// Source: github.com/apernet/quic-go (interfaces: SealingManager) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - handshake "github.com/quic-go/quic-go/internal/handshake" + handshake "github.com/apernet/quic-go/internal/handshake" ) // MockSealingManager is a mock of SealingManager interface. diff --git a/mock_send_conn_test.go b/mock_send_conn_test.go index 7ae1c525e10..5c1ba53f37b 100644 --- a/mock_send_conn_test.go +++ b/mock_send_conn_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: SendConn) +// Source: github.com/apernet/quic-go (interfaces: SendConn) // Package quic is a generated GoMock package. package quic @@ -9,7 +9,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockSendConn is a mock of SendConn interface. diff --git a/mock_send_stream_internal_test.go b/mock_send_stream_internal_test.go index c0581bc290a..52f7134c053 100644 --- a/mock_send_stream_internal_test.go +++ b/mock_send_stream_internal_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: SendStreamI) +// Source: github.com/apernet/quic-go (interfaces: SendStreamI) // Package quic is a generated GoMock package. package quic @@ -10,10 +10,10 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - ackhandler "github.com/quic-go/quic-go/internal/ackhandler" - protocol "github.com/quic-go/quic-go/internal/protocol" - qerr "github.com/quic-go/quic-go/internal/qerr" - wire "github.com/quic-go/quic-go/internal/wire" + ackhandler "github.com/apernet/quic-go/internal/ackhandler" + protocol "github.com/apernet/quic-go/internal/protocol" + qerr "github.com/apernet/quic-go/internal/qerr" + wire "github.com/apernet/quic-go/internal/wire" ) // MockSendStreamI is a mock of SendStreamI interface. diff --git a/mock_sender_test.go b/mock_sender_test.go index feafdf4e06f..3c34c49526f 100644 --- a/mock_sender_test.go +++ b/mock_sender_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: Sender) +// Source: github.com/apernet/quic-go (interfaces: Sender) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockSender is a mock of Sender interface. diff --git a/mock_stream_getter_test.go b/mock_stream_getter_test.go index d02387507e0..0b6c81c6cc6 100644 --- a/mock_stream_getter_test.go +++ b/mock_stream_getter_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: StreamGetter) +// Source: github.com/apernet/quic-go (interfaces: StreamGetter) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" + protocol "github.com/apernet/quic-go/internal/protocol" ) // MockStreamGetter is a mock of StreamGetter interface. diff --git a/mock_stream_internal_test.go b/mock_stream_internal_test.go index 512b4b1d992..f7bebc8463a 100644 --- a/mock_stream_internal_test.go +++ b/mock_stream_internal_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: StreamI) +// Source: github.com/apernet/quic-go (interfaces: StreamI) // Package quic is a generated GoMock package. package quic @@ -10,10 +10,10 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - ackhandler "github.com/quic-go/quic-go/internal/ackhandler" - protocol "github.com/quic-go/quic-go/internal/protocol" - qerr "github.com/quic-go/quic-go/internal/qerr" - wire "github.com/quic-go/quic-go/internal/wire" + ackhandler "github.com/apernet/quic-go/internal/ackhandler" + protocol "github.com/apernet/quic-go/internal/protocol" + qerr "github.com/apernet/quic-go/internal/qerr" + wire "github.com/apernet/quic-go/internal/wire" ) // MockStreamI is a mock of StreamI interface. diff --git a/mock_stream_manager_test.go b/mock_stream_manager_test.go index 2159372d1cf..18a4a05c530 100644 --- a/mock_stream_manager_test.go +++ b/mock_stream_manager_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: StreamManager) +// Source: github.com/apernet/quic-go (interfaces: StreamManager) // Package quic is a generated GoMock package. package quic @@ -9,8 +9,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - wire "github.com/quic-go/quic-go/internal/wire" + protocol "github.com/apernet/quic-go/internal/protocol" + wire "github.com/apernet/quic-go/internal/wire" ) // MockStreamManager is a mock of StreamManager interface. diff --git a/mock_stream_sender_test.go b/mock_stream_sender_test.go index b4898c67edb..0ce8b898450 100644 --- a/mock_stream_sender_test.go +++ b/mock_stream_sender_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: StreamSender) +// Source: github.com/apernet/quic-go (interfaces: StreamSender) // Package quic is a generated GoMock package. package quic @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - wire "github.com/quic-go/quic-go/internal/wire" + protocol "github.com/apernet/quic-go/internal/protocol" + wire "github.com/apernet/quic-go/internal/wire" ) // MockStreamSender is a mock of StreamSender interface. diff --git a/mock_token_store_test.go b/mock_token_store_test.go index 0fb461a6aab..9463ea05158 100644 --- a/mock_token_store_test.go +++ b/mock_token_store_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: TokenStore) +// Source: github.com/apernet/quic-go (interfaces: TokenStore) // Package quic is a generated GoMock package. package quic diff --git a/mock_unknown_packet_handler_test.go b/mock_unknown_packet_handler_test.go index f74897825f0..549b5d72346 100644 --- a/mock_unknown_packet_handler_test.go +++ b/mock_unknown_packet_handler_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: UnknownPacketHandler) +// Source: github.com/apernet/quic-go (interfaces: UnknownPacketHandler) // Package quic is a generated GoMock package. package quic diff --git a/mock_unpacker_test.go b/mock_unpacker_test.go index a144fb4c6a9..7b7fbc68044 100644 --- a/mock_unpacker_test.go +++ b/mock_unpacker_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/quic-go/quic-go (interfaces: Unpacker) +// Source: github.com/apernet/quic-go (interfaces: Unpacker) // Package quic is a generated GoMock package. package quic @@ -9,8 +9,8 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/quic-go/quic-go/internal/protocol" - wire "github.com/quic-go/quic-go/internal/wire" + protocol "github.com/apernet/quic-go/internal/protocol" + wire "github.com/apernet/quic-go/internal/wire" ) // MockUnpacker is a mock of Unpacker interface. diff --git a/mockgen.go b/mockgen.go index eb700864ac0..548af91958f 100644 --- a/mockgen.go +++ b/mockgen.go @@ -2,73 +2,73 @@ package quic -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_send_conn_test.go github.com/quic-go/quic-go SendConn" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_send_conn_test.go github.com/apernet/quic-go SendConn" type SendConn = sendConn -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_sender_test.go github.com/quic-go/quic-go Sender" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_sender_test.go github.com/apernet/quic-go Sender" type Sender = sender -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_internal_test.go github.com/quic-go/quic-go StreamI" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_stream_internal_test.go github.com/apernet/quic-go StreamI" type StreamI = streamI -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_crypto_stream_test.go github.com/quic-go/quic-go CryptoStream" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_crypto_stream_test.go github.com/apernet/quic-go CryptoStream" type CryptoStream = cryptoStream -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_receive_stream_internal_test.go github.com/quic-go/quic-go ReceiveStreamI" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_receive_stream_internal_test.go github.com/apernet/quic-go ReceiveStreamI" type ReceiveStreamI = receiveStreamI -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_send_stream_internal_test.go github.com/quic-go/quic-go SendStreamI" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_send_stream_internal_test.go github.com/apernet/quic-go SendStreamI" type SendStreamI = sendStreamI -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_getter_test.go github.com/quic-go/quic-go StreamGetter" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_stream_getter_test.go github.com/apernet/quic-go StreamGetter" type StreamGetter = streamGetter -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_sender_test.go github.com/quic-go/quic-go StreamSender" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_stream_sender_test.go github.com/apernet/quic-go StreamSender" type StreamSender = streamSender -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_crypto_data_handler_test.go github.com/quic-go/quic-go CryptoDataHandler" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_crypto_data_handler_test.go github.com/apernet/quic-go CryptoDataHandler" type CryptoDataHandler = cryptoDataHandler -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_frame_source_test.go github.com/quic-go/quic-go FrameSource" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_frame_source_test.go github.com/apernet/quic-go FrameSource" type FrameSource = frameSource -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_ack_frame_source_test.go github.com/quic-go/quic-go AckFrameSource" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_ack_frame_source_test.go github.com/apernet/quic-go AckFrameSource" type AckFrameSource = ackFrameSource -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_manager_test.go github.com/quic-go/quic-go StreamManager" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_stream_manager_test.go github.com/apernet/quic-go StreamManager" type StreamManager = streamManager -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_sealing_manager_test.go github.com/quic-go/quic-go SealingManager" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_sealing_manager_test.go github.com/apernet/quic-go SealingManager" type SealingManager = sealingManager -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_unpacker_test.go github.com/quic-go/quic-go Unpacker" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_unpacker_test.go github.com/apernet/quic-go Unpacker" type Unpacker = unpacker -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packer_test.go github.com/quic-go/quic-go Packer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_packer_test.go github.com/apernet/quic-go Packer" type Packer = packer -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_mtu_discoverer_test.go github.com/quic-go/quic-go MTUDiscoverer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_mtu_discoverer_test.go github.com/apernet/quic-go MTUDiscoverer" type MTUDiscoverer = mtuDiscoverer -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_conn_runner_test.go github.com/quic-go/quic-go ConnRunner" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_conn_runner_test.go github.com/apernet/quic-go ConnRunner" type ConnRunner = connRunner -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_quic_conn_test.go github.com/quic-go/quic-go QUICConn" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_quic_conn_test.go github.com/apernet/quic-go QUICConn" type QUICConn = quicConn -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packet_handler_test.go github.com/quic-go/quic-go PacketHandler" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_packet_handler_test.go github.com/apernet/quic-go PacketHandler" type PacketHandler = packetHandler -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_unknown_packet_handler_test.go github.com/quic-go/quic-go UnknownPacketHandler" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_unknown_packet_handler_test.go github.com/apernet/quic-go UnknownPacketHandler" type UnknownPacketHandler = unknownPacketHandler -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packet_handler_manager_test.go github.com/quic-go/quic-go PacketHandlerManager" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_packet_handler_manager_test.go github.com/apernet/quic-go PacketHandlerManager" type PacketHandlerManager = packetHandlerManager // Need to use source mode for the batchConn, since reflect mode follows type aliases. // See https://github.com/golang/mock/issues/244 for details. // -//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/quic-go/quic-go -source sys_conn_oob.go -destination mock_batch_conn_test.go -mock_names batchConn=MockBatchConn" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/apernet/quic-go -source sys_conn_oob.go -destination mock_batch_conn_test.go -mock_names batchConn=MockBatchConn" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/quic-go/quic-go -self_package github.com/quic-go/quic-go -destination mock_token_store_test.go github.com/quic-go/quic-go TokenStore" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/quic-go/quic-go -self_package github.com/quic-go/quic-go -destination mock_packetconn_test.go net PacketConn" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/apernet/quic-go -self_package github.com/apernet/quic-go -destination mock_token_store_test.go github.com/apernet/quic-go TokenStore" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/apernet/quic-go -self_package github.com/apernet/quic-go -destination mock_packetconn_test.go net PacketConn" diff --git a/module_rename.py b/module_rename.py new file mode 100644 index 00000000000..0fc97c8ffa4 --- /dev/null +++ b/module_rename.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import os +import argparse +import fileinput + + +PKG_ORIGINAL = "github.com/quic-go/quic-go" +PKG_NEW = "github.com/apernet/quic-go" + +EXTENSIONS = [".go", ".md", ".mod", ".sh"] + +parser = argparse.ArgumentParser() +parser.add_argument("-r", "--reverse", action="store_true") +args = parser.parse_args() + + +def replace_line(line): + if args.reverse: + return line.replace(PKG_NEW, PKG_ORIGINAL) + return line.replace(PKG_ORIGINAL, PKG_NEW) + + +for dirpath, dirnames, filenames in os.walk("."): + # Skip hidden directories like .git + dirnames[:] = [d for d in dirnames if not d[0] == "."] + filenames = [f for f in filenames if os.path.splitext(f)[1] in EXTENSIONS] + for filename in filenames: + file_path = os.path.join(dirpath, filename) + with fileinput.FileInput(file_path, inplace=True) as file: + for line in file: + print(replace_line(line), end="") diff --git a/mtu_discoverer.go b/mtu_discoverer.go index 317b09292f6..43de873e1c6 100644 --- a/mtu_discoverer.go +++ b/mtu_discoverer.go @@ -4,10 +4,10 @@ import ( "net" "time" - "github.com/quic-go/quic-go/internal/ackhandler" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/ackhandler" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" ) type mtuDiscoverer interface { diff --git a/mtu_discoverer_test.go b/mtu_discoverer_test.go index 6e01f570b47..1cb78d83551 100644 --- a/mtu_discoverer_test.go +++ b/mtu_discoverer_test.go @@ -4,8 +4,8 @@ import ( "math/rand" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/multiplexer.go b/multiplexer.go index 85f7f4034e3..dd9b23919cf 100644 --- a/multiplexer.go +++ b/multiplexer.go @@ -5,7 +5,7 @@ import ( "net" "sync" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/utils" ) var ( @@ -54,7 +54,7 @@ func (m *connMultiplexer) AddConn(c indexableConn) { if ok { // Panics if we're already listening on this connection. // This is a safeguard because we're introducing a breaking API change, see - // https://github.com/quic-go/quic-go/issues/3727 for details. + // https://github.com/apernet/quic-go/issues/3727 for details. // We'll remove this at a later time, when most users of the library have made the switch. panic("connection already exists") // TODO: write a nice message } diff --git a/oss-fuzz.sh b/oss-fuzz.sh index 1efe6baa682..1f375fd299f 100644 --- a/oss-fuzz.sh +++ b/oss-fuzz.sh @@ -17,11 +17,11 @@ compile_go_fuzzer github.com/quic-go/qpack/fuzzing Fuzz qpack_fuzzer ( # fuzz quic-go -compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/frames Fuzz frame_fuzzer -compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/header Fuzz header_fuzzer -compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/transportparameters Fuzz transportparameter_fuzzer -compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/tokens Fuzz token_fuzzer -compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/handshake Fuzz handshake_fuzzer +compile_go_fuzzer github.com/apernet/quic-go/fuzzing/frames Fuzz frame_fuzzer +compile_go_fuzzer github.com/apernet/quic-go/fuzzing/header Fuzz header_fuzzer +compile_go_fuzzer github.com/apernet/quic-go/fuzzing/transportparameters Fuzz transportparameter_fuzzer +compile_go_fuzzer github.com/apernet/quic-go/fuzzing/tokens Fuzz token_fuzzer +compile_go_fuzzer github.com/apernet/quic-go/fuzzing/handshake Fuzz handshake_fuzzer if [ $SANITIZER == "coverage" ]; then # no need for corpora if coverage @@ -29,7 +29,7 @@ if [ $SANITIZER == "coverage" ]; then fi # generate seed corpora -cd $GOPATH/src/github.com/quic-go/quic-go/ +cd $GOPATH/src/github.com/apernet/quic-go/ go generate -x ./fuzzing/... zip --quiet -r $OUT/header_fuzzer_seed_corpus.zip fuzzing/header/corpus diff --git a/packet_handler_map.go b/packet_handler_map.go index 2a16773c8e5..001d68f4ed7 100644 --- a/packet_handler_map.go +++ b/packet_handler_map.go @@ -11,8 +11,8 @@ import ( "sync" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) type connCapabilities struct { diff --git a/packet_handler_map_test.go b/packet_handler_map_test.go index 24cef871e44..e48fd9b64ef 100644 --- a/packet_handler_map_test.go +++ b/packet_handler_map_test.go @@ -6,8 +6,8 @@ import ( "net" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/packet_packer.go b/packet_packer.go index 577f3b043a4..9ef71387c11 100644 --- a/packet_packer.go +++ b/packet_packer.go @@ -4,11 +4,11 @@ import ( "errors" "fmt" - "github.com/quic-go/quic-go/internal/ackhandler" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/ackhandler" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/wire" ) var errNothingToPack = errors.New("nothing to pack") diff --git a/packet_packer_test.go b/packet_packer_test.go index 3ff15eaff03..16957e07759 100644 --- a/packet_packer_test.go +++ b/packet_packer_test.go @@ -8,14 +8,14 @@ import ( "golang.org/x/exp/rand" - "github.com/quic-go/quic-go/internal/ackhandler" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/mocks" - mockackhandler "github.com/quic-go/quic-go/internal/mocks/ackhandler" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/ackhandler" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/mocks" + mockackhandler "github.com/apernet/quic-go/internal/mocks/ackhandler" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" "github.com/golang/mock/gomock" diff --git a/packet_unpacker.go b/packet_unpacker.go index 103524c7dd6..6cf7c692d1b 100644 --- a/packet_unpacker.go +++ b/packet_unpacker.go @@ -5,10 +5,10 @@ import ( "fmt" "time" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/wire" ) type headerDecryptor interface { diff --git a/packet_unpacker_test.go b/packet_unpacker_test.go index 927635cb4e0..591f8fa0287 100644 --- a/packet_unpacker_test.go +++ b/packet_unpacker_test.go @@ -4,11 +4,11 @@ import ( "errors" "time" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/mocks" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/mocks" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/wire" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/qlog/event.go b/qlog/event.go index 9dae7444100..d74e2c9024c 100644 --- a/qlog/event.go +++ b/qlog/event.go @@ -6,10 +6,10 @@ import ( "net" "time" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" "github.com/francoispqt/gojay" ) diff --git a/qlog/frame.go b/qlog/frame.go index 0d44f073b51..eb987eb7b8a 100644 --- a/qlog/frame.go +++ b/qlog/frame.go @@ -3,8 +3,8 @@ package qlog import ( "fmt" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" "github.com/francoispqt/gojay" ) diff --git a/qlog/frame_test.go b/qlog/frame_test.go index 0cee3847c75..d875b3cdf47 100644 --- a/qlog/frame_test.go +++ b/qlog/frame_test.go @@ -5,9 +5,9 @@ import ( "encoding/json" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/logging" "github.com/francoispqt/gojay" . "github.com/onsi/ginkgo/v2" diff --git a/qlog/packet_header.go b/qlog/packet_header.go index 106499b0566..c5786215302 100644 --- a/qlog/packet_header.go +++ b/qlog/packet_header.go @@ -3,8 +3,8 @@ package qlog import ( "fmt" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/logging" "github.com/francoispqt/gojay" ) diff --git a/qlog/packet_header_test.go b/qlog/packet_header_test.go index 9d37e556da9..c3ff9913b9b 100644 --- a/qlog/packet_header_test.go +++ b/qlog/packet_header_test.go @@ -6,9 +6,9 @@ import ( "github.com/francoispqt/gojay" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/qlog/qlog.go b/qlog/qlog.go index 4c480e26056..53e45cb56b5 100644 --- a/qlog/qlog.go +++ b/qlog/qlog.go @@ -10,17 +10,17 @@ import ( "sync" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" "github.com/francoispqt/gojay" ) // Setting of this only works when quic-go is used as a library. // When building a binary from this repository, the version can be set using the following go build flag: -// -ldflags="-X github.com/quic-go/quic-go/qlog.quicGoVersion=foobar" +// -ldflags="-X github.com/apernet/quic-go/qlog.quicGoVersion=foobar" var quicGoVersion = "(devel)" func init() { @@ -32,7 +32,7 @@ func init() { return } for _, d := range info.Deps { - if d.Path == "github.com/quic-go/quic-go" { + if d.Path == "github.com/apernet/quic-go" { quicGoVersion = d.Version if d.Replace != nil { if len(d.Replace.Version) > 0 { diff --git a/qlog/qlog_test.go b/qlog/qlog_test.go index dc0d2dc1823..595617eb918 100644 --- a/qlog/qlog_test.go +++ b/qlog/qlog_test.go @@ -10,11 +10,11 @@ import ( "os" "time" - "github.com/quic-go/quic-go" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/qlog/trace.go b/qlog/trace.go index bb1d5bb8ff3..657ad70679d 100644 --- a/qlog/trace.go +++ b/qlog/trace.go @@ -3,8 +3,8 @@ package qlog import ( "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/logging" "github.com/francoispqt/gojay" ) diff --git a/qlog/types.go b/qlog/types.go index c47ad481ea5..2dcc8897c28 100644 --- a/qlog/types.go +++ b/qlog/types.go @@ -3,9 +3,9 @@ package qlog import ( "fmt" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/logging" ) type owner uint8 diff --git a/qlog/types_test.go b/qlog/types_test.go index 9213ad311a7..64b0893dbef 100644 --- a/qlog/types_test.go +++ b/qlog/types_test.go @@ -8,9 +8,9 @@ import ( "runtime" "strconv" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/quicvarint/varint.go b/quicvarint/varint.go index 3f12c07609e..e42291beaa8 100644 --- a/quicvarint/varint.go +++ b/quicvarint/varint.go @@ -4,7 +4,7 @@ import ( "fmt" "io" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // taken from the QUIC draft diff --git a/receive_stream.go b/receive_stream.go index 89d02b73797..b4ee4fbc46c 100644 --- a/receive_stream.go +++ b/receive_stream.go @@ -6,11 +6,11 @@ import ( "sync" "time" - "github.com/quic-go/quic-go/internal/flowcontrol" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/flowcontrol" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" ) type receiveStreamI interface { diff --git a/receive_stream_test.go b/receive_stream_test.go index f3c515e6b2b..0127d45b3e1 100644 --- a/receive_stream_test.go +++ b/receive_stream_test.go @@ -8,9 +8,9 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go/internal/mocks" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/mocks" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/retransmission_queue.go b/retransmission_queue.go index 909ad6224af..85de5c10034 100644 --- a/retransmission_queue.go +++ b/retransmission_queue.go @@ -3,10 +3,10 @@ package quic import ( "fmt" - "github.com/quic-go/quic-go/internal/ackhandler" + "github.com/apernet/quic-go/internal/ackhandler" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) type retransmissionQueue struct { diff --git a/retransmission_queue_test.go b/retransmission_queue_test.go index c0132848cb4..c14ded73619 100644 --- a/retransmission_queue_test.go +++ b/retransmission_queue_test.go @@ -1,8 +1,8 @@ package quic import ( - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/send_conn.go b/send_conn.go index 782b9aee103..a4777de1332 100644 --- a/send_conn.go +++ b/send_conn.go @@ -4,7 +4,7 @@ import ( "math" "net" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" ) // A sendConn allows sending using a simple Write() on a non-connected packet conn. diff --git a/send_queue.go b/send_queue.go index a9f7ca1a0ee..9cb2b9f4db2 100644 --- a/send_queue.go +++ b/send_queue.go @@ -1,6 +1,6 @@ package quic -import "github.com/quic-go/quic-go/internal/protocol" +import "github.com/apernet/quic-go/internal/protocol" type sender interface { Send(p *packetBuffer, packetSize protocol.ByteCount) diff --git a/send_queue_test.go b/send_queue_test.go index 5a9e6598f2c..7a8bdbf112a 100644 --- a/send_queue_test.go +++ b/send_queue_test.go @@ -3,7 +3,7 @@ package quic import ( "errors" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/send_stream.go b/send_stream.go index 4113d9f0c15..0933a8cb295 100644 --- a/send_stream.go +++ b/send_stream.go @@ -6,12 +6,12 @@ import ( "sync" "time" - "github.com/quic-go/quic-go/internal/ackhandler" - "github.com/quic-go/quic-go/internal/flowcontrol" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/ackhandler" + "github.com/apernet/quic-go/internal/flowcontrol" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" ) type sendStreamI interface { diff --git a/send_stream_test.go b/send_stream_test.go index 3356b4200b2..c3ce7d9c63d 100644 --- a/send_stream_test.go +++ b/send_stream_test.go @@ -12,10 +12,10 @@ import ( "golang.org/x/exp/rand" "github.com/golang/mock/gomock" - "github.com/quic-go/quic-go/internal/ackhandler" - "github.com/quic-go/quic-go/internal/mocks" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/ackhandler" + "github.com/apernet/quic-go/internal/mocks" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/server.go b/server.go index 0f8219e3ae3..6310440fd07 100644 --- a/server.go +++ b/server.go @@ -11,12 +11,12 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go/internal/handshake" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/handshake" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" ) // ErrServerClosed is returned by the Listener or EarlyListener's Accept method after a call to Close. diff --git a/server_test.go b/server_test.go index 2ba39cf5ef3..92c39c26a13 100644 --- a/server_test.go +++ b/server_test.go @@ -11,14 +11,14 @@ import ( "sync/atomic" "time" - "github.com/quic-go/quic-go/internal/handshake" - mocklogging "github.com/quic-go/quic-go/internal/mocks/logging" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/testdata" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/handshake" + mocklogging "github.com/apernet/quic-go/internal/mocks/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/testdata" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/stream.go b/stream.go index ab76eaf8022..6286567a6c7 100644 --- a/stream.go +++ b/stream.go @@ -6,10 +6,10 @@ import ( "sync" "time" - "github.com/quic-go/quic-go/internal/ackhandler" - "github.com/quic-go/quic-go/internal/flowcontrol" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/ackhandler" + "github.com/apernet/quic-go/internal/flowcontrol" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) type deadlineError struct{} diff --git a/stream_test.go b/stream_test.go index e1e3804f9b5..84f0eb6ad91 100644 --- a/stream_test.go +++ b/stream_test.go @@ -7,9 +7,9 @@ import ( "strconv" "time" - "github.com/quic-go/quic-go/internal/mocks" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/mocks" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/streams_map.go b/streams_map.go index b1a80eb36fa..8e01b4dfd78 100644 --- a/streams_map.go +++ b/streams_map.go @@ -7,10 +7,10 @@ import ( "net" "sync" - "github.com/quic-go/quic-go/internal/flowcontrol" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/flowcontrol" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/wire" ) type streamError struct { diff --git a/streams_map_incoming.go b/streams_map_incoming.go index 18ec6f998b0..1354e634455 100644 --- a/streams_map_incoming.go +++ b/streams_map_incoming.go @@ -4,8 +4,8 @@ import ( "context" "sync" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) type incomingStream interface { diff --git a/streams_map_incoming_test.go b/streams_map_incoming_test.go index c3366542de3..2246fd25135 100644 --- a/streams_map_incoming_test.go +++ b/streams_map_incoming_test.go @@ -7,8 +7,8 @@ import ( "golang.org/x/exp/rand" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/streams_map_outgoing.go b/streams_map_outgoing.go index fd45f4e7cf1..0574d32e424 100644 --- a/streams_map_outgoing.go +++ b/streams_map_outgoing.go @@ -4,8 +4,8 @@ import ( "context" "sync" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) type outgoingStream interface { diff --git a/streams_map_outgoing_test.go b/streams_map_outgoing_test.go index 7b4b28c39de..1118af8375d 100644 --- a/streams_map_outgoing_test.go +++ b/streams_map_outgoing_test.go @@ -10,8 +10,8 @@ import ( "golang.org/x/exp/rand" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/streams_map_test.go b/streams_map_test.go index 6300ea8d5be..271d3653ea1 100644 --- a/streams_map_test.go +++ b/streams_map_test.go @@ -8,11 +8,11 @@ import ( "github.com/golang/mock/gomock" - "github.com/quic-go/quic-go/internal/flowcontrol" - "github.com/quic-go/quic-go/internal/mocks" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/qerr" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/flowcontrol" + "github.com/apernet/quic-go/internal/mocks" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/qerr" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/sys_conn.go b/sys_conn.go index 414472e71f9..ce76e23a2ed 100644 --- a/sys_conn.go +++ b/sys_conn.go @@ -10,8 +10,8 @@ import ( "syscall" "time" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) // OOBCapablePacketConn is a connection that allows the reading of ECN bits from the IP header. @@ -34,7 +34,7 @@ func wrapConn(pc net.PacketConn) (rawConn, error) { if disable, _ := strconv.ParseBool(os.Getenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING")); disable { return } - log.Printf("%s. See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.", err) + log.Printf("%s. See https://github.com/apernet/quic-go/wiki/UDP-Buffer-Sizes for details.", err) }) } } @@ -44,7 +44,7 @@ func wrapConn(pc net.PacketConn) (rawConn, error) { if disable, _ := strconv.ParseBool(os.Getenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING")); disable { return } - log.Printf("%s. See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.", err) + log.Printf("%s. See https://github.com/apernet/quic-go/wiki/UDP-Buffer-Sizes for details.", err) }) } } diff --git a/sys_conn_buffers.go b/sys_conn_buffers.go index 8fe49162c01..b2b64faeaee 100644 --- a/sys_conn_buffers.go +++ b/sys_conn_buffers.go @@ -6,8 +6,8 @@ import ( "net" "syscall" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) //go:generate sh -c "echo '// Code generated by go generate. DO NOT EDIT.\n// Source: sys_conn_buffers.go\n' > sys_conn_buffers_write.go && sed -e 's/SetReadBuffer/SetWriteBuffer/g' -e 's/setReceiveBuffer/setSendBuffer/g' -e 's/inspectReadBuffer/inspectWriteBuffer/g' -e 's/protocol\\.DesiredReceiveBufferSize/protocol\\.DesiredSendBufferSize/g' -e 's/forceSetReceiveBuffer/forceSetSendBuffer/g' -e 's/receive buffer/send buffer/g' sys_conn_buffers.go | sed '/^\\/\\/go:generate/d' >> sys_conn_buffers_write.go" diff --git a/sys_conn_buffers_write.go b/sys_conn_buffers_write.go index c01a931b5f7..0468bbe906b 100644 --- a/sys_conn_buffers_write.go +++ b/sys_conn_buffers_write.go @@ -9,8 +9,8 @@ import ( "net" "syscall" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) func setSendBuffer(c net.PacketConn) error { diff --git a/sys_conn_df_darwin.go b/sys_conn_df_darwin.go index b51cd8f1a73..9dda8cfc467 100644 --- a/sys_conn_df_darwin.go +++ b/sys_conn_df_darwin.go @@ -10,7 +10,7 @@ import ( "golang.org/x/sys/unix" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/utils" ) func setDF(rawConn syscall.RawConn) (bool, error) { @@ -39,7 +39,7 @@ func setDF(rawConn syscall.RawConn) (bool, error) { // On macOS, the syscall for setting DF bit for IPv4 fails on dual-stack listeners. // Treat the connection as not having DF enabled, even though the DF bit will be set // when used for IPv6. - // See https://github.com/quic-go/quic-go/issues/3793 for details. + // See https://github.com/apernet/quic-go/issues/3793 for details. return false, nil case errDFIPv4 != nil && errDFIPv6 != nil: return false, errors.New("setting DF failed for both IPv4 and IPv6") diff --git a/sys_conn_df_linux.go b/sys_conn_df_linux.go index 3985bee7652..010a3522b5a 100644 --- a/sys_conn_df_linux.go +++ b/sys_conn_df_linux.go @@ -12,7 +12,7 @@ import ( "golang.org/x/sys/unix" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/utils" ) func setDF(rawConn syscall.RawConn) (bool, error) { diff --git a/sys_conn_df_windows.go b/sys_conn_df_windows.go index 850d620ddd5..9c390115000 100644 --- a/sys_conn_df_windows.go +++ b/sys_conn_df_windows.go @@ -8,7 +8,7 @@ import ( "golang.org/x/sys/windows" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/utils" ) const ( diff --git a/sys_conn_oob.go b/sys_conn_oob.go index 84d5e7e6492..4c6ac2a4d98 100644 --- a/sys_conn_oob.go +++ b/sys_conn_oob.go @@ -17,8 +17,8 @@ import ( "golang.org/x/net/ipv6" "golang.org/x/sys/unix" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" ) const ( diff --git a/sys_conn_oob_test.go b/sys_conn_oob_test.go index 30b333b971f..851a8e18044 100644 --- a/sys_conn_oob_test.go +++ b/sys_conn_oob_test.go @@ -10,8 +10,8 @@ import ( "golang.org/x/net/ipv4" "golang.org/x/sys/unix" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/sys_conn_test.go b/sys_conn_test.go index 418e2c31d07..5090e53afb8 100644 --- a/sys_conn_test.go +++ b/sys_conn_test.go @@ -4,7 +4,7 @@ import ( "net" "time" - "github.com/quic-go/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/protocol" "github.com/golang/mock/gomock" diff --git a/token_store.go b/token_store.go index 00460e50285..94fbab92d4c 100644 --- a/token_store.go +++ b/token_store.go @@ -3,8 +3,8 @@ package quic import ( "sync" - "github.com/quic-go/quic-go/internal/utils" - list "github.com/quic-go/quic-go/internal/utils/linkedlist" + "github.com/apernet/quic-go/internal/utils" + list "github.com/apernet/quic-go/internal/utils/linkedlist" ) type singleOriginTokenStore struct { diff --git a/transport.go b/transport.go index 290b647fb50..47629618bec 100644 --- a/transport.go +++ b/transport.go @@ -9,11 +9,11 @@ import ( "sync" "time" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/wire" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/utils" - "github.com/quic-go/quic-go/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/utils" + "github.com/apernet/quic-go/logging" ) // The Transport is the central point to manage incoming and outgoing QUIC connections. @@ -318,7 +318,7 @@ func (t *Transport) listen(conn rawConn) { //nolint:staticcheck // SA1019 ignore this! // TODO: This code is used to ignore wsa errors on Windows. // Since net.Error.Temporary is deprecated as of Go 1.18, we should find a better solution. - // See https://github.com/quic-go/quic-go/issues/1737 for details. + // See https://github.com/apernet/quic-go/issues/1737 for details. if nerr, ok := err.(net.Error); ok && nerr.Temporary() { t.mutex.Lock() closed := t.closed diff --git a/transport_test.go b/transport_test.go index f46affb3dd9..3d40ed2001a 100644 --- a/transport_test.go +++ b/transport_test.go @@ -9,10 +9,10 @@ import ( "syscall" "time" - mocklogging "github.com/quic-go/quic-go/internal/mocks/logging" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" - "github.com/quic-go/quic-go/logging" + mocklogging "github.com/apernet/quic-go/internal/mocks/logging" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" + "github.com/apernet/quic-go/logging" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/window_update_queue.go b/window_update_queue.go index 9ed121430e1..0a3b3500d51 100644 --- a/window_update_queue.go +++ b/window_update_queue.go @@ -3,9 +3,9 @@ package quic import ( "sync" - "github.com/quic-go/quic-go/internal/flowcontrol" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/flowcontrol" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" ) type windowUpdateQueue struct { diff --git a/window_update_queue_test.go b/window_update_queue_test.go index 492fd5964aa..c29a910b508 100644 --- a/window_update_queue_test.go +++ b/window_update_queue_test.go @@ -1,9 +1,9 @@ package quic import ( - "github.com/quic-go/quic-go/internal/mocks" - "github.com/quic-go/quic-go/internal/protocol" - "github.com/quic-go/quic-go/internal/wire" + "github.com/apernet/quic-go/internal/mocks" + "github.com/apernet/quic-go/internal/protocol" + "github.com/apernet/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" From 411ff2bef8f81dc3d9b75220b7fc83019d873832 Mon Sep 17 00:00:00 2001 From: Toby Date: Mon, 31 Jul 2023 19:04:02 -0700 Subject: [PATCH 07/14] feat: disable buffer warning --- sys_conn.go | 26 ++------------------------ transport.go | 3 --- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/sys_conn.go b/sys_conn.go index ce76e23a2ed..1af76bc4c76 100644 --- a/sys_conn.go +++ b/sys_conn.go @@ -2,11 +2,7 @@ package quic import ( "fmt" - "log" "net" - "os" - "strconv" - "strings" "syscall" "time" @@ -28,26 +24,8 @@ type OOBCapablePacketConn interface { var _ OOBCapablePacketConn = &net.UDPConn{} func wrapConn(pc net.PacketConn) (rawConn, error) { - if err := setReceiveBuffer(pc); err != nil { - if !strings.Contains(err.Error(), "use of closed network connection") { - setBufferWarningOnce.Do(func() { - if disable, _ := strconv.ParseBool(os.Getenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING")); disable { - return - } - log.Printf("%s. See https://github.com/apernet/quic-go/wiki/UDP-Buffer-Sizes for details.", err) - }) - } - } - if err := setSendBuffer(pc); err != nil { - if !strings.Contains(err.Error(), "use of closed network connection") { - setBufferWarningOnce.Do(func() { - if disable, _ := strconv.ParseBool(os.Getenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING")); disable { - return - } - log.Printf("%s. See https://github.com/apernet/quic-go/wiki/UDP-Buffer-Sizes for details.", err) - }) - } - } + _ = setReceiveBuffer(pc) + _ = setSendBuffer(pc) conn, ok := pc.(interface { SyscallConn() (syscall.RawConn, error) diff --git a/transport.go b/transport.go index 47629618bec..fee910f8f3c 100644 --- a/transport.go +++ b/transport.go @@ -306,9 +306,6 @@ func (t *Transport) close(e error) { t.closed = true } -// only print warnings about the UDP receive buffer size once -var setBufferWarningOnce sync.Once - func (t *Transport) listen(conn rawConn) { defer close(t.listening) defer getMultiplexer().RemoveConn(t.Conn) From b8aa6a8286c5d4d881745134550e2dbe2a2ec91d Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 3 Aug 2023 11:20:32 -0400 Subject: [PATCH 08/14] update qtls to restrict RSA keys in certificates to <= 8192 bits (#4012) --- go.mod | 2 +- go.sum | 4 ++-- integrationtests/gomodvendor/go.sum | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 53612c67a9a..2f2a0ff0b62 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/onsi/ginkgo/v2 v2.9.5 github.com/onsi/gomega v1.27.6 github.com/quic-go/qpack v0.4.0 - github.com/quic-go/qtls-go1-20 v0.3.0 + github.com/quic-go/qtls-go1-20 v0.3.1 golang.org/x/crypto v0.4.0 golang.org/x/exp v0.0.0-20221205204356-47842c84f3db golang.org/x/net v0.10.0 diff --git a/go.sum b/go.sum index 4039bb0778e..c0ed9606da1 100644 --- a/go.sum +++ b/go.sum @@ -90,8 +90,8 @@ github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7q github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/qtls-go1-20 v0.3.0 h1:NrCXmDl8BddZwO67vlvEpBTwT89bJfKYygxv4HQvuDk= -github.com/quic-go/qtls-go1-20 v0.3.0/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= +github.com/quic-go/qtls-go1-20 v0.3.1 h1:O4BLOM3hwfVF3AcktIylQXyl7Yi2iBNVy5QsV+ySxbg= +github.com/quic-go/qtls-go1-20 v0.3.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= diff --git a/integrationtests/gomodvendor/go.sum b/integrationtests/gomodvendor/go.sum index 1336cd7c46a..ad9adb3117c 100644 --- a/integrationtests/gomodvendor/go.sum +++ b/integrationtests/gomodvendor/go.sum @@ -136,8 +136,8 @@ github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7q github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/qtls-go1-20 v0.3.0 h1:NrCXmDl8BddZwO67vlvEpBTwT89bJfKYygxv4HQvuDk= -github.com/quic-go/qtls-go1-20 v0.3.0/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= +github.com/quic-go/qtls-go1-20 v0.3.1 h1:O4BLOM3hwfVF3AcktIylQXyl7Yi2iBNVy5QsV+ySxbg= +github.com/quic-go/qtls-go1-20 v0.3.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= From a0a2e5ff26e4c5568a28b3bbc2882e0a3a36a9a3 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 3 Aug 2023 20:33:19 -0400 Subject: [PATCH 09/14] set a net.Conn for tls.ClientHelloInfo.Conn used by GetCertificate (#4014) --- integrationtests/self/handshake_test.go | 26 ++++++++++++++++++++++++- internal/handshake/crypto_setup.go | 7 +++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/integrationtests/self/handshake_test.go b/integrationtests/self/handshake_test.go index 9652cb0d369..f23ae77cc9e 100644 --- a/integrationtests/self/handshake_test.go +++ b/integrationtests/self/handshake_test.go @@ -140,7 +140,7 @@ var _ = Describe("Handshake tests", func() { Expect(err).ToNot(HaveOccurred()) }) - It("has the right local and remote address on the ClientHelloInfo.Conn", func() { + It("has the right local and remote address on the tls.Config.GetConfigForClient ClientHelloInfo.Conn", func() { var local, remote net.Addr done := make(chan struct{}) tlsConf := &tls.Config{ @@ -164,6 +164,30 @@ var _ = Describe("Handshake tests", func() { Expect(conn.LocalAddr().(*net.UDPAddr).Port).To(Equal(remote.(*net.UDPAddr).Port)) }) + It("has the right local and remote address on the tls.Config.GetCertificate ClientHelloInfo.Conn", func() { + var local, remote net.Addr + done := make(chan struct{}) + tlsConf := getTLSConfig() + tlsConf.GetCertificate = func(info *tls.ClientHelloInfo) (*tls.Certificate, error) { + defer close(done) + local = info.Conn.LocalAddr() + remote = info.Conn.RemoteAddr() + cert := tlsConf.Certificates[0] + return &cert, nil + } + runServer(tlsConf) + conn, err := quic.DialAddr( + context.Background(), + fmt.Sprintf("localhost:%d", server.Addr().(*net.UDPAddr).Port), + getTLSClientConfig(), + getQuicConfig(nil), + ) + Expect(err).ToNot(HaveOccurred()) + Eventually(done).Should(BeClosed()) + Expect(server.Addr()).To(Equal(local)) + Expect(conn.LocalAddr().(*net.UDPAddr).Port).To(Equal(remote.(*net.UDPAddr).Port)) + }) + It("works with a long certificate chain", func() { runServer(getTLSConfigWithLongCertChain()) _, err := quic.DialAddr( diff --git a/internal/handshake/crypto_setup.go b/internal/handshake/crypto_setup.go index b528f08ebf3..7011a6fce83 100644 --- a/internal/handshake/crypto_setup.go +++ b/internal/handshake/crypto_setup.go @@ -134,6 +134,13 @@ func NewCryptoSetupServer( return gcfc(info) } } + if quicConf.TLSConfig.GetCertificate != nil { + gc := quicConf.TLSConfig.GetCertificate + quicConf.TLSConfig.GetCertificate = func(info *tls.ClientHelloInfo) (*tls.Certificate, error) { + info.Conn = &conn{localAddr: localAddr, remoteAddr: remoteAddr} + return gc(info) + } + } cs.tlsConf = quicConf.TLSConfig cs.conn = qtls.QUICServer(quicConf) From 39966a4c81759956246750a7d8fbba842df819a1 Mon Sep 17 00:00:00 2001 From: Toby Date: Fri, 4 Aug 2023 15:15:26 -0700 Subject: [PATCH 10/14] chore: change back module name for merge --- Changelog.md | 4 +- README.md | 4 +- SECURITY.md | 4 +- buffer_pool.go | 2 +- buffer_pool_test.go | 2 +- client.go | 6 +-- client_test.go | 8 ++-- closed_conn.go | 4 +- closed_conn_test.go | 4 +- config.go | 6 +-- config_test.go | 6 +-- congestion/interface.go | 2 +- conn_id_generator.go | 8 ++-- conn_id_generator_test.go | 6 +-- conn_id_manager.go | 10 ++-- conn_id_manager_test.go | 6 +-- connection.go | 24 +++++----- connection_test.go | 22 ++++----- connection_timer.go | 2 +- crypto_stream.go | 8 ++-- crypto_stream_manager.go | 6 +-- crypto_stream_manager_test.go | 4 +- crypto_stream_test.go | 6 +-- datagram_queue.go | 6 +-- datagram_queue_test.go | 4 +- errors.go | 2 +- example/client/main.go | 12 ++--- example/echo/echo.go | 2 +- example/main.go | 12 ++--- frame_sorter.go | 6 +-- frame_sorter_test.go | 6 +-- framer.go | 10 ++-- framer_test.go | 6 +-- fuzzing/frames/cmd/corpus.go | 8 ++-- fuzzing/frames/fuzz.go | 4 +- fuzzing/handshake/cmd/corpus.go | 14 +++--- fuzzing/handshake/fuzz.go | 10 ++-- fuzzing/header/cmd/corpus.go | 8 ++-- fuzzing/header/fuzz.go | 4 +- fuzzing/tokens/fuzz.go | 4 +- fuzzing/transportparameters/cmd/corpus.go | 8 ++-- fuzzing/transportparameters/fuzz.go | 6 +-- go.mod | 2 +- http3/body.go | 2 +- http3/body_test.go | 4 +- http3/capsule.go | 2 +- http3/capsule_test.go | 2 +- http3/client.go | 8 ++-- http3/client_test.go | 10 ++-- http3/error_codes.go | 2 +- http3/frames.go | 4 +- http3/frames_test.go | 2 +- http3/http_stream.go | 4 +- http3/http_stream_test.go | 4 +- http3/mock_quic_early_listener_test.go | 4 +- http3/mock_roundtripcloser_test.go | 2 +- http3/mockgen.go | 4 +- http3/request_writer.go | 4 +- http3/request_writer_test.go | 4 +- http3/response_writer.go | 4 +- http3/response_writer_test.go | 4 +- http3/roundtrip.go | 2 +- http3/roundtrip_test.go | 4 +- http3/server.go | 8 ++-- http3/server_test.go | 12 ++--- integrationtests/gomodvendor/go.mod | 4 +- integrationtests/gomodvendor/main.go | 2 +- integrationtests/self/benchmark_test.go | 2 +- integrationtests/self/cancelation_test.go | 4 +- integrationtests/self/close_test.go | 4 +- integrationtests/self/conn_id_test.go | 4 +- integrationtests/self/datagram_test.go | 6 +-- integrationtests/self/deadline_test.go | 2 +- integrationtests/self/drop_test.go | 4 +- integrationtests/self/early_data_test.go | 4 +- integrationtests/self/handshake_drop_test.go | 8 ++-- integrationtests/self/handshake_rtt_test.go | 4 +- integrationtests/self/handshake_test.go | 8 ++-- integrationtests/self/hotswap_test.go | 4 +- integrationtests/self/http_test.go | 4 +- integrationtests/self/key_update_test.go | 8 ++-- integrationtests/self/mitm_test.go | 10 ++-- integrationtests/self/multiplex_test.go | 2 +- integrationtests/self/packetization_test.go | 6 +-- integrationtests/self/resumption_test.go | 2 +- integrationtests/self/rtt_test.go | 4 +- integrationtests/self/self_suite_test.go | 12 ++--- integrationtests/self/stateless_reset_test.go | 4 +- integrationtests/self/stream_test.go | 2 +- integrationtests/self/timeout_test.go | 8 ++-- integrationtests/self/tracer_test.go | 10 ++-- integrationtests/self/uni_stream_test.go | 4 +- integrationtests/self/zero_rtt_oldgo_test.go | 10 ++-- integrationtests/self/zero_rtt_test.go | 10 ++-- integrationtests/tools/proxy/proxy.go | 4 +- integrationtests/tools/proxy/proxy_test.go | 4 +- integrationtests/tools/qlog.go | 8 ++-- .../versionnegotiation/handshake_test.go | 8 ++-- .../versionnegotiation/rtt_test.go | 6 +-- .../versionnegotiation_suite_test.go | 6 +-- interface.go | 8 ++-- internal/ackhandler/ack_eliciting.go | 2 +- internal/ackhandler/ack_eliciting_test.go | 2 +- internal/ackhandler/ackhandler.go | 6 +-- internal/ackhandler/cc_adapter.go | 4 +- internal/ackhandler/frame.go | 2 +- internal/ackhandler/interfaces.go | 6 +-- .../mock_sent_packet_tracker_test.go | 4 +- internal/ackhandler/mockgen.go | 2 +- internal/ackhandler/packet.go | 2 +- .../ackhandler/packet_number_generator.go | 4 +- .../packet_number_generator_test.go | 2 +- .../ackhandler/received_packet_handler.go | 6 +-- .../received_packet_handler_test.go | 6 +-- .../ackhandler/received_packet_history.go | 6 +-- .../received_packet_history_test.go | 4 +- .../ackhandler/received_packet_tracker.go | 6 +-- .../received_packet_tracker_test.go | 6 +-- internal/ackhandler/sent_packet_handler.go | 14 +++--- .../ackhandler/sent_packet_handler_test.go | 10 ++-- internal/ackhandler/sent_packet_history.go | 2 +- .../ackhandler/sent_packet_history_test.go | 2 +- internal/congestion/bandwidth.go | 2 +- internal/congestion/cubic.go | 4 +- internal/congestion/cubic_sender.go | 6 +-- internal/congestion/cubic_sender_test.go | 4 +- internal/congestion/cubic_test.go | 2 +- internal/congestion/hybrid_slow_start.go | 4 +- internal/congestion/hybrid_slow_start_test.go | 2 +- internal/congestion/interface.go | 2 +- internal/congestion/pacer.go | 4 +- internal/congestion/pacer_test.go | 2 +- internal/flowcontrol/base_flow_controller.go | 4 +- .../flowcontrol/base_flow_controller_test.go | 4 +- .../flowcontrol/connection_flow_controller.go | 6 +-- .../connection_flow_controller_test.go | 4 +- internal/flowcontrol/interface.go | 2 +- .../flowcontrol/stream_flow_controller.go | 6 +-- .../stream_flow_controller_test.go | 6 +-- internal/handshake/aead.go | 4 +- internal/handshake/aead_test.go | 2 +- internal/handshake/crypto_setup.go | 14 +++--- internal/handshake/crypto_setup_test.go | 12 ++--- internal/handshake/header_protector.go | 2 +- internal/handshake/initial_aead.go | 2 +- internal/handshake/initial_aead_test.go | 2 +- internal/handshake/interface.go | 4 +- internal/handshake/retry.go | 2 +- internal/handshake/retry_test.go | 2 +- internal/handshake/session_ticket.go | 4 +- internal/handshake/session_ticket_test.go | 4 +- internal/handshake/token_generator.go | 2 +- internal/handshake/token_generator_test.go | 2 +- internal/handshake/updatable_aead.go | 8 ++-- internal/handshake/updatable_aead_test.go | 8 ++-- internal/logutils/frame.go | 6 +-- internal/logutils/frame_test.go | 4 +- .../ackhandler/received_packet_handler.go | 6 +-- .../mocks/ackhandler/sent_packet_handler.go | 10 ++-- internal/mocks/congestion.go | 4 +- internal/mocks/connection_flow_controller.go | 4 +- internal/mocks/crypto_setup.go | 6 +-- internal/mocks/logging/connection_tracer.go | 10 ++-- internal/mocks/logging/tracer.go | 8 ++-- internal/mocks/long_header_opener.go | 4 +- internal/mocks/mockgen.go | 26 +++++----- internal/mocks/quic/early_conn.go | 8 ++-- internal/mocks/quic/stream.go | 6 +-- internal/mocks/short_header_opener.go | 4 +- internal/mocks/short_header_sealer.go | 4 +- internal/mocks/stream_flow_controller.go | 4 +- internal/qerr/error_codes.go | 2 +- internal/qerr/errors.go | 2 +- internal/qerr/errors_test.go | 2 +- internal/qtls/cipher_suite_test.go | 2 +- internal/qtls/client_session_cache_test.go | 2 +- internal/qtls/go120.go | 2 +- internal/qtls/go120_test.go | 2 +- internal/qtls/go121.go | 2 +- internal/qtls/go121_test.go | 2 +- internal/qtls/go_oldversion.go | 2 +- internal/testutils/testutils.go | 6 +-- internal/utils/log.go | 2 +- internal/utils/ringbuffer/ringbuffer.go | 2 +- internal/utils/rtt_stats.go | 2 +- internal/utils/rtt_stats_test.go | 2 +- internal/utils/streamframe_interval.go | 2 +- internal/wire/ack_frame.go | 6 +-- internal/wire/ack_frame_test.go | 4 +- internal/wire/ack_range.go | 2 +- internal/wire/connection_close_frame.go | 4 +- internal/wire/connection_close_frame_test.go | 2 +- internal/wire/crypto_frame.go | 4 +- internal/wire/crypto_frame_test.go | 4 +- internal/wire/data_blocked_frame.go | 4 +- internal/wire/data_blocked_frame_test.go | 4 +- internal/wire/datagram_frame.go | 4 +- internal/wire/datagram_frame_test.go | 4 +- internal/wire/extended_header.go | 6 +-- internal/wire/extended_header_test.go | 6 +-- internal/wire/frame_parser.go | 6 +-- internal/wire/frame_parser_test.go | 4 +- internal/wire/handshake_done_frame.go | 2 +- internal/wire/handshake_done_frame_test.go | 2 +- internal/wire/header.go | 6 +-- internal/wire/header_test.go | 2 +- internal/wire/interface.go | 2 +- internal/wire/log.go | 4 +- internal/wire/log_test.go | 4 +- internal/wire/max_data_frame.go | 4 +- internal/wire/max_data_frame_test.go | 4 +- internal/wire/max_stream_data_frame.go | 4 +- internal/wire/max_stream_data_frame_test.go | 4 +- internal/wire/max_streams_frame.go | 4 +- internal/wire/max_streams_frame_test.go | 4 +- internal/wire/new_connection_id_frame.go | 4 +- internal/wire/new_connection_id_frame_test.go | 2 +- internal/wire/new_token_frame.go | 4 +- internal/wire/new_token_frame_test.go | 4 +- internal/wire/path_challenge_frame.go | 2 +- internal/wire/path_challenge_frame_test.go | 2 +- internal/wire/path_response_frame.go | 2 +- internal/wire/path_response_frame_test.go | 2 +- internal/wire/ping_frame.go | 2 +- internal/wire/ping_frame_test.go | 2 +- internal/wire/pool.go | 2 +- internal/wire/reset_stream_frame.go | 6 +-- internal/wire/reset_stream_frame_test.go | 6 +-- internal/wire/retire_connection_id_frame.go | 4 +- .../wire/retire_connection_id_frame_test.go | 2 +- internal/wire/short_header.go | 4 +- internal/wire/short_header_test.go | 4 +- internal/wire/stop_sending_frame.go | 6 +-- internal/wire/stop_sending_frame_test.go | 6 +-- internal/wire/stream_data_blocked_frame.go | 4 +- .../wire/stream_data_blocked_frame_test.go | 4 +- internal/wire/stream_frame.go | 4 +- internal/wire/stream_frame_test.go | 4 +- internal/wire/streams_blocked_frame.go | 4 +- internal/wire/streams_blocked_frame_test.go | 4 +- internal/wire/transport_parameter_test.go | 6 +-- internal/wire/transport_parameters.go | 8 ++-- internal/wire/version_negotiation.go | 4 +- internal/wire/version_negotiation_test.go | 2 +- internal/wire/wire_suite_test.go | 4 +- interop/client/main.go | 14 +++--- interop/http09/client.go | 2 +- interop/http09/http_test.go | 4 +- interop/http09/server.go | 2 +- interop/server/main.go | 10 ++-- interop/utils/logging.go | 8 ++-- logging/frame.go | 2 +- logging/interface.go | 8 ++-- logging/mock_connection_tracer_test.go | 8 ++-- logging/mock_tracer_test.go | 6 +-- logging/mockgen.go | 4 +- logging/multiplex_test.go | 4 +- logging/packet_header.go | 2 +- logging/packet_header_test.go | 4 +- mock_ack_frame_source_test.go | 6 +-- mock_conn_runner_test.go | 4 +- mock_crypto_data_handler_test.go | 6 +-- mock_crypto_stream_test.go | 6 +-- mock_frame_source_test.go | 6 +-- mock_mtu_discoverer_test.go | 6 +-- mock_packer_test.go | 8 ++-- mock_packet_handler_manager_test.go | 4 +- mock_packet_handler_test.go | 4 +- mock_quic_conn_test.go | 8 ++-- mock_receive_stream_internal_test.go | 8 ++-- mock_sealing_manager_test.go | 4 +- mock_send_conn_test.go | 4 +- mock_send_stream_internal_test.go | 10 ++-- mock_sender_test.go | 4 +- mock_stream_getter_test.go | 4 +- mock_stream_internal_test.go | 10 ++-- mock_stream_manager_test.go | 6 +-- mock_stream_sender_test.go | 6 +-- mock_token_store_test.go | 2 +- mock_unknown_packet_handler_test.go | 2 +- mock_unpacker_test.go | 6 +-- mockgen.go | 48 +++++++++---------- mtu_discoverer.go | 8 ++-- mtu_discoverer_test.go | 4 +- multiplexer.go | 4 +- oss-fuzz.sh | 12 ++--- packet_handler_map.go | 4 +- packet_handler_map_test.go | 4 +- packet_packer.go | 10 ++-- packet_packer_test.go | 16 +++---- packet_unpacker.go | 8 ++-- packet_unpacker_test.go | 10 ++-- qlog/event.go | 8 ++-- qlog/frame.go | 4 +- qlog/frame_test.go | 6 +-- qlog/packet_header.go | 4 +- qlog/packet_header_test.go | 6 +-- qlog/qlog.go | 12 ++--- qlog/qlog_test.go | 10 ++-- qlog/trace.go | 4 +- qlog/types.go | 6 +-- qlog/types_test.go | 6 +-- quicvarint/varint.go | 2 +- receive_stream.go | 10 ++-- receive_stream_test.go | 6 +-- retransmission_queue.go | 6 +-- retransmission_queue_test.go | 4 +- send_conn.go | 2 +- send_queue.go | 2 +- send_queue_test.go | 2 +- send_stream.go | 12 ++--- send_stream_test.go | 8 ++-- server.go | 12 ++--- server_test.go | 16 +++---- stream.go | 8 ++-- stream_test.go | 6 +-- streams_map.go | 8 ++-- streams_map_incoming.go | 4 +- streams_map_incoming_test.go | 4 +- streams_map_outgoing.go | 4 +- streams_map_outgoing_test.go | 4 +- streams_map_test.go | 10 ++-- sys_conn.go | 4 +- sys_conn_buffers.go | 4 +- sys_conn_buffers_write.go | 4 +- sys_conn_df_darwin.go | 4 +- sys_conn_df_linux.go | 2 +- sys_conn_df_windows.go | 2 +- sys_conn_oob.go | 4 +- sys_conn_oob_test.go | 4 +- sys_conn_test.go | 2 +- token_store.go | 4 +- transport.go | 10 ++-- transport_test.go | 8 ++-- window_update_queue.go | 6 +-- window_update_queue_test.go | 6 +-- 336 files changed, 892 insertions(+), 892 deletions(-) diff --git a/Changelog.md b/Changelog.md index 4b3692a1091..82df5fb2457 100644 --- a/Changelog.md +++ b/Changelog.md @@ -101,8 +101,8 @@ - Add a `quic.Config` option to configure keep-alive - Rename the STK to Cookie - Implement `net.Conn`-style deadlines for streams -- Remove the `tls.Config` from the `quic.Config`. The `tls.Config` must now be passed to the `Dial` and `Listen` functions as a separate parameter. See the [Godoc](https://godoc.org/github.com/apernet/quic-go) for details. -- Changed the log level environment variable to only accept strings ("DEBUG", "INFO", "ERROR"), see [the wiki](https://github.com/apernet/quic-go/wiki/Logging) for more details. +- Remove the `tls.Config` from the `quic.Config`. The `tls.Config` must now be passed to the `Dial` and `Listen` functions as a separate parameter. See the [Godoc](https://godoc.org/github.com/quic-go/quic-go) for details. +- Changed the log level environment variable to only accept strings ("DEBUG", "INFO", "ERROR"), see [the wiki](https://github.com/quic-go/quic-go/wiki/Logging) for more details. - Rename the `h2quic.QuicRoundTripper` to `h2quic.RoundTripper` - Changed `h2quic.Server.Serve()` to accept a `net.PacketConn` - Drop support for Go 1.7 and 1.8. diff --git a/README.md b/README.md index 7e9ba9926e4..3eaf0583b3f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -[![PkgGoDev](https://pkg.go.dev/badge/github.com/apernet/quic-go)](https://pkg.go.dev/github.com/apernet/quic-go) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/quic-go/quic-go)](https://pkg.go.dev/github.com/quic-go/quic-go) [![Code Coverage](https://img.shields.io/codecov/c/github/quic-go/quic-go/master.svg?style=flat-square)](https://codecov.io/gh/quic-go/quic-go/) quic-go is an implementation of the QUIC protocol ([RFC 9000](https://datatracker.ietf.org/doc/html/rfc9000), [RFC 9001](https://datatracker.ietf.org/doc/html/rfc9001), [RFC 9002](https://datatracker.ietf.org/doc/html/rfc9002)) in Go. It has support for HTTP/3 ([RFC 9114](https://datatracker.ietf.org/doc/html/rfc9114)), including QPACK ([RFC 9204](https://datatracker.ietf.org/doc/html/rfc9204)). @@ -225,4 +225,4 @@ This had led to a lot of pain in the Go ecosystem, and we're happy that we can r ## Contributing -We are always happy to welcome new contributors! We have a number of self-contained issues that are suitable for first-time contributors, they are tagged with [help wanted](https://github.com/apernet/quic-go/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). If you have any questions, please feel free to reach out by opening an issue or leaving a comment. +We are always happy to welcome new contributors! We have a number of self-contained issues that are suitable for first-time contributors, they are tagged with [help wanted](https://github.com/quic-go/quic-go/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). If you have any questions, please feel free to reach out by opening an issue or leaving a comment. diff --git a/SECURITY.md b/SECURITY.md index 62c2ce89893..c24c08f8630 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -8,7 +8,7 @@ please bring it to our attention right away! ## Reporting a Vulnerability If you find a vulnerability that may affect live deployments -- for example, by exposing -a remote execution exploit -- please [**report privately**](https://github.com/apernet/quic-go/security/advisories/new). +a remote execution exploit -- please [**report privately**](https://github.com/quic-go/quic-go/security/advisories/new). Please **DO NOT file a public issue**. If the issue is an implementation weakness that cannot be immediately exploited or @@ -16,4 +16,4 @@ something not yet deployed, just discuss it openly. ## Reporting a non security bug -For non-security bugs, please simply file a GitHub [issue](https://github.com/apernet/quic-go/issues/new). +For non-security bugs, please simply file a GitHub [issue](https://github.com/quic-go/quic-go/issues/new). diff --git a/buffer_pool.go b/buffer_pool.go index 34f3d1ca1ea..48589e12365 100644 --- a/buffer_pool.go +++ b/buffer_pool.go @@ -3,7 +3,7 @@ package quic import ( "sync" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) type packetBuffer struct { diff --git a/buffer_pool_test.go b/buffer_pool_test.go index 851bdc1fa44..c565d4a48e1 100644 --- a/buffer_pool_test.go +++ b/buffer_pool_test.go @@ -1,7 +1,7 @@ package quic import ( - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/client.go b/client.go index 92c5264644a..4dfacb50d4e 100644 --- a/client.go +++ b/client.go @@ -6,9 +6,9 @@ import ( "errors" "net" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" ) type client struct { diff --git a/client_test.go b/client_test.go index 97c21ab8b6f..503468915ce 100644 --- a/client_test.go +++ b/client_test.go @@ -7,10 +7,10 @@ import ( "net" "time" - mocklogging "github.com/apernet/quic-go/internal/mocks/logging" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" + mocklogging "github.com/quic-go/quic-go/internal/mocks/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" "github.com/golang/mock/gomock" diff --git a/closed_conn.go b/closed_conn.go index 6c4063c660b..0c988b53e3f 100644 --- a/closed_conn.go +++ b/closed_conn.go @@ -4,8 +4,8 @@ import ( "math/bits" "net" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) // A closedLocalConn is a connection that we closed locally. diff --git a/closed_conn_test.go b/closed_conn_test.go index e3d0712ed58..ac9da31e643 100644 --- a/closed_conn_test.go +++ b/closed_conn_test.go @@ -3,8 +3,8 @@ package quic import ( "net" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/config.go b/config.go index 9de1e20d849..59df4cfd952 100644 --- a/config.go +++ b/config.go @@ -5,9 +5,9 @@ import ( "net" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/quicvarint" ) // Clone clones a Config diff --git a/config_test.go b/config_test.go index 3acb0650ddb..1eca3d5d4df 100644 --- a/config_test.go +++ b/config_test.go @@ -8,9 +8,9 @@ import ( "reflect" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/logging" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/logging" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/congestion/interface.go b/congestion/interface.go index 07083880995..51cc18fcb8c 100644 --- a/congestion/interface.go +++ b/congestion/interface.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) type ( diff --git a/conn_id_generator.go b/conn_id_generator.go index bdbea63842a..2d28dc619c3 100644 --- a/conn_id_generator.go +++ b/conn_id_generator.go @@ -3,10 +3,10 @@ package quic import ( "fmt" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" ) type connIDGenerator struct { diff --git a/conn_id_generator_test.go b/conn_id_generator_test.go index 5d637b864b3..2252de84b74 100644 --- a/conn_id_generator_test.go +++ b/conn_id_generator_test.go @@ -3,9 +3,9 @@ package quic import ( "fmt" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/conn_id_manager.go b/conn_id_manager.go index 023d485029a..ba65aec0438 100644 --- a/conn_id_manager.go +++ b/conn_id_manager.go @@ -3,11 +3,11 @@ package quic import ( "fmt" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - list "github.com/apernet/quic-go/internal/utils/linkedlist" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + list "github.com/quic-go/quic-go/internal/utils/linkedlist" + "github.com/quic-go/quic-go/internal/wire" ) type newConnID struct { diff --git a/conn_id_manager_test.go b/conn_id_manager_test.go index f03f9bb6db1..40d848f19b8 100644 --- a/conn_id_manager_test.go +++ b/conn_id_manager_test.go @@ -1,9 +1,9 @@ package quic import ( - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/connection.go b/connection.go index 3d50d9dbb42..df45d6518c8 100644 --- a/connection.go +++ b/connection.go @@ -13,16 +13,16 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go/congestion" - "github.com/apernet/quic-go/internal/ackhandler" - "github.com/apernet/quic-go/internal/flowcontrol" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/logutils" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/congestion" + "github.com/quic-go/quic-go/internal/ackhandler" + "github.com/quic-go/quic-go/internal/flowcontrol" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/logutils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" ) type unpacker interface { @@ -301,7 +301,7 @@ var newConnection = func( // different from protocol.DefaultActiveConnectionIDLimit. // If set to the default value, it will be omitted from the transport parameters, which will make // old quic-go versions interpret it as 0, instead of the default value of 2. - // See https://github.com/apernet/quic-go/pull/3806. + // See https://github.com/quic-go/quic-go/pull/3806. ActiveConnectionIDLimit: protocol.MaxActiveConnectionIDs, InitialSourceConnectionID: srcConnID, RetrySourceConnectionID: retrySrcConnID, @@ -408,7 +408,7 @@ var newClientConnection = func( // different from protocol.DefaultActiveConnectionIDLimit. // If set to the default value, it will be omitted from the transport parameters, which will make // old quic-go versions interpret it as 0, instead of the default value of 2. - // See https://github.com/apernet/quic-go/pull/3806. + // See https://github.com/quic-go/quic-go/pull/3806. ActiveConnectionIDLimit: protocol.MaxActiveConnectionIDs, InitialSourceConnectionID: srcConnID, } diff --git a/connection_test.go b/connection_test.go index 28984a505b7..20e9872b4bf 100644 --- a/connection_test.go +++ b/connection_test.go @@ -13,17 +13,17 @@ import ( "strings" "time" - "github.com/apernet/quic-go/internal/ackhandler" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/mocks" - mockackhandler "github.com/apernet/quic-go/internal/mocks/ackhandler" - mocklogging "github.com/apernet/quic-go/internal/mocks/logging" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/testutils" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/ackhandler" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/mocks" + mockackhandler "github.com/quic-go/quic-go/internal/mocks/ackhandler" + mocklogging "github.com/quic-go/quic-go/internal/mocks/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/testutils" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" "github.com/golang/mock/gomock" diff --git a/connection_timer.go b/connection_timer.go index f6024c488f5..171fdd01384 100644 --- a/connection_timer.go +++ b/connection_timer.go @@ -3,7 +3,7 @@ package quic import ( "time" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/utils" ) var deadlineSendImmediately = time.Time{}.Add(42 * time.Millisecond) // any value > time.Time{} and before time.Now() is fine diff --git a/crypto_stream.go b/crypto_stream.go index 80af089407e..4be2a07ae1a 100644 --- a/crypto_stream.go +++ b/crypto_stream.go @@ -4,10 +4,10 @@ import ( "fmt" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" ) type cryptoStream interface { diff --git a/crypto_stream_manager.go b/crypto_stream_manager.go index 8a937e1fdd7..c48e238a78a 100644 --- a/crypto_stream_manager.go +++ b/crypto_stream_manager.go @@ -3,9 +3,9 @@ package quic import ( "fmt" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) type cryptoDataHandler interface { diff --git a/crypto_stream_manager_test.go b/crypto_stream_manager_test.go index 42141606777..daffffe6a9a 100644 --- a/crypto_stream_manager_test.go +++ b/crypto_stream_manager_test.go @@ -1,8 +1,8 @@ package quic import ( - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/crypto_stream_test.go b/crypto_stream_test.go index dad3943f0bf..9a4a2ee57f9 100644 --- a/crypto_stream_test.go +++ b/crypto_stream_test.go @@ -3,9 +3,9 @@ package quic import ( "fmt" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/datagram_queue.go b/datagram_queue.go index 8eba2e96b4b..ca80d404cbf 100644 --- a/datagram_queue.go +++ b/datagram_queue.go @@ -4,9 +4,9 @@ import ( "context" "sync" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" ) type datagramQueue struct { diff --git a/datagram_queue_test.go b/datagram_queue_test.go index 3e01ab87a65..de3f8f57bf3 100644 --- a/datagram_queue_test.go +++ b/datagram_queue_test.go @@ -4,8 +4,8 @@ import ( "context" "errors" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/errors.go b/errors.go index 5699700e8f2..c9fb0a07b08 100644 --- a/errors.go +++ b/errors.go @@ -3,7 +3,7 @@ package quic import ( "fmt" - "github.com/apernet/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/qerr" ) type ( diff --git a/example/client/main.go b/example/client/main.go index 1c29e596dfd..83f810fd1a7 100644 --- a/example/client/main.go +++ b/example/client/main.go @@ -14,12 +14,12 @@ import ( "os" "sync" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/http3" - "github.com/apernet/quic-go/internal/testdata" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" - "github.com/apernet/quic-go/qlog" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/http3" + "github.com/quic-go/quic-go/internal/testdata" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" + "github.com/quic-go/quic-go/qlog" ) func main() { diff --git a/example/echo/echo.go b/example/echo/echo.go index 7e01db60e97..011c70a3f40 100644 --- a/example/echo/echo.go +++ b/example/echo/echo.go @@ -12,7 +12,7 @@ import ( "log" "math/big" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" ) const addr = "localhost:4242" diff --git a/example/main.go b/example/main.go index ce11bb1659f..058144050e8 100644 --- a/example/main.go +++ b/example/main.go @@ -18,12 +18,12 @@ import ( _ "net/http/pprof" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/http3" - "github.com/apernet/quic-go/internal/testdata" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" - "github.com/apernet/quic-go/qlog" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/http3" + "github.com/quic-go/quic-go/internal/testdata" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" + "github.com/quic-go/quic-go/qlog" ) type binds []string diff --git a/frame_sorter.go b/frame_sorter.go index 3e072e17fd3..1637a3ee49f 100644 --- a/frame_sorter.go +++ b/frame_sorter.go @@ -3,9 +3,9 @@ package quic import ( "errors" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/utils/tree" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/utils/tree" ) // byteInterval is an interval from one ByteCount to the other diff --git a/frame_sorter_test.go b/frame_sorter_test.go index 90d6eb98de7..46fb7078277 100644 --- a/frame_sorter_test.go +++ b/frame_sorter_test.go @@ -8,9 +8,9 @@ import ( "golang.org/x/exp/rand" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/utils/tree" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/utils/tree" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/framer.go b/framer.go index fb951715448..9409af4c2ee 100644 --- a/framer.go +++ b/framer.go @@ -4,11 +4,11 @@ import ( "errors" "sync" - "github.com/apernet/quic-go/internal/ackhandler" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils/ringbuffer" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/ackhandler" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils/ringbuffer" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/quicvarint" ) type framer interface { diff --git a/framer_test.go b/framer_test.go index 0fbea505cbd..9615e78e21c 100644 --- a/framer_test.go +++ b/framer_test.go @@ -4,9 +4,9 @@ import ( "bytes" "math/rand" - "github.com/apernet/quic-go/internal/ackhandler" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/ackhandler" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" "github.com/golang/mock/gomock" diff --git a/fuzzing/frames/cmd/corpus.go b/fuzzing/frames/cmd/corpus.go index e5856b1573c..5baed928649 100644 --- a/fuzzing/frames/cmd/corpus.go +++ b/fuzzing/frames/cmd/corpus.go @@ -6,10 +6,10 @@ import ( "golang.org/x/exp/rand" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/fuzzing/internal/helper" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/fuzzing/internal/helper" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) const version = protocol.Version1 diff --git a/fuzzing/frames/fuzz.go b/fuzzing/frames/fuzz.go index b17ca92b66e..44d2eee31b7 100644 --- a/fuzzing/frames/fuzz.go +++ b/fuzzing/frames/fuzz.go @@ -3,8 +3,8 @@ package frames import ( "fmt" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) const version = protocol.Version1 diff --git a/fuzzing/handshake/cmd/corpus.go b/fuzzing/handshake/cmd/corpus.go index 4de7f2c3cb4..bf7b34a05b7 100644 --- a/fuzzing/handshake/cmd/corpus.go +++ b/fuzzing/handshake/cmd/corpus.go @@ -5,13 +5,13 @@ import ( "log" "net" - fuzzhandshake "github.com/apernet/quic-go/fuzzing/handshake" - "github.com/apernet/quic-go/fuzzing/internal/helper" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/testdata" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + fuzzhandshake "github.com/quic-go/quic-go/fuzzing/handshake" + "github.com/quic-go/quic-go/fuzzing/internal/helper" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/testdata" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" ) const alpn = "fuzz" diff --git a/fuzzing/handshake/fuzz.go b/fuzzing/handshake/fuzz.go index 639af6b8aa5..2c5c1259b9b 100644 --- a/fuzzing/handshake/fuzz.go +++ b/fuzzing/handshake/fuzz.go @@ -14,11 +14,11 @@ import ( "net" "time" - "github.com/apernet/quic-go/fuzzing/internal/helper" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/fuzzing/internal/helper" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" ) var ( diff --git a/fuzzing/header/cmd/corpus.go b/fuzzing/header/cmd/corpus.go index 2f456871dbf..226dc106f55 100644 --- a/fuzzing/header/cmd/corpus.go +++ b/fuzzing/header/cmd/corpus.go @@ -5,10 +5,10 @@ import ( "golang.org/x/exp/rand" - "github.com/apernet/quic-go/fuzzing/header" - "github.com/apernet/quic-go/fuzzing/internal/helper" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/fuzzing/header" + "github.com/quic-go/quic-go/fuzzing/internal/helper" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) const version = protocol.Version1 diff --git a/fuzzing/header/fuzz.go b/fuzzing/header/fuzz.go index 4065903b220..62154f300cf 100644 --- a/fuzzing/header/fuzz.go +++ b/fuzzing/header/fuzz.go @@ -4,8 +4,8 @@ import ( "bytes" "fmt" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) const version = protocol.Version1 diff --git a/fuzzing/tokens/fuzz.go b/fuzzing/tokens/fuzz.go index bc705b283db..ea261fb6d77 100644 --- a/fuzzing/tokens/fuzz.go +++ b/fuzzing/tokens/fuzz.go @@ -6,8 +6,8 @@ import ( "net" "time" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/protocol" ) func Fuzz(data []byte) int { diff --git a/fuzzing/transportparameters/cmd/corpus.go b/fuzzing/transportparameters/cmd/corpus.go index 6ae4989339a..9e59cfba798 100644 --- a/fuzzing/transportparameters/cmd/corpus.go +++ b/fuzzing/transportparameters/cmd/corpus.go @@ -8,10 +8,10 @@ import ( "golang.org/x/exp/rand" - "github.com/apernet/quic-go/fuzzing/internal/helper" - "github.com/apernet/quic-go/fuzzing/transportparameters" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/fuzzing/internal/helper" + "github.com/quic-go/quic-go/fuzzing/transportparameters" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) func getRandomData(l int) []byte { diff --git a/fuzzing/transportparameters/fuzz.go b/fuzzing/transportparameters/fuzz.go index 3720dfb5ed2..a3ca143d3ee 100644 --- a/fuzzing/transportparameters/fuzz.go +++ b/fuzzing/transportparameters/fuzz.go @@ -4,9 +4,9 @@ import ( "bytes" "fmt" - "github.com/apernet/quic-go/fuzzing/internal/helper" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/fuzzing/internal/helper" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) // PrefixLen is the number of bytes used for configuration diff --git a/go.mod b/go.mod index 99e61a225c4..53612c67a9a 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/apernet/quic-go +module github.com/quic-go/quic-go go 1.20 diff --git a/http3/body.go b/http3/body.go index 1bace1d9848..63ff4366451 100644 --- a/http3/body.go +++ b/http3/body.go @@ -5,7 +5,7 @@ import ( "io" "net" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" ) // The HTTPStreamer allows taking over a HTTP/3 stream. The interface is implemented by: diff --git a/http3/body_test.go b/http3/body_test.go index e0f13d8a522..5bcca2e9cd7 100644 --- a/http3/body_test.go +++ b/http3/body_test.go @@ -3,8 +3,8 @@ package http3 import ( "errors" - "github.com/apernet/quic-go" - mockquic "github.com/apernet/quic-go/internal/mocks/quic" + "github.com/quic-go/quic-go" + mockquic "github.com/quic-go/quic-go/internal/mocks/quic" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/http3/capsule.go b/http3/capsule.go index c071d506be5..7bdcd4e5778 100644 --- a/http3/capsule.go +++ b/http3/capsule.go @@ -3,7 +3,7 @@ package http3 import ( "io" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/quicvarint" ) // CapsuleType is the type of the capsule. diff --git a/http3/capsule_test.go b/http3/capsule_test.go index eeafed64dac..4920e887a74 100644 --- a/http3/capsule_test.go +++ b/http3/capsule_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/http3/client.go b/http3/client.go index a97ba527fc9..cc2400e2c0d 100644 --- a/http3/client.go +++ b/http3/client.go @@ -13,10 +13,10 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/quicvarint" "github.com/quic-go/qpack" ) diff --git a/http3/client_test.go b/http3/client_test.go index 4cdc3a6b222..babcb064302 100644 --- a/http3/client_test.go +++ b/http3/client_test.go @@ -12,11 +12,11 @@ import ( "sync" "time" - "github.com/apernet/quic-go" - mockquic "github.com/apernet/quic-go/internal/mocks/quic" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go" + mockquic "github.com/quic-go/quic-go/internal/mocks/quic" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/quicvarint" "github.com/golang/mock/gomock" "github.com/quic-go/qpack" diff --git a/http3/error_codes.go b/http3/error_codes.go index e1a4d040e5c..67b215d8548 100644 --- a/http3/error_codes.go +++ b/http3/error_codes.go @@ -3,7 +3,7 @@ package http3 import ( "fmt" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" ) type ErrCode quic.ApplicationErrorCode diff --git a/http3/frames.go b/http3/frames.go index 6868034757a..cdd97bc5e5d 100644 --- a/http3/frames.go +++ b/http3/frames.go @@ -6,8 +6,8 @@ import ( "fmt" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // FrameType is the frame type of a HTTP/3 frame diff --git a/http3/frames_test.go b/http3/frames_test.go index f5cbfd8716e..04e583d222c 100644 --- a/http3/frames_test.go +++ b/http3/frames_test.go @@ -6,7 +6,7 @@ import ( "fmt" "io" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/http3/http_stream.go b/http3/http_stream.go index 7a48efe66be..1c0ec4f1898 100644 --- a/http3/http_stream.go +++ b/http3/http_stream.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/utils" ) // A Stream is a HTTP/3 stream. diff --git a/http3/http_stream_test.go b/http3/http_stream_test.go index f3e707dda3f..cff5476b8fe 100644 --- a/http3/http_stream_test.go +++ b/http3/http_stream_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go" - mockquic "github.com/apernet/quic-go/internal/mocks/quic" + "github.com/quic-go/quic-go" + mockquic "github.com/quic-go/quic-go/internal/mocks/quic" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/http3/mock_quic_early_listener_test.go b/http3/mock_quic_early_listener_test.go index 848de62229b..ab40f0605de 100644 --- a/http3/mock_quic_early_listener_test.go +++ b/http3/mock_quic_early_listener_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/http3 (interfaces: QUICEarlyListener) +// Source: github.com/quic-go/quic-go/http3 (interfaces: QUICEarlyListener) // Package http3 is a generated GoMock package. package http3 @@ -10,7 +10,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - quic "github.com/apernet/quic-go" + quic "github.com/quic-go/quic-go" ) // MockQUICEarlyListener is a mock of QUICEarlyListener interface. diff --git a/http3/mock_roundtripcloser_test.go b/http3/mock_roundtripcloser_test.go index 6fe1c8b7655..7aa19ee3f80 100644 --- a/http3/mock_roundtripcloser_test.go +++ b/http3/mock_roundtripcloser_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/http3 (interfaces: RoundTripCloser) +// Source: github.com/quic-go/quic-go/http3 (interfaces: RoundTripCloser) // Package http3 is a generated GoMock package. package http3 diff --git a/http3/mockgen.go b/http3/mockgen.go index 4d414ea7ecf..38939e605cd 100644 --- a/http3/mockgen.go +++ b/http3/mockgen.go @@ -2,7 +2,7 @@ package http3 -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package http3 -destination mock_roundtripcloser_test.go github.com/apernet/quic-go/http3 RoundTripCloser" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package http3 -destination mock_roundtripcloser_test.go github.com/quic-go/quic-go/http3 RoundTripCloser" type RoundTripCloser = roundTripCloser -//go:generate sh -c "go run github.com/golang/mock/mockgen -package http3 -destination mock_quic_early_listener_test.go github.com/apernet/quic-go/http3 QUICEarlyListener" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package http3 -destination mock_quic_early_listener_test.go github.com/quic-go/quic-go/http3 QUICEarlyListener" diff --git a/http3/request_writer.go b/http3/request_writer.go index a37b237e4c3..875f4031ae2 100644 --- a/http3/request_writer.go +++ b/http3/request_writer.go @@ -16,8 +16,8 @@ import ( "golang.org/x/net/idna" "github.com/quic-go/qpack" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/utils" ) const bodyCopyBufferSize = 8 * 1024 diff --git a/http3/request_writer_test.go b/http3/request_writer_test.go index 78bc953514f..74fd239870c 100644 --- a/http3/request_writer_test.go +++ b/http3/request_writer_test.go @@ -5,8 +5,8 @@ import ( "io" "net/http" - mockquic "github.com/apernet/quic-go/internal/mocks/quic" - "github.com/apernet/quic-go/internal/utils" + mockquic "github.com/quic-go/quic-go/internal/mocks/quic" + "github.com/quic-go/quic-go/internal/utils" "github.com/golang/mock/gomock" "github.com/quic-go/qpack" diff --git a/http3/response_writer.go b/http3/response_writer.go index c4f29ce16e4..3d9271858d6 100644 --- a/http3/response_writer.go +++ b/http3/response_writer.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/utils" "github.com/quic-go/qpack" ) diff --git a/http3/response_writer_test.go b/http3/response_writer_test.go index 2e275db785c..c803adb73b5 100644 --- a/http3/response_writer_test.go +++ b/http3/response_writer_test.go @@ -6,8 +6,8 @@ import ( "net/http" "time" - mockquic "github.com/apernet/quic-go/internal/mocks/quic" - "github.com/apernet/quic-go/internal/utils" + mockquic "github.com/quic-go/quic-go/internal/mocks/quic" + "github.com/quic-go/quic-go/internal/utils" "github.com/golang/mock/gomock" "github.com/quic-go/qpack" diff --git a/http3/roundtrip.go b/http3/roundtrip.go index 28adb407268..066b762b85c 100644 --- a/http3/roundtrip.go +++ b/http3/roundtrip.go @@ -14,7 +14,7 @@ import ( "golang.org/x/net/http/httpguts" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" ) type roundTripCloser interface { diff --git a/http3/roundtrip_test.go b/http3/roundtrip_test.go index 207420f6419..0c219db7e93 100644 --- a/http3/roundtrip_test.go +++ b/http3/roundtrip_test.go @@ -10,8 +10,8 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/qerr" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/qerr" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/http3/server.go b/http3/server.go index dee12686050..b90c850c112 100644 --- a/http3/server.go +++ b/http3/server.go @@ -13,10 +13,10 @@ import ( "sync" "time" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/quicvarint" "github.com/quic-go/qpack" ) diff --git a/http3/server_test.go b/http3/server_test.go index 8a96166e222..f180ef0d5c2 100644 --- a/http3/server_test.go +++ b/http3/server_test.go @@ -13,12 +13,12 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" - mockquic "github.com/apernet/quic-go/internal/mocks/quic" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/testdata" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go" + mockquic "github.com/quic-go/quic-go/internal/mocks/quic" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/testdata" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/quicvarint" "github.com/golang/mock/gomock" "github.com/quic-go/qpack" diff --git a/integrationtests/gomodvendor/go.mod b/integrationtests/gomodvendor/go.mod index 2cb25c99f4b..c37e26d6a4b 100644 --- a/integrationtests/gomodvendor/go.mod +++ b/integrationtests/gomodvendor/go.mod @@ -3,6 +3,6 @@ module test go 1.16 // The version doesn't matter here, as we're replacing it with the currently checked out code anyway. -require github.com/apernet/quic-go v0.21.0 +require github.com/quic-go/quic-go v0.21.0 -replace github.com/apernet/quic-go => ../../ +replace github.com/quic-go/quic-go => ../../ diff --git a/integrationtests/gomodvendor/main.go b/integrationtests/gomodvendor/main.go index 053601d1d53..b19bd3fd784 100644 --- a/integrationtests/gomodvendor/main.go +++ b/integrationtests/gomodvendor/main.go @@ -1,6 +1,6 @@ package main -import "github.com/apernet/quic-go/http3" +import "github.com/quic-go/quic-go/http3" // The contents of this script don't matter. // We just need to make sure that quic-go is imported. diff --git a/integrationtests/self/benchmark_test.go b/integrationtests/self/benchmark_test.go index 7a539d29089..983d8b7dd89 100644 --- a/integrationtests/self/benchmark_test.go +++ b/integrationtests/self/benchmark_test.go @@ -6,7 +6,7 @@ import ( "net" "testing" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" ) func BenchmarkHandshake(b *testing.B) { diff --git a/integrationtests/self/cancelation_test.go b/integrationtests/self/cancelation_test.go index ac0722119b0..5f95c0b73cf 100644 --- a/integrationtests/self/cancelation_test.go +++ b/integrationtests/self/cancelation_test.go @@ -10,7 +10,7 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -172,7 +172,7 @@ var _ = Describe("Stream Cancellations", func() { It("allows concurrent Read and CancelRead calls", func() { // This test is especially valuable when run with race detector, - // see https://github.com/apernet/quic-go/issues/3239. + // see https://github.com/quic-go/quic-go/issues/3239. serverCanceledCounterChan := runServer(make([]byte, 100)) // make sure the FIN is sent with the STREAM frame conn, err := quic.DialAddr( diff --git a/integrationtests/self/close_test.go b/integrationtests/self/close_test.go index 2f5b2ce1819..d0bcf7f01a4 100644 --- a/integrationtests/self/close_test.go +++ b/integrationtests/self/close_test.go @@ -7,8 +7,8 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/conn_id_test.go b/integrationtests/self/conn_id_test.go index 7844b70c3ed..0d8c4b446bf 100644 --- a/integrationtests/self/conn_id_test.go +++ b/integrationtests/self/conn_id_test.go @@ -8,8 +8,8 @@ import ( mrand "math/rand" "net" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/datagram_test.go b/integrationtests/self/datagram_test.go index b5d691c2ba8..35d0718a978 100644 --- a/integrationtests/self/datagram_test.go +++ b/integrationtests/self/datagram_test.go @@ -10,9 +10,9 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/deadline_test.go b/integrationtests/self/deadline_test.go index c42346d40a7..b165aff0e90 100644 --- a/integrationtests/self/deadline_test.go +++ b/integrationtests/self/deadline_test.go @@ -7,7 +7,7 @@ import ( "net" "time" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/drop_test.go b/integrationtests/self/drop_test.go index 20a5845bd47..4eac657aa8a 100644 --- a/integrationtests/self/drop_test.go +++ b/integrationtests/self/drop_test.go @@ -8,8 +8,8 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/early_data_test.go b/integrationtests/self/early_data_test.go index 0ca5ab5423e..136c3d0b29b 100644 --- a/integrationtests/self/early_data_test.go +++ b/integrationtests/self/early_data_test.go @@ -7,8 +7,8 @@ import ( "net" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/handshake_drop_test.go b/integrationtests/self/handshake_drop_test.go index 957491e81a6..ae4837715e4 100644 --- a/integrationtests/self/handshake_drop_test.go +++ b/integrationtests/self/handshake_drop_test.go @@ -11,11 +11,11 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/quicvarint" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/handshake_rtt_test.go b/integrationtests/self/handshake_rtt_test.go index 057e898dd23..36ea7c787a8 100644 --- a/integrationtests/self/handshake_rtt_test.go +++ b/integrationtests/self/handshake_rtt_test.go @@ -8,8 +8,8 @@ import ( "net" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/handshake_test.go b/integrationtests/self/handshake_test.go index 10bf66910ae..9652cb0d369 100644 --- a/integrationtests/self/handshake_test.go +++ b/integrationtests/self/handshake_test.go @@ -9,10 +9,10 @@ import ( "net" "time" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/qtls" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/qtls" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/hotswap_test.go b/integrationtests/self/hotswap_test.go index 184685f4c55..ac75a49450e 100644 --- a/integrationtests/self/hotswap_test.go +++ b/integrationtests/self/hotswap_test.go @@ -9,8 +9,8 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/http3" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/http3" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/http_test.go b/integrationtests/self/http_test.go index 32d530f8f97..e41dc85e4a7 100644 --- a/integrationtests/self/http_test.go +++ b/integrationtests/self/http_test.go @@ -16,8 +16,8 @@ import ( "golang.org/x/sync/errgroup" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/http3" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/http3" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/key_update_test.go b/integrationtests/self/key_update_test.go index dc815d34b45..c24bef27d2e 100644 --- a/integrationtests/self/key_update_test.go +++ b/integrationtests/self/key_update_test.go @@ -6,10 +6,10 @@ import ( "io" "net" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/mitm_test.go b/integrationtests/self/mitm_test.go index 60f45cfce4f..a5f07f77a6d 100644 --- a/integrationtests/self/mitm_test.go +++ b/integrationtests/self/mitm_test.go @@ -12,11 +12,11 @@ import ( "golang.org/x/exp/rand" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/testutils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/testutils" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/multiplex_test.go b/integrationtests/self/multiplex_test.go index 4ebc7a96f76..9b00bc34358 100644 --- a/integrationtests/self/multiplex_test.go +++ b/integrationtests/self/multiplex_test.go @@ -7,7 +7,7 @@ import ( "runtime" "time" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/packetization_test.go b/integrationtests/self/packetization_test.go index 40531977c48..740956c5492 100644 --- a/integrationtests/self/packetization_test.go +++ b/integrationtests/self/packetization_test.go @@ -6,9 +6,9 @@ import ( "net" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/resumption_test.go b/integrationtests/self/resumption_test.go index dac28d6c323..264f832ebf5 100644 --- a/integrationtests/self/resumption_test.go +++ b/integrationtests/self/resumption_test.go @@ -7,7 +7,7 @@ import ( "net" "time" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/rtt_test.go b/integrationtests/self/rtt_test.go index 3ee5248c1f7..97d9b981243 100644 --- a/integrationtests/self/rtt_test.go +++ b/integrationtests/self/rtt_test.go @@ -7,8 +7,8 @@ import ( "net" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/self_suite_test.go b/integrationtests/self/self_suite_test.go index d21120326fa..4b7ee5ef328 100644 --- a/integrationtests/self/self_suite_test.go +++ b/integrationtests/self/self_suite_test.go @@ -16,12 +16,12 @@ import ( "testing" "time" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/integrationtests/tools" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/integrationtests/tools" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/stateless_reset_test.go b/integrationtests/self/stateless_reset_test.go index 8826b11a4b0..8db9477b31d 100644 --- a/integrationtests/self/stateless_reset_test.go +++ b/integrationtests/self/stateless_reset_test.go @@ -8,8 +8,8 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/stream_test.go b/integrationtests/self/stream_test.go index ee64bd3b7e4..332cd505e30 100644 --- a/integrationtests/self/stream_test.go +++ b/integrationtests/self/stream_test.go @@ -9,7 +9,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" ) var _ = Describe("Bidirectional streams", func() { diff --git a/integrationtests/self/timeout_test.go b/integrationtests/self/timeout_test.go index 48cc3da909d..c5ec46d4b4c 100644 --- a/integrationtests/self/timeout_test.go +++ b/integrationtests/self/timeout_test.go @@ -9,10 +9,10 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/tracer_test.go b/integrationtests/self/tracer_test.go index 9faab9c398d..3bfae3c6b8a 100644 --- a/integrationtests/self/tracer_test.go +++ b/integrationtests/self/tracer_test.go @@ -9,11 +9,11 @@ import ( mrand "math/rand" "net" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" - "github.com/apernet/quic-go/qlog" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" + "github.com/quic-go/quic-go/qlog" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/uni_stream_test.go b/integrationtests/self/uni_stream_test.go index 46a35c453e9..a2fe4e50163 100644 --- a/integrationtests/self/uni_stream_test.go +++ b/integrationtests/self/uni_stream_test.go @@ -7,8 +7,8 @@ import ( "net" "sync" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/zero_rtt_oldgo_test.go b/integrationtests/self/zero_rtt_oldgo_test.go index 0ed2e15ae72..beaf351e249 100644 --- a/integrationtests/self/zero_rtt_oldgo_test.go +++ b/integrationtests/self/zero_rtt_oldgo_test.go @@ -13,11 +13,11 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/self/zero_rtt_test.go b/integrationtests/self/zero_rtt_test.go index 14709c3c5b7..2de283aca12 100644 --- a/integrationtests/self/zero_rtt_test.go +++ b/integrationtests/self/zero_rtt_test.go @@ -13,11 +13,11 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/tools/proxy/proxy.go b/integrationtests/tools/proxy/proxy.go index 01206cbdc1a..4ed2d89de0e 100644 --- a/integrationtests/tools/proxy/proxy.go +++ b/integrationtests/tools/proxy/proxy.go @@ -6,8 +6,8 @@ import ( "sync" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) // Connection is a UDP connection diff --git a/integrationtests/tools/proxy/proxy_test.go b/integrationtests/tools/proxy/proxy_test.go index fb3a47eea97..81e13b23346 100644 --- a/integrationtests/tools/proxy/proxy_test.go +++ b/integrationtests/tools/proxy/proxy_test.go @@ -10,8 +10,8 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/tools/qlog.go b/integrationtests/tools/qlog.go index d84a0116e2c..352e0a613d3 100644 --- a/integrationtests/tools/qlog.go +++ b/integrationtests/tools/qlog.go @@ -8,10 +8,10 @@ import ( "log" "os" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" - "github.com/apernet/quic-go/qlog" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" + "github.com/quic-go/quic-go/qlog" ) func NewQlogger(logger io.Writer) func(context.Context, logging.Perspective, quic.ConnectionID) logging.ConnectionTracer { diff --git a/integrationtests/versionnegotiation/handshake_test.go b/integrationtests/versionnegotiation/handshake_test.go index c150b77cde2..965700c1560 100644 --- a/integrationtests/versionnegotiation/handshake_test.go +++ b/integrationtests/versionnegotiation/handshake_test.go @@ -6,10 +6,10 @@ import ( "fmt" "net" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/integrationtests/tools/israce" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/integrationtests/tools/israce" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/versionnegotiation/rtt_test.go b/integrationtests/versionnegotiation/rtt_test.go index 1e9ea1df171..ce9cba1bed0 100644 --- a/integrationtests/versionnegotiation/rtt_test.go +++ b/integrationtests/versionnegotiation/rtt_test.go @@ -4,9 +4,9 @@ import ( "context" "time" - "github.com/apernet/quic-go" - quicproxy "github.com/apernet/quic-go/integrationtests/tools/proxy" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go" + quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/versionnegotiation/versionnegotiation_suite_test.go b/integrationtests/versionnegotiation/versionnegotiation_suite_test.go index 12036330a54..a01ac1f8a58 100644 --- a/integrationtests/versionnegotiation/versionnegotiation_suite_test.go +++ b/integrationtests/versionnegotiation/versionnegotiation_suite_test.go @@ -7,10 +7,10 @@ import ( "flag" "testing" - "github.com/apernet/quic-go/integrationtests/tools" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/integrationtests/tools" + "github.com/quic-go/quic-go/logging" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/interface.go b/interface.go index 013340c841c..812f8f513a8 100644 --- a/interface.go +++ b/interface.go @@ -8,10 +8,10 @@ import ( "net" "time" - "github.com/apernet/quic-go/congestion" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/congestion" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/logging" ) // The StreamID is the ID of a QUIC stream. diff --git a/internal/ackhandler/ack_eliciting.go b/internal/ackhandler/ack_eliciting.go index 56a8155293a..34506b12e01 100644 --- a/internal/ackhandler/ack_eliciting.go +++ b/internal/ackhandler/ack_eliciting.go @@ -1,6 +1,6 @@ package ackhandler -import "github.com/apernet/quic-go/internal/wire" +import "github.com/quic-go/quic-go/internal/wire" // IsFrameAckEliciting returns true if the frame is ack-eliciting. func IsFrameAckEliciting(f wire.Frame) bool { diff --git a/internal/ackhandler/ack_eliciting_test.go b/internal/ackhandler/ack_eliciting_test.go index b243c6c5858..cdd1c7e9624 100644 --- a/internal/ackhandler/ack_eliciting_test.go +++ b/internal/ackhandler/ack_eliciting_test.go @@ -3,7 +3,7 @@ package ackhandler import ( "reflect" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/ackhandler.go b/internal/ackhandler/ackhandler.go index 8600ec04c15..2c7cc4fcf0b 100644 --- a/internal/ackhandler/ackhandler.go +++ b/internal/ackhandler/ackhandler.go @@ -1,9 +1,9 @@ package ackhandler import ( - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" ) // NewAckHandler creates a new SentPacketHandler and a new ReceivedPacketHandler. diff --git a/internal/ackhandler/cc_adapter.go b/internal/ackhandler/cc_adapter.go index 19f42b1a80d..b70e66ac9c8 100644 --- a/internal/ackhandler/cc_adapter.go +++ b/internal/ackhandler/cc_adapter.go @@ -3,8 +3,8 @@ package ackhandler import ( "time" - "github.com/apernet/quic-go/congestion" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/congestion" + "github.com/quic-go/quic-go/internal/protocol" ) type ccAdapter struct { diff --git a/internal/ackhandler/frame.go b/internal/ackhandler/frame.go index edab8dfe9c8..e03a8080ce1 100644 --- a/internal/ackhandler/frame.go +++ b/internal/ackhandler/frame.go @@ -1,7 +1,7 @@ package ackhandler import ( - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/wire" ) // FrameHandler handles the acknowledgement and the loss of a frame. diff --git a/internal/ackhandler/interfaces.go b/internal/ackhandler/interfaces.go index 523395be96f..155ad90a9bd 100644 --- a/internal/ackhandler/interfaces.go +++ b/internal/ackhandler/interfaces.go @@ -3,9 +3,9 @@ package ackhandler import ( "time" - "github.com/apernet/quic-go/congestion" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/congestion" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) // SentPacketHandler handles ACKs received for outgoing packets diff --git a/internal/ackhandler/mock_sent_packet_tracker_test.go b/internal/ackhandler/mock_sent_packet_tracker_test.go index ca541aa221f..83c28fd54a9 100644 --- a/internal/ackhandler/mock_sent_packet_tracker_test.go +++ b/internal/ackhandler/mock_sent_packet_tracker_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/internal/ackhandler (interfaces: SentPacketTracker) +// Source: github.com/quic-go/quic-go/internal/ackhandler (interfaces: SentPacketTracker) // Package ackhandler is a generated GoMock package. package ackhandler @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockSentPacketTracker is a mock of SentPacketTracker interface. diff --git a/internal/ackhandler/mockgen.go b/internal/ackhandler/mockgen.go index cda0d4816b0..d61783671bf 100644 --- a/internal/ackhandler/mockgen.go +++ b/internal/ackhandler/mockgen.go @@ -2,5 +2,5 @@ package ackhandler -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_sent_packet_tracker_test.go github.com/apernet/quic-go/internal/ackhandler SentPacketTracker" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_sent_packet_tracker_test.go github.com/quic-go/quic-go/internal/ackhandler SentPacketTracker" type SentPacketTracker = sentPacketTracker diff --git a/internal/ackhandler/packet.go b/internal/ackhandler/packet.go index e6d2b48f337..5f43689b596 100644 --- a/internal/ackhandler/packet.go +++ b/internal/ackhandler/packet.go @@ -4,7 +4,7 @@ import ( "sync" "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // A Packet is a packet diff --git a/internal/ackhandler/packet_number_generator.go b/internal/ackhandler/packet_number_generator.go index 6c11ed73fe2..e84171e3cd5 100644 --- a/internal/ackhandler/packet_number_generator.go +++ b/internal/ackhandler/packet_number_generator.go @@ -1,8 +1,8 @@ package ackhandler import ( - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) type packetNumberGenerator interface { diff --git a/internal/ackhandler/packet_number_generator_test.go b/internal/ackhandler/packet_number_generator_test.go index d532841b5f0..4384c8f8eee 100644 --- a/internal/ackhandler/packet_number_generator_test.go +++ b/internal/ackhandler/packet_number_generator_test.go @@ -4,7 +4,7 @@ import ( "fmt" "math" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/received_packet_handler.go b/internal/ackhandler/received_packet_handler.go index 0084bada6be..e11ee1eeb9e 100644 --- a/internal/ackhandler/received_packet_handler.go +++ b/internal/ackhandler/received_packet_handler.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" ) type receivedPacketHandler struct { diff --git a/internal/ackhandler/received_packet_handler_test.go b/internal/ackhandler/received_packet_handler_test.go index 283f6da45b3..b07d617869a 100644 --- a/internal/ackhandler/received_packet_handler_test.go +++ b/internal/ackhandler/received_packet_handler_test.go @@ -5,9 +5,9 @@ import ( "github.com/golang/mock/gomock" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/received_packet_history.go b/internal/ackhandler/received_packet_history.go index 7b48fb72472..3143bfe1204 100644 --- a/internal/ackhandler/received_packet_history.go +++ b/internal/ackhandler/received_packet_history.go @@ -3,9 +3,9 @@ package ackhandler import ( "sync" - "github.com/apernet/quic-go/internal/protocol" - list "github.com/apernet/quic-go/internal/utils/linkedlist" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + list "github.com/quic-go/quic-go/internal/utils/linkedlist" + "github.com/quic-go/quic-go/internal/wire" ) // interval is an interval from one PacketNumber to the other diff --git a/internal/ackhandler/received_packet_history_test.go b/internal/ackhandler/received_packet_history_test.go index b1992d98a3e..af6385be36f 100644 --- a/internal/ackhandler/received_packet_history_test.go +++ b/internal/ackhandler/received_packet_history_test.go @@ -5,8 +5,8 @@ import ( "math/rand" "sort" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/received_packet_tracker.go b/internal/ackhandler/received_packet_tracker.go index a27d5048935..b188386631d 100644 --- a/internal/ackhandler/received_packet_tracker.go +++ b/internal/ackhandler/received_packet_tracker.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" ) // number of ack-eliciting packets received before sending an ack. diff --git a/internal/ackhandler/received_packet_tracker_test.go b/internal/ackhandler/received_packet_tracker_test.go index 771ae06df69..4818bd090ad 100644 --- a/internal/ackhandler/received_packet_tracker_test.go +++ b/internal/ackhandler/received_packet_tracker_test.go @@ -3,9 +3,9 @@ package ackhandler import ( "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/sent_packet_handler.go b/internal/ackhandler/sent_packet_handler.go index 98d760d79b7..c17e4a36250 100644 --- a/internal/ackhandler/sent_packet_handler.go +++ b/internal/ackhandler/sent_packet_handler.go @@ -6,13 +6,13 @@ import ( "sync" "time" - congestionExt "github.com/apernet/quic-go/congestion" - "github.com/apernet/quic-go/internal/congestion" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + congestionExt "github.com/quic-go/quic-go/congestion" + "github.com/quic-go/quic-go/internal/congestion" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" ) const ( diff --git a/internal/ackhandler/sent_packet_handler_test.go b/internal/ackhandler/sent_packet_handler_test.go index de01ef68011..6c603c87a4d 100644 --- a/internal/ackhandler/sent_packet_handler_test.go +++ b/internal/ackhandler/sent_packet_handler_test.go @@ -6,11 +6,11 @@ import ( "github.com/golang/mock/gomock" - "github.com/apernet/quic-go/internal/mocks" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/mocks" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/ackhandler/sent_packet_history.go b/internal/ackhandler/sent_packet_history.go index 889274fcfba..c14c0f49bae 100644 --- a/internal/ackhandler/sent_packet_history.go +++ b/internal/ackhandler/sent_packet_history.go @@ -3,7 +3,7 @@ package ackhandler import ( "fmt" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) type sentPacketHistory struct { diff --git a/internal/ackhandler/sent_packet_history_test.go b/internal/ackhandler/sent_packet_history_test.go index c309f5d52b8..0f05b63e1d2 100644 --- a/internal/ackhandler/sent_packet_history_test.go +++ b/internal/ackhandler/sent_packet_history_test.go @@ -4,7 +4,7 @@ import ( "errors" "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/congestion/bandwidth.go b/internal/congestion/bandwidth.go index 362c8ed1d80..1d03abbb8ad 100644 --- a/internal/congestion/bandwidth.go +++ b/internal/congestion/bandwidth.go @@ -4,7 +4,7 @@ import ( "math" "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // Bandwidth of a connection diff --git a/internal/congestion/cubic.go b/internal/congestion/cubic.go index 8aee5b8b8f4..a73cf82aa5e 100644 --- a/internal/congestion/cubic.go +++ b/internal/congestion/cubic.go @@ -4,8 +4,8 @@ import ( "math" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) // This cubic implementation is based on the one found in Chromiums's QUIC diff --git a/internal/congestion/cubic_sender.go b/internal/congestion/cubic_sender.go index 624c9e93ece..2e5084751a9 100644 --- a/internal/congestion/cubic_sender.go +++ b/internal/congestion/cubic_sender.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" ) const ( diff --git a/internal/congestion/cubic_sender_test.go b/internal/congestion/cubic_sender_test.go index 8fbf7256c3a..85d81167879 100644 --- a/internal/congestion/cubic_sender_test.go +++ b/internal/congestion/cubic_sender_test.go @@ -3,8 +3,8 @@ package congestion import ( "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/congestion/cubic_test.go b/internal/congestion/cubic_test.go index 3b03796771a..c1ad621d7f5 100644 --- a/internal/congestion/cubic_test.go +++ b/internal/congestion/cubic_test.go @@ -4,7 +4,7 @@ import ( "math" "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/congestion/hybrid_slow_start.go b/internal/congestion/hybrid_slow_start.go index 680b7977afb..b2f7c908ed1 100644 --- a/internal/congestion/hybrid_slow_start.go +++ b/internal/congestion/hybrid_slow_start.go @@ -3,8 +3,8 @@ package congestion import ( "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) // Note(pwestin): the magic clamping numbers come from the original code in diff --git a/internal/congestion/hybrid_slow_start_test.go b/internal/congestion/hybrid_slow_start_test.go index 2a016428763..5d9517998d7 100644 --- a/internal/congestion/hybrid_slow_start_test.go +++ b/internal/congestion/hybrid_slow_start_test.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/congestion/interface.go b/internal/congestion/interface.go index 323eae4b8fc..484bd5f8135 100644 --- a/internal/congestion/interface.go +++ b/internal/congestion/interface.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // A SendAlgorithm performs congestion control diff --git a/internal/congestion/pacer.go b/internal/congestion/pacer.go index 492ed60cf28..09ea268066d 100644 --- a/internal/congestion/pacer.go +++ b/internal/congestion/pacer.go @@ -4,8 +4,8 @@ import ( "math" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) const maxBurstSizePackets = 10 diff --git a/internal/congestion/pacer_test.go b/internal/congestion/pacer_test.go index cac1c6d512d..69f58fcc251 100644 --- a/internal/congestion/pacer_test.go +++ b/internal/congestion/pacer_test.go @@ -4,7 +4,7 @@ import ( "math/rand" "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/flowcontrol/base_flow_controller.go b/internal/flowcontrol/base_flow_controller.go index 49a56587287..f3f24a60edd 100644 --- a/internal/flowcontrol/base_flow_controller.go +++ b/internal/flowcontrol/base_flow_controller.go @@ -4,8 +4,8 @@ import ( "sync" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) type baseFlowController struct { diff --git a/internal/flowcontrol/base_flow_controller_test.go b/internal/flowcontrol/base_flow_controller_test.go index c65822b0f11..6c26e7f83de 100644 --- a/internal/flowcontrol/base_flow_controller_test.go +++ b/internal/flowcontrol/base_flow_controller_test.go @@ -5,8 +5,8 @@ import ( "strconv" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/flowcontrol/connection_flow_controller.go b/internal/flowcontrol/connection_flow_controller.go index 1f55796d83a..13e69d6c437 100644 --- a/internal/flowcontrol/connection_flow_controller.go +++ b/internal/flowcontrol/connection_flow_controller.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" ) type connectionFlowController struct { diff --git a/internal/flowcontrol/connection_flow_controller_test.go b/internal/flowcontrol/connection_flow_controller_test.go index cf9642cdb4f..8be70eef648 100644 --- a/internal/flowcontrol/connection_flow_controller_test.go +++ b/internal/flowcontrol/connection_flow_controller_test.go @@ -3,8 +3,8 @@ package flowcontrol import ( "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/flowcontrol/interface.go b/internal/flowcontrol/interface.go index db3c6e450d7..946519d520b 100644 --- a/internal/flowcontrol/interface.go +++ b/internal/flowcontrol/interface.go @@ -1,6 +1,6 @@ package flowcontrol -import "github.com/apernet/quic-go/internal/protocol" +import "github.com/quic-go/quic-go/internal/protocol" type flowController interface { // for sending diff --git a/internal/flowcontrol/stream_flow_controller.go b/internal/flowcontrol/stream_flow_controller.go index cef0d90c1ae..1770a9c8487 100644 --- a/internal/flowcontrol/stream_flow_controller.go +++ b/internal/flowcontrol/stream_flow_controller.go @@ -3,9 +3,9 @@ package flowcontrol import ( "fmt" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" ) type streamFlowController struct { diff --git a/internal/flowcontrol/stream_flow_controller_test.go b/internal/flowcontrol/stream_flow_controller_test.go index 6751d3e18b7..c8c3835c823 100644 --- a/internal/flowcontrol/stream_flow_controller_test.go +++ b/internal/flowcontrol/stream_flow_controller_test.go @@ -3,9 +3,9 @@ package flowcontrol import ( "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/aead.go b/internal/handshake/aead.go index e868f3a3157..6aa89fb3f3e 100644 --- a/internal/handshake/aead.go +++ b/internal/handshake/aead.go @@ -4,8 +4,8 @@ import ( "crypto/cipher" "encoding/binary" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) func createAEAD(suite *cipherSuite, trafficSecret []byte, v protocol.VersionNumber) cipher.AEAD { diff --git a/internal/handshake/aead_test.go b/internal/handshake/aead_test.go index c33dcd2ff21..85fe28d82f2 100644 --- a/internal/handshake/aead_test.go +++ b/internal/handshake/aead_test.go @@ -8,7 +8,7 @@ import ( "crypto/tls" "fmt" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/crypto_setup.go b/internal/handshake/crypto_setup.go index 4d0280a6233..b528f08ebf3 100644 --- a/internal/handshake/crypto_setup.go +++ b/internal/handshake/crypto_setup.go @@ -11,13 +11,13 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/qtls" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/qtls" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" + "github.com/quic-go/quic-go/quicvarint" ) type quicVersionContextKey struct{} diff --git a/internal/handshake/crypto_setup_test.go b/internal/handshake/crypto_setup_test.go index dabc4dc53da..4b210d20747 100644 --- a/internal/handshake/crypto_setup_test.go +++ b/internal/handshake/crypto_setup_test.go @@ -10,12 +10,12 @@ import ( "net" "time" - mocktls "github.com/apernet/quic-go/internal/mocks/tls" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/testdata" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + mocktls "github.com/quic-go/quic-go/internal/mocks/tls" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/testdata" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" "github.com/golang/mock/gomock" diff --git a/internal/handshake/header_protector.go b/internal/handshake/header_protector.go index 1edbca97da5..fb6092e040a 100644 --- a/internal/handshake/header_protector.go +++ b/internal/handshake/header_protector.go @@ -9,7 +9,7 @@ import ( "golang.org/x/crypto/chacha20" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) type headerProtector interface { diff --git a/internal/handshake/initial_aead.go b/internal/handshake/initial_aead.go index 13d2974189f..b0377c39a81 100644 --- a/internal/handshake/initial_aead.go +++ b/internal/handshake/initial_aead.go @@ -6,7 +6,7 @@ import ( "golang.org/x/crypto/hkdf" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) var ( diff --git a/internal/handshake/initial_aead_test.go b/internal/handshake/initial_aead_test.go index 8e1b01588db..6cd840de470 100644 --- a/internal/handshake/initial_aead_test.go +++ b/internal/handshake/initial_aead_test.go @@ -4,7 +4,7 @@ import ( "crypto/rand" "fmt" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/interface.go b/internal/handshake/interface.go index e441679362d..fab224f9bdb 100644 --- a/internal/handshake/interface.go +++ b/internal/handshake/interface.go @@ -6,8 +6,8 @@ import ( "io" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) var ( diff --git a/internal/handshake/retry.go b/internal/handshake/retry.go index 3cc1074c4af..68fa53ed134 100644 --- a/internal/handshake/retry.go +++ b/internal/handshake/retry.go @@ -7,7 +7,7 @@ import ( "fmt" "sync" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) var ( diff --git a/internal/handshake/retry_test.go b/internal/handshake/retry_test.go index 9db95366aef..560e7af5b43 100644 --- a/internal/handshake/retry_test.go +++ b/internal/handshake/retry_test.go @@ -3,7 +3,7 @@ package handshake import ( "encoding/binary" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/session_ticket.go b/internal/handshake/session_ticket.go index a091b3b5aca..d3efeb2941c 100644 --- a/internal/handshake/session_ticket.go +++ b/internal/handshake/session_ticket.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/quicvarint" ) const sessionTicketRevision = 3 diff --git a/internal/handshake/session_ticket_test.go b/internal/handshake/session_ticket_test.go index f13612305cc..67e33b2252f 100644 --- a/internal/handshake/session_ticket_test.go +++ b/internal/handshake/session_ticket_test.go @@ -3,8 +3,8 @@ package handshake import ( "time" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/token_generator.go b/internal/handshake/token_generator.go index a3187fdccb2..e5e90bb3ba8 100644 --- a/internal/handshake/token_generator.go +++ b/internal/handshake/token_generator.go @@ -8,7 +8,7 @@ import ( "net" "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) const ( diff --git a/internal/handshake/token_generator_test.go b/internal/handshake/token_generator_test.go index 5cc5bdef241..870ba3edcc6 100644 --- a/internal/handshake/token_generator_test.go +++ b/internal/handshake/token_generator_test.go @@ -6,7 +6,7 @@ import ( "net" "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/handshake/updatable_aead.go b/internal/handshake/updatable_aead.go index 3209a8fb685..919b8a5bcf0 100644 --- a/internal/handshake/updatable_aead.go +++ b/internal/handshake/updatable_aead.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" ) // KeyUpdateInterval is the maximum number of packets we send or receive before initiating a key update. diff --git a/internal/handshake/updatable_aead_test.go b/internal/handshake/updatable_aead_test.go index bc0d6790b58..db3cf56e1bf 100644 --- a/internal/handshake/updatable_aead_test.go +++ b/internal/handshake/updatable_aead_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - mocklogging "github.com/apernet/quic-go/internal/mocks/logging" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" + mocklogging "github.com/quic-go/quic-go/internal/mocks/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/internal/logutils/frame.go b/internal/logutils/frame.go index 665585456ba..a6032fc20d7 100644 --- a/internal/logutils/frame.go +++ b/internal/logutils/frame.go @@ -1,9 +1,9 @@ package logutils import ( - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" ) // ConvertFrame converts a wire.Frame into a logging.Frame. diff --git a/internal/logutils/frame_test.go b/internal/logutils/frame_test.go index 9425b31675f..6db71561d30 100644 --- a/internal/logutils/frame_test.go +++ b/internal/logutils/frame_test.go @@ -1,8 +1,8 @@ package logutils import ( - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/mocks/ackhandler/received_packet_handler.go b/internal/mocks/ackhandler/received_packet_handler.go index 621ed4922d8..c73727e0f44 100644 --- a/internal/mocks/ackhandler/received_packet_handler.go +++ b/internal/mocks/ackhandler/received_packet_handler.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/internal/ackhandler (interfaces: ReceivedPacketHandler) +// Source: github.com/quic-go/quic-go/internal/ackhandler (interfaces: ReceivedPacketHandler) // Package mockackhandler is a generated GoMock package. package mockackhandler @@ -9,8 +9,8 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - wire "github.com/apernet/quic-go/internal/wire" + protocol "github.com/quic-go/quic-go/internal/protocol" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockReceivedPacketHandler is a mock of ReceivedPacketHandler interface. diff --git a/internal/mocks/ackhandler/sent_packet_handler.go b/internal/mocks/ackhandler/sent_packet_handler.go index c71bb388ffe..75b0ca68570 100644 --- a/internal/mocks/ackhandler/sent_packet_handler.go +++ b/internal/mocks/ackhandler/sent_packet_handler.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/internal/ackhandler (interfaces: SentPacketHandler) +// Source: github.com/quic-go/quic-go/internal/ackhandler (interfaces: SentPacketHandler) // Package mockackhandler is a generated GoMock package. package mockackhandler @@ -9,10 +9,10 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - congestion "github.com/apernet/quic-go/congestion" - ackhandler "github.com/apernet/quic-go/internal/ackhandler" - protocol "github.com/apernet/quic-go/internal/protocol" - wire "github.com/apernet/quic-go/internal/wire" + congestion "github.com/quic-go/quic-go/congestion" + ackhandler "github.com/quic-go/quic-go/internal/ackhandler" + protocol "github.com/quic-go/quic-go/internal/protocol" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockSentPacketHandler is a mock of SentPacketHandler interface. diff --git a/internal/mocks/congestion.go b/internal/mocks/congestion.go index 88b0cd2cbe6..6a5e46adddf 100644 --- a/internal/mocks/congestion.go +++ b/internal/mocks/congestion.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/internal/congestion (interfaces: SendAlgorithmWithDebugInfos) +// Source: github.com/quic-go/quic-go/internal/congestion (interfaces: SendAlgorithmWithDebugInfos) // Package mocks is a generated GoMock package. package mocks @@ -9,7 +9,7 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockSendAlgorithmWithDebugInfos is a mock of SendAlgorithmWithDebugInfos interface. diff --git a/internal/mocks/connection_flow_controller.go b/internal/mocks/connection_flow_controller.go index fa1a254e3ad..a0c252f3e3d 100644 --- a/internal/mocks/connection_flow_controller.go +++ b/internal/mocks/connection_flow_controller.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/internal/flowcontrol (interfaces: ConnectionFlowController) +// Source: github.com/quic-go/quic-go/internal/flowcontrol (interfaces: ConnectionFlowController) // Package mocks is a generated GoMock package. package mocks @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockConnectionFlowController is a mock of ConnectionFlowController interface. diff --git a/internal/mocks/crypto_setup.go b/internal/mocks/crypto_setup.go index 1e20ec468a2..1c707b9cb0b 100644 --- a/internal/mocks/crypto_setup.go +++ b/internal/mocks/crypto_setup.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/internal/handshake (interfaces: CryptoSetup) +// Source: github.com/quic-go/quic-go/internal/handshake (interfaces: CryptoSetup) // Package mocks is a generated GoMock package. package mocks @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - handshake "github.com/apernet/quic-go/internal/handshake" - protocol "github.com/apernet/quic-go/internal/protocol" + handshake "github.com/quic-go/quic-go/internal/handshake" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockCryptoSetup is a mock of CryptoSetup interface. diff --git a/internal/mocks/logging/connection_tracer.go b/internal/mocks/logging/connection_tracer.go index cdc9c1cf749..2a7d2f13708 100644 --- a/internal/mocks/logging/connection_tracer.go +++ b/internal/mocks/logging/connection_tracer.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/logging (interfaces: ConnectionTracer) +// Source: github.com/quic-go/quic-go/logging (interfaces: ConnectionTracer) // Package mocklogging is a generated GoMock package. package mocklogging @@ -10,10 +10,10 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - utils "github.com/apernet/quic-go/internal/utils" - wire "github.com/apernet/quic-go/internal/wire" - logging "github.com/apernet/quic-go/logging" + protocol "github.com/quic-go/quic-go/internal/protocol" + utils "github.com/quic-go/quic-go/internal/utils" + wire "github.com/quic-go/quic-go/internal/wire" + logging "github.com/quic-go/quic-go/logging" ) // MockConnectionTracer is a mock of ConnectionTracer interface. diff --git a/internal/mocks/logging/tracer.go b/internal/mocks/logging/tracer.go index 5d3a84b70f2..56741ef2925 100644 --- a/internal/mocks/logging/tracer.go +++ b/internal/mocks/logging/tracer.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/logging (interfaces: Tracer) +// Source: github.com/quic-go/quic-go/logging (interfaces: Tracer) // Package mocklogging is a generated GoMock package. package mocklogging @@ -9,9 +9,9 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - wire "github.com/apernet/quic-go/internal/wire" - logging "github.com/apernet/quic-go/logging" + protocol "github.com/quic-go/quic-go/internal/protocol" + wire "github.com/quic-go/quic-go/internal/wire" + logging "github.com/quic-go/quic-go/logging" ) // MockTracer is a mock of Tracer interface. diff --git a/internal/mocks/long_header_opener.go b/internal/mocks/long_header_opener.go index d38c2e0be05..cb4970d1e0b 100644 --- a/internal/mocks/long_header_opener.go +++ b/internal/mocks/long_header_opener.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/internal/handshake (interfaces: LongHeaderOpener) +// Source: github.com/quic-go/quic-go/internal/handshake (interfaces: LongHeaderOpener) // Package mocks is a generated GoMock package. package mocks @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockLongHeaderOpener is a mock of LongHeaderOpener interface. diff --git a/internal/mocks/mockgen.go b/internal/mocks/mockgen.go index e333feef8a0..8717fce09e2 100644 --- a/internal/mocks/mockgen.go +++ b/internal/mocks/mockgen.go @@ -1,18 +1,18 @@ package mocks -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockquic -destination quic/stream.go github.com/apernet/quic-go Stream" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockquic -destination quic/early_conn_tmp.go github.com/apernet/quic-go EarlyConnection && sed 's/qtls.ConnectionState/quic.ConnectionState/g' quic/early_conn_tmp.go > quic/early_conn.go && rm quic/early_conn_tmp.go && go run golang.org/x/tools/cmd/goimports -w quic/early_conn.go" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocklogging -destination logging/tracer.go github.com/apernet/quic-go/logging Tracer" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocklogging -destination logging/connection_tracer.go github.com/apernet/quic-go/logging ConnectionTracer" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination short_header_sealer.go github.com/apernet/quic-go/internal/handshake ShortHeaderSealer" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination short_header_opener.go github.com/apernet/quic-go/internal/handshake ShortHeaderOpener" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination long_header_opener.go github.com/apernet/quic-go/internal/handshake LongHeaderOpener" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination crypto_setup_tmp.go github.com/apernet/quic-go/internal/handshake CryptoSetup && sed -E 's~github.com/quic-go/qtls[[:alnum:]_-]*~github.com/apernet/quic-go/internal/qtls~g; s~qtls.ConnectionStateWith0RTT~qtls.ConnectionState~g' crypto_setup_tmp.go > crypto_setup.go && rm crypto_setup_tmp.go && go run golang.org/x/tools/cmd/goimports -w crypto_setup.go" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination stream_flow_controller.go github.com/apernet/quic-go/internal/flowcontrol StreamFlowController" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination congestion.go github.com/apernet/quic-go/internal/congestion SendAlgorithmWithDebugInfos" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination connection_flow_controller.go github.com/apernet/quic-go/internal/flowcontrol ConnectionFlowController" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockackhandler -destination ackhandler/sent_packet_handler.go github.com/apernet/quic-go/internal/ackhandler SentPacketHandler" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockackhandler -destination ackhandler/received_packet_handler.go github.com/apernet/quic-go/internal/ackhandler ReceivedPacketHandler" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockquic -destination quic/stream.go github.com/quic-go/quic-go Stream" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockquic -destination quic/early_conn_tmp.go github.com/quic-go/quic-go EarlyConnection && sed 's/qtls.ConnectionState/quic.ConnectionState/g' quic/early_conn_tmp.go > quic/early_conn.go && rm quic/early_conn_tmp.go && go run golang.org/x/tools/cmd/goimports -w quic/early_conn.go" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocklogging -destination logging/tracer.go github.com/quic-go/quic-go/logging Tracer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocklogging -destination logging/connection_tracer.go github.com/quic-go/quic-go/logging ConnectionTracer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination short_header_sealer.go github.com/quic-go/quic-go/internal/handshake ShortHeaderSealer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination short_header_opener.go github.com/quic-go/quic-go/internal/handshake ShortHeaderOpener" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination long_header_opener.go github.com/quic-go/quic-go/internal/handshake LongHeaderOpener" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination crypto_setup_tmp.go github.com/quic-go/quic-go/internal/handshake CryptoSetup && sed -E 's~github.com/quic-go/qtls[[:alnum:]_-]*~github.com/quic-go/quic-go/internal/qtls~g; s~qtls.ConnectionStateWith0RTT~qtls.ConnectionState~g' crypto_setup_tmp.go > crypto_setup.go && rm crypto_setup_tmp.go && go run golang.org/x/tools/cmd/goimports -w crypto_setup.go" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination stream_flow_controller.go github.com/quic-go/quic-go/internal/flowcontrol StreamFlowController" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination congestion.go github.com/quic-go/quic-go/internal/congestion SendAlgorithmWithDebugInfos" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mocks -destination connection_flow_controller.go github.com/quic-go/quic-go/internal/flowcontrol ConnectionFlowController" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockackhandler -destination ackhandler/sent_packet_handler.go github.com/quic-go/quic-go/internal/ackhandler SentPacketHandler" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package mockackhandler -destination ackhandler/received_packet_handler.go github.com/quic-go/quic-go/internal/ackhandler ReceivedPacketHandler" // The following command produces a warning message on OSX, however, it still generates the correct mock file. // See https://github.com/golang/mock/issues/339 for details. diff --git a/internal/mocks/quic/early_conn.go b/internal/mocks/quic/early_conn.go index 1e863be8bc7..eec0ead5eeb 100644 --- a/internal/mocks/quic/early_conn.go +++ b/internal/mocks/quic/early_conn.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: EarlyConnection) +// Source: github.com/quic-go/quic-go (interfaces: EarlyConnection) // Package mockquic is a generated GoMock package. package mockquic @@ -10,9 +10,9 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - quic "github.com/apernet/quic-go" - congestion "github.com/apernet/quic-go/congestion" - qerr "github.com/apernet/quic-go/internal/qerr" + quic "github.com/quic-go/quic-go" + congestion "github.com/quic-go/quic-go/congestion" + qerr "github.com/quic-go/quic-go/internal/qerr" ) // MockEarlyConnection is a mock of EarlyConnection interface. diff --git a/internal/mocks/quic/stream.go b/internal/mocks/quic/stream.go index 5405ef810d6..1221ac3b7be 100644 --- a/internal/mocks/quic/stream.go +++ b/internal/mocks/quic/stream.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: Stream) +// Source: github.com/quic-go/quic-go (interfaces: Stream) // Package mockquic is a generated GoMock package. package mockquic @@ -10,8 +10,8 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - qerr "github.com/apernet/quic-go/internal/qerr" + protocol "github.com/quic-go/quic-go/internal/protocol" + qerr "github.com/quic-go/quic-go/internal/qerr" ) // MockStream is a mock of Stream interface. diff --git a/internal/mocks/short_header_opener.go b/internal/mocks/short_header_opener.go index 1221d6277f8..47e858cb256 100644 --- a/internal/mocks/short_header_opener.go +++ b/internal/mocks/short_header_opener.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/internal/handshake (interfaces: ShortHeaderOpener) +// Source: github.com/quic-go/quic-go/internal/handshake (interfaces: ShortHeaderOpener) // Package mocks is a generated GoMock package. package mocks @@ -9,7 +9,7 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockShortHeaderOpener is a mock of ShortHeaderOpener interface. diff --git a/internal/mocks/short_header_sealer.go b/internal/mocks/short_header_sealer.go index e2ff4a70d6b..666fd8fb1a2 100644 --- a/internal/mocks/short_header_sealer.go +++ b/internal/mocks/short_header_sealer.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/internal/handshake (interfaces: ShortHeaderSealer) +// Source: github.com/quic-go/quic-go/internal/handshake (interfaces: ShortHeaderSealer) // Package mocks is a generated GoMock package. package mocks @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockShortHeaderSealer is a mock of ShortHeaderSealer interface. diff --git a/internal/mocks/stream_flow_controller.go b/internal/mocks/stream_flow_controller.go index a04df5acbdb..9d730eba150 100644 --- a/internal/mocks/stream_flow_controller.go +++ b/internal/mocks/stream_flow_controller.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/internal/flowcontrol (interfaces: StreamFlowController) +// Source: github.com/quic-go/quic-go/internal/flowcontrol (interfaces: StreamFlowController) // Package mocks is a generated GoMock package. package mocks @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockStreamFlowController is a mock of StreamFlowController interface. diff --git a/internal/qerr/error_codes.go b/internal/qerr/error_codes.go index 011fe8fefe3..a037acd22e6 100644 --- a/internal/qerr/error_codes.go +++ b/internal/qerr/error_codes.go @@ -3,7 +3,7 @@ package qerr import ( "fmt" - "github.com/apernet/quic-go/internal/qtls" + "github.com/quic-go/quic-go/internal/qtls" ) // TransportErrorCode is a QUIC transport error. diff --git a/internal/qerr/errors.go b/internal/qerr/errors.go index 34e6b38c26f..26ea344521b 100644 --- a/internal/qerr/errors.go +++ b/internal/qerr/errors.go @@ -4,7 +4,7 @@ import ( "fmt" "net" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) var ( diff --git a/internal/qerr/errors_test.go b/internal/qerr/errors_test.go index c972f0a4a01..52d5c9e9fbc 100644 --- a/internal/qerr/errors_test.go +++ b/internal/qerr/errors_test.go @@ -4,7 +4,7 @@ import ( "errors" "net" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/qtls/cipher_suite_test.go b/internal/qtls/cipher_suite_test.go index 59da59bb2c1..57de9ad899f 100644 --- a/internal/qtls/cipher_suite_test.go +++ b/internal/qtls/cipher_suite_test.go @@ -7,7 +7,7 @@ import ( "fmt" "net" - "github.com/apernet/quic-go/internal/testdata" + "github.com/quic-go/quic-go/internal/testdata" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/qtls/client_session_cache_test.go b/internal/qtls/client_session_cache_test.go index 7f5562387e2..a299551a29d 100644 --- a/internal/qtls/client_session_cache_test.go +++ b/internal/qtls/client_session_cache_test.go @@ -7,7 +7,7 @@ import ( "fmt" "net" - "github.com/apernet/quic-go/internal/testdata" + "github.com/quic-go/quic-go/internal/testdata" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/qtls/go120.go b/internal/qtls/go120.go index 7906e585a02..595e6e663ba 100644 --- a/internal/qtls/go120.go +++ b/internal/qtls/go120.go @@ -7,7 +7,7 @@ import ( "fmt" "unsafe" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" "github.com/quic-go/qtls-go1-20" ) diff --git a/internal/qtls/go120_test.go b/internal/qtls/go120_test.go index ddea011ccec..cbd1ab43622 100644 --- a/internal/qtls/go120_test.go +++ b/internal/qtls/go120_test.go @@ -3,7 +3,7 @@ package qtls import ( - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" "github.com/quic-go/qtls-go1-20" diff --git a/internal/qtls/go121.go b/internal/qtls/go121.go index 7991acb1bf0..1137556e6a4 100644 --- a/internal/qtls/go121.go +++ b/internal/qtls/go121.go @@ -7,7 +7,7 @@ import ( "crypto/tls" "fmt" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) type ( diff --git a/internal/qtls/go121_test.go b/internal/qtls/go121_test.go index 77d1a0263e1..2aaafcee647 100644 --- a/internal/qtls/go121_test.go +++ b/internal/qtls/go121_test.go @@ -5,7 +5,7 @@ package qtls import ( "crypto/tls" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/qtls/go_oldversion.go b/internal/qtls/go_oldversion.go index ce8c5a4e6af..0fca80a3881 100644 --- a/internal/qtls/go_oldversion.go +++ b/internal/qtls/go_oldversion.go @@ -2,4 +2,4 @@ package qtls -var _ int = "The version of quic-go you're using can't be built using outdated Go versions. For more details, please see https://github.com/apernet/quic-go/wiki/quic-go-and-Go-versions." +var _ int = "The version of quic-go you're using can't be built using outdated Go versions. For more details, please see https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions." diff --git a/internal/testutils/testutils.go b/internal/testutils/testutils.go index bc32b9dc3aa..ab322093dac 100644 --- a/internal/testutils/testutils.go +++ b/internal/testutils/testutils.go @@ -3,9 +3,9 @@ package testutils import ( "fmt" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) // Utilities for simulating packet injection and man-in-the-middle (MITM) attacker tests. diff --git a/internal/utils/log.go b/internal/utils/log.go index de9dd64e72f..89b52c0d9a7 100644 --- a/internal/utils/log.go +++ b/internal/utils/log.go @@ -125,7 +125,7 @@ func readLoggingEnv() LogLevel { case "error": return LogLevelError default: - fmt.Fprintln(os.Stderr, "invalid quic-go log level, see https://github.com/apernet/quic-go/wiki/Logging") + fmt.Fprintln(os.Stderr, "invalid quic-go log level, see https://github.com/quic-go/quic-go/wiki/Logging") return LogLevelNothing } } diff --git a/internal/utils/ringbuffer/ringbuffer.go b/internal/utils/ringbuffer/ringbuffer.go index 555e9e8e669..81a5ad44b8a 100644 --- a/internal/utils/ringbuffer/ringbuffer.go +++ b/internal/utils/ringbuffer/ringbuffer.go @@ -50,7 +50,7 @@ func (r *RingBuffer[T]) PushBack(t T) { // callers might need to check if there are elements in the buffer first. func (r *RingBuffer[T]) PopFront() T { if r.Empty() { - panic("github.com/apernet/quic-go/internal/utils/ringbuffer: pop from an empty queue") + panic("github.com/quic-go/quic-go/internal/utils/ringbuffer: pop from an empty queue") } r.full = false t := r.ring[r.headPos] diff --git a/internal/utils/rtt_stats.go b/internal/utils/rtt_stats.go index 9764bf8d388..2cd9a1919b1 100644 --- a/internal/utils/rtt_stats.go +++ b/internal/utils/rtt_stats.go @@ -3,7 +3,7 @@ package utils import ( "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) const ( diff --git a/internal/utils/rtt_stats_test.go b/internal/utils/rtt_stats_test.go index 1ac30492420..eae31926b5b 100644 --- a/internal/utils/rtt_stats_test.go +++ b/internal/utils/rtt_stats_test.go @@ -3,7 +3,7 @@ package utils import ( "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/utils/streamframe_interval.go b/internal/utils/streamframe_interval.go index e63ea2fa4ce..78c411242b1 100644 --- a/internal/utils/streamframe_interval.go +++ b/internal/utils/streamframe_interval.go @@ -3,7 +3,7 @@ package utils import ( "fmt" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // ByteInterval is an interval from one ByteCount to the other diff --git a/internal/wire/ack_frame.go b/internal/wire/ack_frame.go index 082f8ee3a41..9b23cc25f9c 100644 --- a/internal/wire/ack_frame.go +++ b/internal/wire/ack_frame.go @@ -6,9 +6,9 @@ import ( "sort" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/quicvarint" ) var errInvalidAckRanges = errors.New("AckFrame: ACK frame contains invalid ACK ranges") diff --git a/internal/wire/ack_frame_test.go b/internal/wire/ack_frame_test.go index 0d13598353c..c94c157d6dd 100644 --- a/internal/wire/ack_frame_test.go +++ b/internal/wire/ack_frame_test.go @@ -6,8 +6,8 @@ import ( "math" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/ack_range.go b/internal/wire/ack_range.go index 9c4f38be753..03a1235ee0d 100644 --- a/internal/wire/ack_range.go +++ b/internal/wire/ack_range.go @@ -1,6 +1,6 @@ package wire -import "github.com/apernet/quic-go/internal/protocol" +import "github.com/quic-go/quic-go/internal/protocol" // AckRange is an ACK range type AckRange struct { diff --git a/internal/wire/connection_close_frame.go b/internal/wire/connection_close_frame.go index 00243f80cfa..f56c2c0d845 100644 --- a/internal/wire/connection_close_frame.go +++ b/internal/wire/connection_close_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A ConnectionCloseFrame is a CONNECTION_CLOSE frame diff --git a/internal/wire/connection_close_frame_test.go b/internal/wire/connection_close_frame_test.go index 9cfc24fd2a8..0b36c1f7df7 100644 --- a/internal/wire/connection_close_frame_test.go +++ b/internal/wire/connection_close_frame_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/crypto_frame.go b/internal/wire/crypto_frame.go index ee52098c7a5..0f005c5ba4b 100644 --- a/internal/wire/crypto_frame.go +++ b/internal/wire/crypto_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A CryptoFrame is a CRYPTO frame diff --git a/internal/wire/crypto_frame_test.go b/internal/wire/crypto_frame_test.go index 489d8fa8001..fb683c37e81 100644 --- a/internal/wire/crypto_frame_test.go +++ b/internal/wire/crypto_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/data_blocked_frame.go b/internal/wire/data_blocked_frame.go index 6e4ae46f26f..0d4d1f5657f 100644 --- a/internal/wire/data_blocked_frame.go +++ b/internal/wire/data_blocked_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A DataBlockedFrame is a DATA_BLOCKED frame diff --git a/internal/wire/data_blocked_frame_test.go b/internal/wire/data_blocked_frame_test.go index c4b562acde1..83c250401bf 100644 --- a/internal/wire/data_blocked_frame_test.go +++ b/internal/wire/data_blocked_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/datagram_frame.go b/internal/wire/datagram_frame.go index 36e7cd5fdab..e6c45196181 100644 --- a/internal/wire/datagram_frame.go +++ b/internal/wire/datagram_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A DatagramFrame is a DATAGRAM frame diff --git a/internal/wire/datagram_frame_test.go b/internal/wire/datagram_frame_test.go index e2a9c91956a..63c914c6b62 100644 --- a/internal/wire/datagram_frame_test.go +++ b/internal/wire/datagram_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/extended_header.go b/internal/wire/extended_header.go index 161d7c6fa3e..d10820d6d90 100644 --- a/internal/wire/extended_header.go +++ b/internal/wire/extended_header.go @@ -7,9 +7,9 @@ import ( "fmt" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/quicvarint" ) // ErrInvalidReservedBits is returned when the reserved bits are incorrect. diff --git a/internal/wire/extended_header_test.go b/internal/wire/extended_header_test.go index d3d795badd2..23a252337ea 100644 --- a/internal/wire/extended_header_test.go +++ b/internal/wire/extended_header_test.go @@ -5,9 +5,9 @@ import ( "log" "os" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/frame_parser.go b/internal/wire/frame_parser.go index 04b7cfe87fb..ff35dd101ab 100644 --- a/internal/wire/frame_parser.go +++ b/internal/wire/frame_parser.go @@ -6,9 +6,9 @@ import ( "fmt" "reflect" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/quicvarint" ) const ( diff --git a/internal/wire/frame_parser_test.go b/internal/wire/frame_parser_test.go index 62baf808e83..88079ff07e3 100644 --- a/internal/wire/frame_parser_test.go +++ b/internal/wire/frame_parser_test.go @@ -3,8 +3,8 @@ package wire import ( "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/handshake_done_frame.go b/internal/wire/handshake_done_frame.go index e34c012e043..29521bc9e9f 100644 --- a/internal/wire/handshake_done_frame.go +++ b/internal/wire/handshake_done_frame.go @@ -1,7 +1,7 @@ package wire import ( - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // A HandshakeDoneFrame is a HANDSHAKE_DONE frame diff --git a/internal/wire/handshake_done_frame_test.go b/internal/wire/handshake_done_frame_test.go index 9b567f222fa..ee058414d15 100644 --- a/internal/wire/handshake_done_frame_test.go +++ b/internal/wire/handshake_done_frame_test.go @@ -1,7 +1,7 @@ package wire import ( - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/header.go b/internal/wire/header.go index 17e8115a049..e2dc72e421f 100644 --- a/internal/wire/header.go +++ b/internal/wire/header.go @@ -7,9 +7,9 @@ import ( "fmt" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/quicvarint" ) // ParseConnectionID parses the destination connection ID of a packet. diff --git a/internal/wire/header_test.go b/internal/wire/header_test.go index f5c1e8af9f6..bf083c3f054 100644 --- a/internal/wire/header_test.go +++ b/internal/wire/header_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/interface.go b/internal/wire/interface.go index 95286fac92c..7e0f9a03e0f 100644 --- a/internal/wire/interface.go +++ b/internal/wire/interface.go @@ -1,7 +1,7 @@ package wire import ( - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // A Frame in QUIC diff --git a/internal/wire/log.go b/internal/wire/log.go index 8abb5b30241..ec7d45d861c 100644 --- a/internal/wire/log.go +++ b/internal/wire/log.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) // LogFrame logs a frame, either sent or received diff --git a/internal/wire/log_test.go b/internal/wire/log_test.go index 097db606eb7..8675cb715e9 100644 --- a/internal/wire/log_test.go +++ b/internal/wire/log_test.go @@ -6,8 +6,8 @@ import ( "os" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/max_data_frame.go b/internal/wire/max_data_frame.go index b804d2734fa..e61b0f9f3b0 100644 --- a/internal/wire/max_data_frame.go +++ b/internal/wire/max_data_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A MaxDataFrame carries flow control information for the connection diff --git a/internal/wire/max_data_frame_test.go b/internal/wire/max_data_frame_test.go index 46f23f921c4..c1f09119169 100644 --- a/internal/wire/max_data_frame_test.go +++ b/internal/wire/max_data_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/max_stream_data_frame.go b/internal/wire/max_stream_data_frame.go index c22383a3e53..fe3d1e3f70b 100644 --- a/internal/wire/max_stream_data_frame.go +++ b/internal/wire/max_stream_data_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A MaxStreamDataFrame is a MAX_STREAM_DATA frame diff --git a/internal/wire/max_stream_data_frame_test.go b/internal/wire/max_stream_data_frame_test.go index 55989b58c40..b87a919a6e2 100644 --- a/internal/wire/max_stream_data_frame_test.go +++ b/internal/wire/max_stream_data_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/max_streams_frame.go b/internal/wire/max_streams_frame.go index 2bc668d0daa..bd278c02a87 100644 --- a/internal/wire/max_streams_frame.go +++ b/internal/wire/max_streams_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "fmt" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A MaxStreamsFrame is a MAX_STREAMS frame diff --git a/internal/wire/max_streams_frame_test.go b/internal/wire/max_streams_frame_test.go index cfa49a9a634..47a5d446ec9 100644 --- a/internal/wire/max_streams_frame_test.go +++ b/internal/wire/max_streams_frame_test.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/new_connection_id_frame.go b/internal/wire/new_connection_id_frame.go index 09e34b589b8..83102d5d144 100644 --- a/internal/wire/new_connection_id_frame.go +++ b/internal/wire/new_connection_id_frame.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A NewConnectionIDFrame is a NEW_CONNECTION_ID frame diff --git a/internal/wire/new_connection_id_frame_test.go b/internal/wire/new_connection_id_frame_test.go index 026be93e0f6..4628aaf24e3 100644 --- a/internal/wire/new_connection_id_frame_test.go +++ b/internal/wire/new_connection_id_frame_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/new_token_frame.go b/internal/wire/new_token_frame.go index 752d4baf017..c3fa178c17f 100644 --- a/internal/wire/new_token_frame.go +++ b/internal/wire/new_token_frame.go @@ -5,8 +5,8 @@ import ( "errors" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A NewTokenFrame is a NEW_TOKEN frame diff --git a/internal/wire/new_token_frame_test.go b/internal/wire/new_token_frame_test.go index 15eedc35be1..c991a6bbce4 100644 --- a/internal/wire/new_token_frame_test.go +++ b/internal/wire/new_token_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/path_challenge_frame.go b/internal/wire/path_challenge_frame.go index 567e46c404e..ad024330aca 100644 --- a/internal/wire/path_challenge_frame.go +++ b/internal/wire/path_challenge_frame.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // A PathChallengeFrame is a PATH_CHALLENGE frame diff --git a/internal/wire/path_challenge_frame_test.go b/internal/wire/path_challenge_frame_test.go index ca6c8aad5cb..0f15a417497 100644 --- a/internal/wire/path_challenge_frame_test.go +++ b/internal/wire/path_challenge_frame_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/path_response_frame.go b/internal/wire/path_response_frame.go index 22495184b0e..76e65104963 100644 --- a/internal/wire/path_response_frame.go +++ b/internal/wire/path_response_frame.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // A PathResponseFrame is a PATH_RESPONSE frame diff --git a/internal/wire/path_response_frame_test.go b/internal/wire/path_response_frame_test.go index 675b673be4f..48e17742665 100644 --- a/internal/wire/path_response_frame_test.go +++ b/internal/wire/path_response_frame_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/ping_frame.go b/internal/wire/ping_frame.go index 2562bc17693..dd24edc0c37 100644 --- a/internal/wire/ping_frame.go +++ b/internal/wire/ping_frame.go @@ -1,7 +1,7 @@ package wire import ( - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // A PingFrame is a PING frame diff --git a/internal/wire/ping_frame_test.go b/internal/wire/ping_frame_test.go index 49c1a70ce8a..8f8fb5d973f 100644 --- a/internal/wire/ping_frame_test.go +++ b/internal/wire/ping_frame_test.go @@ -1,7 +1,7 @@ package wire import ( - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/pool.go b/internal/wire/pool.go index 0ce69787044..18ab437937d 100644 --- a/internal/wire/pool.go +++ b/internal/wire/pool.go @@ -3,7 +3,7 @@ package wire import ( "sync" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) var pool sync.Pool diff --git a/internal/wire/reset_stream_frame.go b/internal/wire/reset_stream_frame.go index e36d98d0ace..cd94c9408fc 100644 --- a/internal/wire/reset_stream_frame.go +++ b/internal/wire/reset_stream_frame.go @@ -3,9 +3,9 @@ package wire import ( "bytes" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/quicvarint" ) // A ResetStreamFrame is a RESET_STREAM frame in QUIC diff --git a/internal/wire/reset_stream_frame_test.go b/internal/wire/reset_stream_frame_test.go index 8161f282b62..3f254d13586 100644 --- a/internal/wire/reset_stream_frame_test.go +++ b/internal/wire/reset_stream_frame_test.go @@ -3,9 +3,9 @@ package wire import ( "bytes" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/retire_connection_id_frame.go b/internal/wire/retire_connection_id_frame.go index a88155e36dd..8e9a41d89b5 100644 --- a/internal/wire/retire_connection_id_frame.go +++ b/internal/wire/retire_connection_id_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A RetireConnectionIDFrame is a RETIRE_CONNECTION_ID frame diff --git a/internal/wire/retire_connection_id_frame_test.go b/internal/wire/retire_connection_id_frame_test.go index f20ae000aba..b679e41e33f 100644 --- a/internal/wire/retire_connection_id_frame_test.go +++ b/internal/wire/retire_connection_id_frame_test.go @@ -4,7 +4,7 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/short_header.go b/internal/wire/short_header.go index c755df5cf70..69aa8341185 100644 --- a/internal/wire/short_header.go +++ b/internal/wire/short_header.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) // ParseShortHeader parses a short header packet. diff --git a/internal/wire/short_header_test.go b/internal/wire/short_header_test.go index 780d4651d59..64146ecfb02 100644 --- a/internal/wire/short_header_test.go +++ b/internal/wire/short_header_test.go @@ -7,8 +7,8 @@ import ( "os" "testing" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/stop_sending_frame.go b/internal/wire/stop_sending_frame.go index c4b6e66eb70..d7b8b240290 100644 --- a/internal/wire/stop_sending_frame.go +++ b/internal/wire/stop_sending_frame.go @@ -3,9 +3,9 @@ package wire import ( "bytes" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/quicvarint" ) // A StopSendingFrame is a STOP_SENDING frame diff --git a/internal/wire/stop_sending_frame_test.go b/internal/wire/stop_sending_frame_test.go index e9173a0d389..fef3175219b 100644 --- a/internal/wire/stop_sending_frame_test.go +++ b/internal/wire/stop_sending_frame_test.go @@ -4,9 +4,9 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/stream_data_blocked_frame.go b/internal/wire/stream_data_blocked_frame.go index 1f3513278d2..d42e59a2d58 100644 --- a/internal/wire/stream_data_blocked_frame.go +++ b/internal/wire/stream_data_blocked_frame.go @@ -3,8 +3,8 @@ package wire import ( "bytes" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A StreamDataBlockedFrame is a STREAM_DATA_BLOCKED frame diff --git a/internal/wire/stream_data_blocked_frame_test.go b/internal/wire/stream_data_blocked_frame_test.go index bf05732e8af..5bdb241b185 100644 --- a/internal/wire/stream_data_blocked_frame_test.go +++ b/internal/wire/stream_data_blocked_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/stream_frame.go b/internal/wire/stream_frame.go index b45998099b5..d22e1c0526e 100644 --- a/internal/wire/stream_frame.go +++ b/internal/wire/stream_frame.go @@ -5,8 +5,8 @@ import ( "errors" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A StreamFrame of QUIC diff --git a/internal/wire/stream_frame_test.go b/internal/wire/stream_frame_test.go index 2b1446f485b..ed63c54ccc1 100644 --- a/internal/wire/stream_frame_test.go +++ b/internal/wire/stream_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/streams_blocked_frame.go b/internal/wire/streams_blocked_frame.go index 6ad2a098c35..4a5951c625b 100644 --- a/internal/wire/streams_blocked_frame.go +++ b/internal/wire/streams_blocked_frame.go @@ -4,8 +4,8 @@ import ( "bytes" "fmt" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" ) // A StreamsBlockedFrame is a STREAMS_BLOCKED frame diff --git a/internal/wire/streams_blocked_frame_test.go b/internal/wire/streams_blocked_frame_test.go index e67a0631ae9..fcf204528c8 100644 --- a/internal/wire/streams_blocked_frame_test.go +++ b/internal/wire/streams_blocked_frame_test.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/transport_parameter_test.go b/internal/wire/transport_parameter_test.go index 541252b4e78..95bfbafc70b 100644 --- a/internal/wire/transport_parameter_test.go +++ b/internal/wire/transport_parameter_test.go @@ -9,9 +9,9 @@ import ( "golang.org/x/exp/rand" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/transport_parameters.go b/internal/wire/transport_parameters.go index 78490880ea9..1ec1e59d3a3 100644 --- a/internal/wire/transport_parameters.go +++ b/internal/wire/transport_parameters.go @@ -11,10 +11,10 @@ import ( "sort" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/quicvarint" ) // AdditionalTransportParametersClient are additional transport parameters that will be added diff --git a/internal/wire/version_negotiation.go b/internal/wire/version_negotiation.go index 53fe7301092..3dc621135b3 100644 --- a/internal/wire/version_negotiation.go +++ b/internal/wire/version_negotiation.go @@ -6,8 +6,8 @@ import ( "encoding/binary" "errors" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) // ParseVersionNegotiationPacket parses a Version Negotiation packet. diff --git a/internal/wire/version_negotiation_test.go b/internal/wire/version_negotiation_test.go index ece6cdab97f..65d0ba911a0 100644 --- a/internal/wire/version_negotiation_test.go +++ b/internal/wire/version_negotiation_test.go @@ -5,7 +5,7 @@ import ( "golang.org/x/exp/rand" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/internal/wire/wire_suite_test.go b/internal/wire/wire_suite_test.go index b15ff07b5a6..d68c6ee75a1 100644 --- a/internal/wire/wire_suite_test.go +++ b/internal/wire/wire_suite_test.go @@ -4,8 +4,8 @@ import ( "encoding/binary" "testing" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/quicvarint" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/quicvarint" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/interop/client/main.go b/interop/client/main.go index c0121cc34be..747619a09fb 100644 --- a/interop/client/main.go +++ b/interop/client/main.go @@ -14,13 +14,13 @@ import ( "golang.org/x/sync/errgroup" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/http3" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qtls" - "github.com/apernet/quic-go/interop/http09" - "github.com/apernet/quic-go/interop/utils" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/http3" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qtls" + "github.com/quic-go/quic-go/interop/http09" + "github.com/quic-go/quic-go/interop/utils" ) var errUnsupported = errors.New("unsupported test case") diff --git a/interop/http09/client.go b/interop/http09/client.go index bc3d477b681..b6de79efc4c 100644 --- a/interop/http09/client.go +++ b/interop/http09/client.go @@ -13,7 +13,7 @@ import ( "golang.org/x/net/idna" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" ) // MethodGet0RTT allows a GET request to be sent using 0-RTT. diff --git a/interop/http09/http_test.go b/interop/http09/http_test.go index 6b919a50307..f2d48994872 100644 --- a/interop/http09/http_test.go +++ b/interop/http09/http_test.go @@ -8,8 +8,8 @@ import ( "net/http" "net/http/httptest" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/testdata" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/testdata" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/interop/http09/server.go b/interop/http09/server.go index cc8bbe9b85b..b7b510d86ce 100644 --- a/interop/http09/server.go +++ b/interop/http09/server.go @@ -12,7 +12,7 @@ import ( "strings" "sync" - "github.com/apernet/quic-go" + "github.com/quic-go/quic-go" ) const h09alpn = "hq-interop" diff --git a/interop/server/main.go b/interop/server/main.go index 289ec8c761a..df7044624e3 100644 --- a/interop/server/main.go +++ b/interop/server/main.go @@ -8,11 +8,11 @@ import ( "net/http" "os" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/http3" - "github.com/apernet/quic-go/internal/qtls" - "github.com/apernet/quic-go/interop/http09" - "github.com/apernet/quic-go/interop/utils" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/http3" + "github.com/quic-go/quic-go/internal/qtls" + "github.com/quic-go/quic-go/interop/http09" + "github.com/quic-go/quic-go/interop/utils" ) var tlsConf *tls.Config diff --git a/interop/utils/logging.go b/interop/utils/logging.go index 986cb285489..30e3f663f7a 100644 --- a/interop/utils/logging.go +++ b/interop/utils/logging.go @@ -9,10 +9,10 @@ import ( "os" "strings" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" - "github.com/apernet/quic-go/qlog" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" + "github.com/quic-go/quic-go/qlog" ) // GetSSLKeyLog creates a file for the TLS key log diff --git a/logging/frame.go b/logging/frame.go index fea226582da..9a055db3595 100644 --- a/logging/frame.go +++ b/logging/frame.go @@ -1,6 +1,6 @@ package logging -import "github.com/apernet/quic-go/internal/wire" +import "github.com/quic-go/quic-go/internal/wire" // A Frame is a QUIC frame type Frame interface{} diff --git a/logging/interface.go b/logging/interface.go index 342a62de061..2ce8582ecb9 100644 --- a/logging/interface.go +++ b/logging/interface.go @@ -6,10 +6,10 @@ import ( "net" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" ) type ( diff --git a/logging/mock_connection_tracer_test.go b/logging/mock_connection_tracer_test.go index beb30b504ff..ac6d5fd7cd9 100644 --- a/logging/mock_connection_tracer_test.go +++ b/logging/mock_connection_tracer_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/logging (interfaces: ConnectionTracer) +// Source: github.com/quic-go/quic-go/logging (interfaces: ConnectionTracer) // Package logging is a generated GoMock package. package logging @@ -10,9 +10,9 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - utils "github.com/apernet/quic-go/internal/utils" - wire "github.com/apernet/quic-go/internal/wire" + protocol "github.com/quic-go/quic-go/internal/protocol" + utils "github.com/quic-go/quic-go/internal/utils" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockConnectionTracer is a mock of ConnectionTracer interface. diff --git a/logging/mock_tracer_test.go b/logging/mock_tracer_test.go index 6a35b7104c6..8526cd3a366 100644 --- a/logging/mock_tracer_test.go +++ b/logging/mock_tracer_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go/logging (interfaces: Tracer) +// Source: github.com/quic-go/quic-go/logging (interfaces: Tracer) // Package logging is a generated GoMock package. package logging @@ -9,8 +9,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - wire "github.com/apernet/quic-go/internal/wire" + protocol "github.com/quic-go/quic-go/internal/protocol" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockTracer is a mock of Tracer interface. diff --git a/logging/mockgen.go b/logging/mockgen.go index 9e68d2ceb20..d5091679967 100644 --- a/logging/mockgen.go +++ b/logging/mockgen.go @@ -1,4 +1,4 @@ package logging -//go:generate sh -c "go run github.com/golang/mock/mockgen -package logging -self_package github.com/apernet/quic-go/logging -destination mock_connection_tracer_test.go github.com/apernet/quic-go/logging ConnectionTracer" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package logging -self_package github.com/apernet/quic-go/logging -destination mock_tracer_test.go github.com/apernet/quic-go/logging Tracer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package logging -self_package github.com/quic-go/quic-go/logging -destination mock_connection_tracer_test.go github.com/quic-go/quic-go/logging ConnectionTracer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package logging -self_package github.com/quic-go/quic-go/logging -destination mock_tracer_test.go github.com/quic-go/quic-go/logging Tracer" diff --git a/logging/multiplex_test.go b/logging/multiplex_test.go index 205f1c759d7..d22204999cb 100644 --- a/logging/multiplex_test.go +++ b/logging/multiplex_test.go @@ -5,8 +5,8 @@ import ( "net" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/logging/packet_header.go b/logging/packet_header.go index 0a1691d0a64..6b8df58d8ac 100644 --- a/logging/packet_header.go +++ b/logging/packet_header.go @@ -1,7 +1,7 @@ package logging import ( - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // PacketTypeFromHeader determines the packet type from a *wire.Header. diff --git a/logging/packet_header_test.go b/logging/packet_header_test.go index 7abc6a869e0..6df41925bf2 100644 --- a/logging/packet_header_test.go +++ b/logging/packet_header_test.go @@ -1,8 +1,8 @@ package logging import ( - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/mock_ack_frame_source_test.go b/mock_ack_frame_source_test.go index 52c14fb1b05..1284752b64f 100644 --- a/mock_ack_frame_source_test.go +++ b/mock_ack_frame_source_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: AckFrameSource) +// Source: github.com/quic-go/quic-go (interfaces: AckFrameSource) // Package quic is a generated GoMock package. package quic @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - wire "github.com/apernet/quic-go/internal/wire" + protocol "github.com/quic-go/quic-go/internal/protocol" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockAckFrameSource is a mock of AckFrameSource interface. diff --git a/mock_conn_runner_test.go b/mock_conn_runner_test.go index 1223649cbb8..ec5873231d9 100644 --- a/mock_conn_runner_test.go +++ b/mock_conn_runner_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: ConnRunner) +// Source: github.com/quic-go/quic-go (interfaces: ConnRunner) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockConnRunner is a mock of ConnRunner interface. diff --git a/mock_crypto_data_handler_test.go b/mock_crypto_data_handler_test.go index 21049c2ed82..d077886ccc1 100644 --- a/mock_crypto_data_handler_test.go +++ b/mock_crypto_data_handler_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: CryptoDataHandler) +// Source: github.com/quic-go/quic-go (interfaces: CryptoDataHandler) // Package quic is a generated GoMock package. package quic @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - handshake "github.com/apernet/quic-go/internal/handshake" - protocol "github.com/apernet/quic-go/internal/protocol" + handshake "github.com/quic-go/quic-go/internal/handshake" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockCryptoDataHandler is a mock of CryptoDataHandler interface. diff --git a/mock_crypto_stream_test.go b/mock_crypto_stream_test.go index e25e3449f0e..c2048fa8cfa 100644 --- a/mock_crypto_stream_test.go +++ b/mock_crypto_stream_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: CryptoStream) +// Source: github.com/quic-go/quic-go (interfaces: CryptoStream) // Package quic is a generated GoMock package. package quic @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - wire "github.com/apernet/quic-go/internal/wire" + protocol "github.com/quic-go/quic-go/internal/protocol" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockCryptoStream is a mock of CryptoStream interface. diff --git a/mock_frame_source_test.go b/mock_frame_source_test.go index 7f134d1af73..e23aa39d80a 100644 --- a/mock_frame_source_test.go +++ b/mock_frame_source_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: FrameSource) +// Source: github.com/quic-go/quic-go (interfaces: FrameSource) // Package quic is a generated GoMock package. package quic @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - ackhandler "github.com/apernet/quic-go/internal/ackhandler" - protocol "github.com/apernet/quic-go/internal/protocol" + ackhandler "github.com/quic-go/quic-go/internal/ackhandler" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockFrameSource is a mock of FrameSource interface. diff --git a/mock_mtu_discoverer_test.go b/mock_mtu_discoverer_test.go index f882c99d7be..406943c580c 100644 --- a/mock_mtu_discoverer_test.go +++ b/mock_mtu_discoverer_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: MTUDiscoverer) +// Source: github.com/quic-go/quic-go (interfaces: MTUDiscoverer) // Package quic is a generated GoMock package. package quic @@ -9,8 +9,8 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - ackhandler "github.com/apernet/quic-go/internal/ackhandler" - protocol "github.com/apernet/quic-go/internal/protocol" + ackhandler "github.com/quic-go/quic-go/internal/ackhandler" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockMTUDiscoverer is a mock of MTUDiscoverer interface. diff --git a/mock_packer_test.go b/mock_packer_test.go index 1a52bd24d68..d54fe58b8d4 100644 --- a/mock_packer_test.go +++ b/mock_packer_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: Packer) +// Source: github.com/quic-go/quic-go (interfaces: Packer) // Package quic is a generated GoMock package. package quic @@ -8,9 +8,9 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - ackhandler "github.com/apernet/quic-go/internal/ackhandler" - protocol "github.com/apernet/quic-go/internal/protocol" - qerr "github.com/apernet/quic-go/internal/qerr" + ackhandler "github.com/quic-go/quic-go/internal/ackhandler" + protocol "github.com/quic-go/quic-go/internal/protocol" + qerr "github.com/quic-go/quic-go/internal/qerr" ) // MockPacker is a mock of Packer interface. diff --git a/mock_packet_handler_manager_test.go b/mock_packet_handler_manager_test.go index 7703abb8198..7b70a8dbd9f 100644 --- a/mock_packet_handler_manager_test.go +++ b/mock_packet_handler_manager_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: PacketHandlerManager) +// Source: github.com/quic-go/quic-go (interfaces: PacketHandlerManager) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockPacketHandlerManager is a mock of PacketHandlerManager interface. diff --git a/mock_packet_handler_test.go b/mock_packet_handler_test.go index 4d950396b30..529d1b8411b 100644 --- a/mock_packet_handler_test.go +++ b/mock_packet_handler_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: PacketHandler) +// Source: github.com/quic-go/quic-go (interfaces: PacketHandler) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockPacketHandler is a mock of PacketHandler interface. diff --git a/mock_quic_conn_test.go b/mock_quic_conn_test.go index 35d467be6cc..ad7fb055364 100644 --- a/mock_quic_conn_test.go +++ b/mock_quic_conn_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: QUICConn) +// Source: github.com/quic-go/quic-go (interfaces: QUICConn) // Package quic is a generated GoMock package. package quic @@ -10,9 +10,9 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - congestion "github.com/apernet/quic-go/congestion" - protocol "github.com/apernet/quic-go/internal/protocol" - qerr "github.com/apernet/quic-go/internal/qerr" + congestion "github.com/quic-go/quic-go/congestion" + protocol "github.com/quic-go/quic-go/internal/protocol" + qerr "github.com/quic-go/quic-go/internal/qerr" ) // MockQUICConn is a mock of QUICConn interface. diff --git a/mock_receive_stream_internal_test.go b/mock_receive_stream_internal_test.go index c85b1322992..a4cbb276cff 100644 --- a/mock_receive_stream_internal_test.go +++ b/mock_receive_stream_internal_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: ReceiveStreamI) +// Source: github.com/quic-go/quic-go (interfaces: ReceiveStreamI) // Package quic is a generated GoMock package. package quic @@ -9,9 +9,9 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - qerr "github.com/apernet/quic-go/internal/qerr" - wire "github.com/apernet/quic-go/internal/wire" + protocol "github.com/quic-go/quic-go/internal/protocol" + qerr "github.com/quic-go/quic-go/internal/qerr" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockReceiveStreamI is a mock of ReceiveStreamI interface. diff --git a/mock_sealing_manager_test.go b/mock_sealing_manager_test.go index e01693bf60c..26e442e5994 100644 --- a/mock_sealing_manager_test.go +++ b/mock_sealing_manager_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: SealingManager) +// Source: github.com/quic-go/quic-go (interfaces: SealingManager) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - handshake "github.com/apernet/quic-go/internal/handshake" + handshake "github.com/quic-go/quic-go/internal/handshake" ) // MockSealingManager is a mock of SealingManager interface. diff --git a/mock_send_conn_test.go b/mock_send_conn_test.go index 5c1ba53f37b..7ae1c525e10 100644 --- a/mock_send_conn_test.go +++ b/mock_send_conn_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: SendConn) +// Source: github.com/quic-go/quic-go (interfaces: SendConn) // Package quic is a generated GoMock package. package quic @@ -9,7 +9,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockSendConn is a mock of SendConn interface. diff --git a/mock_send_stream_internal_test.go b/mock_send_stream_internal_test.go index 52f7134c053..c0581bc290a 100644 --- a/mock_send_stream_internal_test.go +++ b/mock_send_stream_internal_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: SendStreamI) +// Source: github.com/quic-go/quic-go (interfaces: SendStreamI) // Package quic is a generated GoMock package. package quic @@ -10,10 +10,10 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - ackhandler "github.com/apernet/quic-go/internal/ackhandler" - protocol "github.com/apernet/quic-go/internal/protocol" - qerr "github.com/apernet/quic-go/internal/qerr" - wire "github.com/apernet/quic-go/internal/wire" + ackhandler "github.com/quic-go/quic-go/internal/ackhandler" + protocol "github.com/quic-go/quic-go/internal/protocol" + qerr "github.com/quic-go/quic-go/internal/qerr" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockSendStreamI is a mock of SendStreamI interface. diff --git a/mock_sender_test.go b/mock_sender_test.go index 3c34c49526f..feafdf4e06f 100644 --- a/mock_sender_test.go +++ b/mock_sender_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: Sender) +// Source: github.com/quic-go/quic-go (interfaces: Sender) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockSender is a mock of Sender interface. diff --git a/mock_stream_getter_test.go b/mock_stream_getter_test.go index 0b6c81c6cc6..d02387507e0 100644 --- a/mock_stream_getter_test.go +++ b/mock_stream_getter_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: StreamGetter) +// Source: github.com/quic-go/quic-go (interfaces: StreamGetter) // Package quic is a generated GoMock package. package quic @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" + protocol "github.com/quic-go/quic-go/internal/protocol" ) // MockStreamGetter is a mock of StreamGetter interface. diff --git a/mock_stream_internal_test.go b/mock_stream_internal_test.go index f7bebc8463a..512b4b1d992 100644 --- a/mock_stream_internal_test.go +++ b/mock_stream_internal_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: StreamI) +// Source: github.com/quic-go/quic-go (interfaces: StreamI) // Package quic is a generated GoMock package. package quic @@ -10,10 +10,10 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - ackhandler "github.com/apernet/quic-go/internal/ackhandler" - protocol "github.com/apernet/quic-go/internal/protocol" - qerr "github.com/apernet/quic-go/internal/qerr" - wire "github.com/apernet/quic-go/internal/wire" + ackhandler "github.com/quic-go/quic-go/internal/ackhandler" + protocol "github.com/quic-go/quic-go/internal/protocol" + qerr "github.com/quic-go/quic-go/internal/qerr" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockStreamI is a mock of StreamI interface. diff --git a/mock_stream_manager_test.go b/mock_stream_manager_test.go index 18a4a05c530..2159372d1cf 100644 --- a/mock_stream_manager_test.go +++ b/mock_stream_manager_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: StreamManager) +// Source: github.com/quic-go/quic-go (interfaces: StreamManager) // Package quic is a generated GoMock package. package quic @@ -9,8 +9,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - wire "github.com/apernet/quic-go/internal/wire" + protocol "github.com/quic-go/quic-go/internal/protocol" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockStreamManager is a mock of StreamManager interface. diff --git a/mock_stream_sender_test.go b/mock_stream_sender_test.go index 0ce8b898450..b4898c67edb 100644 --- a/mock_stream_sender_test.go +++ b/mock_stream_sender_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: StreamSender) +// Source: github.com/quic-go/quic-go (interfaces: StreamSender) // Package quic is a generated GoMock package. package quic @@ -8,8 +8,8 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - wire "github.com/apernet/quic-go/internal/wire" + protocol "github.com/quic-go/quic-go/internal/protocol" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockStreamSender is a mock of StreamSender interface. diff --git a/mock_token_store_test.go b/mock_token_store_test.go index 9463ea05158..0fb461a6aab 100644 --- a/mock_token_store_test.go +++ b/mock_token_store_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: TokenStore) +// Source: github.com/quic-go/quic-go (interfaces: TokenStore) // Package quic is a generated GoMock package. package quic diff --git a/mock_unknown_packet_handler_test.go b/mock_unknown_packet_handler_test.go index 549b5d72346..f74897825f0 100644 --- a/mock_unknown_packet_handler_test.go +++ b/mock_unknown_packet_handler_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: UnknownPacketHandler) +// Source: github.com/quic-go/quic-go (interfaces: UnknownPacketHandler) // Package quic is a generated GoMock package. package quic diff --git a/mock_unpacker_test.go b/mock_unpacker_test.go index 7b7fbc68044..a144fb4c6a9 100644 --- a/mock_unpacker_test.go +++ b/mock_unpacker_test.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/apernet/quic-go (interfaces: Unpacker) +// Source: github.com/quic-go/quic-go (interfaces: Unpacker) // Package quic is a generated GoMock package. package quic @@ -9,8 +9,8 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - protocol "github.com/apernet/quic-go/internal/protocol" - wire "github.com/apernet/quic-go/internal/wire" + protocol "github.com/quic-go/quic-go/internal/protocol" + wire "github.com/quic-go/quic-go/internal/wire" ) // MockUnpacker is a mock of Unpacker interface. diff --git a/mockgen.go b/mockgen.go index 548af91958f..eb700864ac0 100644 --- a/mockgen.go +++ b/mockgen.go @@ -2,73 +2,73 @@ package quic -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_send_conn_test.go github.com/apernet/quic-go SendConn" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_send_conn_test.go github.com/quic-go/quic-go SendConn" type SendConn = sendConn -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_sender_test.go github.com/apernet/quic-go Sender" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_sender_test.go github.com/quic-go/quic-go Sender" type Sender = sender -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_stream_internal_test.go github.com/apernet/quic-go StreamI" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_internal_test.go github.com/quic-go/quic-go StreamI" type StreamI = streamI -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_crypto_stream_test.go github.com/apernet/quic-go CryptoStream" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_crypto_stream_test.go github.com/quic-go/quic-go CryptoStream" type CryptoStream = cryptoStream -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_receive_stream_internal_test.go github.com/apernet/quic-go ReceiveStreamI" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_receive_stream_internal_test.go github.com/quic-go/quic-go ReceiveStreamI" type ReceiveStreamI = receiveStreamI -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_send_stream_internal_test.go github.com/apernet/quic-go SendStreamI" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_send_stream_internal_test.go github.com/quic-go/quic-go SendStreamI" type SendStreamI = sendStreamI -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_stream_getter_test.go github.com/apernet/quic-go StreamGetter" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_getter_test.go github.com/quic-go/quic-go StreamGetter" type StreamGetter = streamGetter -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_stream_sender_test.go github.com/apernet/quic-go StreamSender" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_sender_test.go github.com/quic-go/quic-go StreamSender" type StreamSender = streamSender -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_crypto_data_handler_test.go github.com/apernet/quic-go CryptoDataHandler" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_crypto_data_handler_test.go github.com/quic-go/quic-go CryptoDataHandler" type CryptoDataHandler = cryptoDataHandler -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_frame_source_test.go github.com/apernet/quic-go FrameSource" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_frame_source_test.go github.com/quic-go/quic-go FrameSource" type FrameSource = frameSource -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_ack_frame_source_test.go github.com/apernet/quic-go AckFrameSource" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_ack_frame_source_test.go github.com/quic-go/quic-go AckFrameSource" type AckFrameSource = ackFrameSource -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_stream_manager_test.go github.com/apernet/quic-go StreamManager" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_manager_test.go github.com/quic-go/quic-go StreamManager" type StreamManager = streamManager -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_sealing_manager_test.go github.com/apernet/quic-go SealingManager" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_sealing_manager_test.go github.com/quic-go/quic-go SealingManager" type SealingManager = sealingManager -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_unpacker_test.go github.com/apernet/quic-go Unpacker" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_unpacker_test.go github.com/quic-go/quic-go Unpacker" type Unpacker = unpacker -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_packer_test.go github.com/apernet/quic-go Packer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packer_test.go github.com/quic-go/quic-go Packer" type Packer = packer -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_mtu_discoverer_test.go github.com/apernet/quic-go MTUDiscoverer" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_mtu_discoverer_test.go github.com/quic-go/quic-go MTUDiscoverer" type MTUDiscoverer = mtuDiscoverer -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_conn_runner_test.go github.com/apernet/quic-go ConnRunner" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_conn_runner_test.go github.com/quic-go/quic-go ConnRunner" type ConnRunner = connRunner -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_quic_conn_test.go github.com/apernet/quic-go QUICConn" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_quic_conn_test.go github.com/quic-go/quic-go QUICConn" type QUICConn = quicConn -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_packet_handler_test.go github.com/apernet/quic-go PacketHandler" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packet_handler_test.go github.com/quic-go/quic-go PacketHandler" type PacketHandler = packetHandler -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_unknown_packet_handler_test.go github.com/apernet/quic-go UnknownPacketHandler" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_unknown_packet_handler_test.go github.com/quic-go/quic-go UnknownPacketHandler" type UnknownPacketHandler = unknownPacketHandler -//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/apernet/quic-go -destination mock_packet_handler_manager_test.go github.com/apernet/quic-go PacketHandlerManager" +//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packet_handler_manager_test.go github.com/quic-go/quic-go PacketHandlerManager" type PacketHandlerManager = packetHandlerManager // Need to use source mode for the batchConn, since reflect mode follows type aliases. // See https://github.com/golang/mock/issues/244 for details. // -//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/apernet/quic-go -source sys_conn_oob.go -destination mock_batch_conn_test.go -mock_names batchConn=MockBatchConn" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/quic-go/quic-go -source sys_conn_oob.go -destination mock_batch_conn_test.go -mock_names batchConn=MockBatchConn" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/apernet/quic-go -self_package github.com/apernet/quic-go -destination mock_token_store_test.go github.com/apernet/quic-go TokenStore" -//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/apernet/quic-go -self_package github.com/apernet/quic-go -destination mock_packetconn_test.go net PacketConn" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/quic-go/quic-go -self_package github.com/quic-go/quic-go -destination mock_token_store_test.go github.com/quic-go/quic-go TokenStore" +//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/quic-go/quic-go -self_package github.com/quic-go/quic-go -destination mock_packetconn_test.go net PacketConn" diff --git a/mtu_discoverer.go b/mtu_discoverer.go index 43de873e1c6..317b09292f6 100644 --- a/mtu_discoverer.go +++ b/mtu_discoverer.go @@ -4,10 +4,10 @@ import ( "net" "time" - "github.com/apernet/quic-go/internal/ackhandler" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/ackhandler" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" ) type mtuDiscoverer interface { diff --git a/mtu_discoverer_test.go b/mtu_discoverer_test.go index 1cb78d83551..6e01f570b47 100644 --- a/mtu_discoverer_test.go +++ b/mtu_discoverer_test.go @@ -4,8 +4,8 @@ import ( "math/rand" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/multiplexer.go b/multiplexer.go index dd9b23919cf..85f7f4034e3 100644 --- a/multiplexer.go +++ b/multiplexer.go @@ -5,7 +5,7 @@ import ( "net" "sync" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/utils" ) var ( @@ -54,7 +54,7 @@ func (m *connMultiplexer) AddConn(c indexableConn) { if ok { // Panics if we're already listening on this connection. // This is a safeguard because we're introducing a breaking API change, see - // https://github.com/apernet/quic-go/issues/3727 for details. + // https://github.com/quic-go/quic-go/issues/3727 for details. // We'll remove this at a later time, when most users of the library have made the switch. panic("connection already exists") // TODO: write a nice message } diff --git a/oss-fuzz.sh b/oss-fuzz.sh index 1f375fd299f..1efe6baa682 100644 --- a/oss-fuzz.sh +++ b/oss-fuzz.sh @@ -17,11 +17,11 @@ compile_go_fuzzer github.com/quic-go/qpack/fuzzing Fuzz qpack_fuzzer ( # fuzz quic-go -compile_go_fuzzer github.com/apernet/quic-go/fuzzing/frames Fuzz frame_fuzzer -compile_go_fuzzer github.com/apernet/quic-go/fuzzing/header Fuzz header_fuzzer -compile_go_fuzzer github.com/apernet/quic-go/fuzzing/transportparameters Fuzz transportparameter_fuzzer -compile_go_fuzzer github.com/apernet/quic-go/fuzzing/tokens Fuzz token_fuzzer -compile_go_fuzzer github.com/apernet/quic-go/fuzzing/handshake Fuzz handshake_fuzzer +compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/frames Fuzz frame_fuzzer +compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/header Fuzz header_fuzzer +compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/transportparameters Fuzz transportparameter_fuzzer +compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/tokens Fuzz token_fuzzer +compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/handshake Fuzz handshake_fuzzer if [ $SANITIZER == "coverage" ]; then # no need for corpora if coverage @@ -29,7 +29,7 @@ if [ $SANITIZER == "coverage" ]; then fi # generate seed corpora -cd $GOPATH/src/github.com/apernet/quic-go/ +cd $GOPATH/src/github.com/quic-go/quic-go/ go generate -x ./fuzzing/... zip --quiet -r $OUT/header_fuzzer_seed_corpus.zip fuzzing/header/corpus diff --git a/packet_handler_map.go b/packet_handler_map.go index 001d68f4ed7..2a16773c8e5 100644 --- a/packet_handler_map.go +++ b/packet_handler_map.go @@ -11,8 +11,8 @@ import ( "sync" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) type connCapabilities struct { diff --git a/packet_handler_map_test.go b/packet_handler_map_test.go index e48fd9b64ef..24cef871e44 100644 --- a/packet_handler_map_test.go +++ b/packet_handler_map_test.go @@ -6,8 +6,8 @@ import ( "net" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/packet_packer.go b/packet_packer.go index 9ef71387c11..577f3b043a4 100644 --- a/packet_packer.go +++ b/packet_packer.go @@ -4,11 +4,11 @@ import ( "errors" "fmt" - "github.com/apernet/quic-go/internal/ackhandler" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/ackhandler" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/wire" ) var errNothingToPack = errors.New("nothing to pack") diff --git a/packet_packer_test.go b/packet_packer_test.go index 16957e07759..3ff15eaff03 100644 --- a/packet_packer_test.go +++ b/packet_packer_test.go @@ -8,14 +8,14 @@ import ( "golang.org/x/exp/rand" - "github.com/apernet/quic-go/internal/ackhandler" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/mocks" - mockackhandler "github.com/apernet/quic-go/internal/mocks/ackhandler" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/ackhandler" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/mocks" + mockackhandler "github.com/quic-go/quic-go/internal/mocks/ackhandler" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" "github.com/golang/mock/gomock" diff --git a/packet_unpacker.go b/packet_unpacker.go index 6cf7c692d1b..103524c7dd6 100644 --- a/packet_unpacker.go +++ b/packet_unpacker.go @@ -5,10 +5,10 @@ import ( "fmt" "time" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/wire" ) type headerDecryptor interface { diff --git a/packet_unpacker_test.go b/packet_unpacker_test.go index 591f8fa0287..927635cb4e0 100644 --- a/packet_unpacker_test.go +++ b/packet_unpacker_test.go @@ -4,11 +4,11 @@ import ( "errors" "time" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/mocks" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/mocks" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/wire" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/qlog/event.go b/qlog/event.go index d74e2c9024c..9dae7444100 100644 --- a/qlog/event.go +++ b/qlog/event.go @@ -6,10 +6,10 @@ import ( "net" "time" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" "github.com/francoispqt/gojay" ) diff --git a/qlog/frame.go b/qlog/frame.go index eb987eb7b8a..0d44f073b51 100644 --- a/qlog/frame.go +++ b/qlog/frame.go @@ -3,8 +3,8 @@ package qlog import ( "fmt" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" "github.com/francoispqt/gojay" ) diff --git a/qlog/frame_test.go b/qlog/frame_test.go index d875b3cdf47..0cee3847c75 100644 --- a/qlog/frame_test.go +++ b/qlog/frame_test.go @@ -5,9 +5,9 @@ import ( "encoding/json" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/logging" "github.com/francoispqt/gojay" . "github.com/onsi/ginkgo/v2" diff --git a/qlog/packet_header.go b/qlog/packet_header.go index c5786215302..106499b0566 100644 --- a/qlog/packet_header.go +++ b/qlog/packet_header.go @@ -3,8 +3,8 @@ package qlog import ( "fmt" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/logging" "github.com/francoispqt/gojay" ) diff --git a/qlog/packet_header_test.go b/qlog/packet_header_test.go index c3ff9913b9b..9d37e556da9 100644 --- a/qlog/packet_header_test.go +++ b/qlog/packet_header_test.go @@ -6,9 +6,9 @@ import ( "github.com/francoispqt/gojay" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/qlog/qlog.go b/qlog/qlog.go index 53e45cb56b5..4c480e26056 100644 --- a/qlog/qlog.go +++ b/qlog/qlog.go @@ -10,17 +10,17 @@ import ( "sync" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" "github.com/francoispqt/gojay" ) // Setting of this only works when quic-go is used as a library. // When building a binary from this repository, the version can be set using the following go build flag: -// -ldflags="-X github.com/apernet/quic-go/qlog.quicGoVersion=foobar" +// -ldflags="-X github.com/quic-go/quic-go/qlog.quicGoVersion=foobar" var quicGoVersion = "(devel)" func init() { @@ -32,7 +32,7 @@ func init() { return } for _, d := range info.Deps { - if d.Path == "github.com/apernet/quic-go" { + if d.Path == "github.com/quic-go/quic-go" { quicGoVersion = d.Version if d.Replace != nil { if len(d.Replace.Version) > 0 { diff --git a/qlog/qlog_test.go b/qlog/qlog_test.go index 595617eb918..dc0d2dc1823 100644 --- a/qlog/qlog_test.go +++ b/qlog/qlog_test.go @@ -10,11 +10,11 @@ import ( "os" "time" - "github.com/apernet/quic-go" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/qlog/trace.go b/qlog/trace.go index 657ad70679d..bb1d5bb8ff3 100644 --- a/qlog/trace.go +++ b/qlog/trace.go @@ -3,8 +3,8 @@ package qlog import ( "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/logging" "github.com/francoispqt/gojay" ) diff --git a/qlog/types.go b/qlog/types.go index 2dcc8897c28..c47ad481ea5 100644 --- a/qlog/types.go +++ b/qlog/types.go @@ -3,9 +3,9 @@ package qlog import ( "fmt" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/logging" ) type owner uint8 diff --git a/qlog/types_test.go b/qlog/types_test.go index 64b0893dbef..9213ad311a7 100644 --- a/qlog/types_test.go +++ b/qlog/types_test.go @@ -8,9 +8,9 @@ import ( "runtime" "strconv" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/logging" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/quicvarint/varint.go b/quicvarint/varint.go index e42291beaa8..3f12c07609e 100644 --- a/quicvarint/varint.go +++ b/quicvarint/varint.go @@ -4,7 +4,7 @@ import ( "fmt" "io" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // taken from the QUIC draft diff --git a/receive_stream.go b/receive_stream.go index b4ee4fbc46c..89d02b73797 100644 --- a/receive_stream.go +++ b/receive_stream.go @@ -6,11 +6,11 @@ import ( "sync" "time" - "github.com/apernet/quic-go/internal/flowcontrol" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/flowcontrol" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" ) type receiveStreamI interface { diff --git a/receive_stream_test.go b/receive_stream_test.go index 0127d45b3e1..f3c515e6b2b 100644 --- a/receive_stream_test.go +++ b/receive_stream_test.go @@ -8,9 +8,9 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go/internal/mocks" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/mocks" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/retransmission_queue.go b/retransmission_queue.go index 85de5c10034..909ad6224af 100644 --- a/retransmission_queue.go +++ b/retransmission_queue.go @@ -3,10 +3,10 @@ package quic import ( "fmt" - "github.com/apernet/quic-go/internal/ackhandler" + "github.com/quic-go/quic-go/internal/ackhandler" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) type retransmissionQueue struct { diff --git a/retransmission_queue_test.go b/retransmission_queue_test.go index c14ded73619..c0132848cb4 100644 --- a/retransmission_queue_test.go +++ b/retransmission_queue_test.go @@ -1,8 +1,8 @@ package quic import ( - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/send_conn.go b/send_conn.go index a4777de1332..782b9aee103 100644 --- a/send_conn.go +++ b/send_conn.go @@ -4,7 +4,7 @@ import ( "math" "net" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" ) // A sendConn allows sending using a simple Write() on a non-connected packet conn. diff --git a/send_queue.go b/send_queue.go index 9cb2b9f4db2..a9f7ca1a0ee 100644 --- a/send_queue.go +++ b/send_queue.go @@ -1,6 +1,6 @@ package quic -import "github.com/apernet/quic-go/internal/protocol" +import "github.com/quic-go/quic-go/internal/protocol" type sender interface { Send(p *packetBuffer, packetSize protocol.ByteCount) diff --git a/send_queue_test.go b/send_queue_test.go index 7a8bdbf112a..5a9e6598f2c 100644 --- a/send_queue_test.go +++ b/send_queue_test.go @@ -3,7 +3,7 @@ package quic import ( "errors" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/send_stream.go b/send_stream.go index 0933a8cb295..4113d9f0c15 100644 --- a/send_stream.go +++ b/send_stream.go @@ -6,12 +6,12 @@ import ( "sync" "time" - "github.com/apernet/quic-go/internal/ackhandler" - "github.com/apernet/quic-go/internal/flowcontrol" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/ackhandler" + "github.com/quic-go/quic-go/internal/flowcontrol" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" ) type sendStreamI interface { diff --git a/send_stream_test.go b/send_stream_test.go index c3ce7d9c63d..3356b4200b2 100644 --- a/send_stream_test.go +++ b/send_stream_test.go @@ -12,10 +12,10 @@ import ( "golang.org/x/exp/rand" "github.com/golang/mock/gomock" - "github.com/apernet/quic-go/internal/ackhandler" - "github.com/apernet/quic-go/internal/mocks" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/ackhandler" + "github.com/quic-go/quic-go/internal/mocks" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/server.go b/server.go index 6310440fd07..0f8219e3ae3 100644 --- a/server.go +++ b/server.go @@ -11,12 +11,12 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go/internal/handshake" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/handshake" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" ) // ErrServerClosed is returned by the Listener or EarlyListener's Accept method after a call to Close. diff --git a/server_test.go b/server_test.go index 92c39c26a13..2ba39cf5ef3 100644 --- a/server_test.go +++ b/server_test.go @@ -11,14 +11,14 @@ import ( "sync/atomic" "time" - "github.com/apernet/quic-go/internal/handshake" - mocklogging "github.com/apernet/quic-go/internal/mocks/logging" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/testdata" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/handshake" + mocklogging "github.com/quic-go/quic-go/internal/mocks/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/testdata" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/stream.go b/stream.go index 6286567a6c7..ab76eaf8022 100644 --- a/stream.go +++ b/stream.go @@ -6,10 +6,10 @@ import ( "sync" "time" - "github.com/apernet/quic-go/internal/ackhandler" - "github.com/apernet/quic-go/internal/flowcontrol" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/ackhandler" + "github.com/quic-go/quic-go/internal/flowcontrol" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) type deadlineError struct{} diff --git a/stream_test.go b/stream_test.go index 84f0eb6ad91..e1e3804f9b5 100644 --- a/stream_test.go +++ b/stream_test.go @@ -7,9 +7,9 @@ import ( "strconv" "time" - "github.com/apernet/quic-go/internal/mocks" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/mocks" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/streams_map.go b/streams_map.go index 8e01b4dfd78..b1a80eb36fa 100644 --- a/streams_map.go +++ b/streams_map.go @@ -7,10 +7,10 @@ import ( "net" "sync" - "github.com/apernet/quic-go/internal/flowcontrol" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/flowcontrol" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/wire" ) type streamError struct { diff --git a/streams_map_incoming.go b/streams_map_incoming.go index 1354e634455..18ec6f998b0 100644 --- a/streams_map_incoming.go +++ b/streams_map_incoming.go @@ -4,8 +4,8 @@ import ( "context" "sync" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) type incomingStream interface { diff --git a/streams_map_incoming_test.go b/streams_map_incoming_test.go index 2246fd25135..c3366542de3 100644 --- a/streams_map_incoming_test.go +++ b/streams_map_incoming_test.go @@ -7,8 +7,8 @@ import ( "golang.org/x/exp/rand" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/streams_map_outgoing.go b/streams_map_outgoing.go index 0574d32e424..fd45f4e7cf1 100644 --- a/streams_map_outgoing.go +++ b/streams_map_outgoing.go @@ -4,8 +4,8 @@ import ( "context" "sync" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) type outgoingStream interface { diff --git a/streams_map_outgoing_test.go b/streams_map_outgoing_test.go index 1118af8375d..7b4b28c39de 100644 --- a/streams_map_outgoing_test.go +++ b/streams_map_outgoing_test.go @@ -10,8 +10,8 @@ import ( "golang.org/x/exp/rand" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/streams_map_test.go b/streams_map_test.go index 271d3653ea1..6300ea8d5be 100644 --- a/streams_map_test.go +++ b/streams_map_test.go @@ -8,11 +8,11 @@ import ( "github.com/golang/mock/gomock" - "github.com/apernet/quic-go/internal/flowcontrol" - "github.com/apernet/quic-go/internal/mocks" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/qerr" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/flowcontrol" + "github.com/quic-go/quic-go/internal/mocks" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/qerr" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/sys_conn.go b/sys_conn.go index 1af76bc4c76..ae4df8d091b 100644 --- a/sys_conn.go +++ b/sys_conn.go @@ -6,8 +6,8 @@ import ( "syscall" "time" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) // OOBCapablePacketConn is a connection that allows the reading of ECN bits from the IP header. diff --git a/sys_conn_buffers.go b/sys_conn_buffers.go index b2b64faeaee..8fe49162c01 100644 --- a/sys_conn_buffers.go +++ b/sys_conn_buffers.go @@ -6,8 +6,8 @@ import ( "net" "syscall" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) //go:generate sh -c "echo '// Code generated by go generate. DO NOT EDIT.\n// Source: sys_conn_buffers.go\n' > sys_conn_buffers_write.go && sed -e 's/SetReadBuffer/SetWriteBuffer/g' -e 's/setReceiveBuffer/setSendBuffer/g' -e 's/inspectReadBuffer/inspectWriteBuffer/g' -e 's/protocol\\.DesiredReceiveBufferSize/protocol\\.DesiredSendBufferSize/g' -e 's/forceSetReceiveBuffer/forceSetSendBuffer/g' -e 's/receive buffer/send buffer/g' sys_conn_buffers.go | sed '/^\\/\\/go:generate/d' >> sys_conn_buffers_write.go" diff --git a/sys_conn_buffers_write.go b/sys_conn_buffers_write.go index 0468bbe906b..c01a931b5f7 100644 --- a/sys_conn_buffers_write.go +++ b/sys_conn_buffers_write.go @@ -9,8 +9,8 @@ import ( "net" "syscall" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) func setSendBuffer(c net.PacketConn) error { diff --git a/sys_conn_df_darwin.go b/sys_conn_df_darwin.go index 9dda8cfc467..b51cd8f1a73 100644 --- a/sys_conn_df_darwin.go +++ b/sys_conn_df_darwin.go @@ -10,7 +10,7 @@ import ( "golang.org/x/sys/unix" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/utils" ) func setDF(rawConn syscall.RawConn) (bool, error) { @@ -39,7 +39,7 @@ func setDF(rawConn syscall.RawConn) (bool, error) { // On macOS, the syscall for setting DF bit for IPv4 fails on dual-stack listeners. // Treat the connection as not having DF enabled, even though the DF bit will be set // when used for IPv6. - // See https://github.com/apernet/quic-go/issues/3793 for details. + // See https://github.com/quic-go/quic-go/issues/3793 for details. return false, nil case errDFIPv4 != nil && errDFIPv6 != nil: return false, errors.New("setting DF failed for both IPv4 and IPv6") diff --git a/sys_conn_df_linux.go b/sys_conn_df_linux.go index 010a3522b5a..3985bee7652 100644 --- a/sys_conn_df_linux.go +++ b/sys_conn_df_linux.go @@ -12,7 +12,7 @@ import ( "golang.org/x/sys/unix" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/utils" ) func setDF(rawConn syscall.RawConn) (bool, error) { diff --git a/sys_conn_df_windows.go b/sys_conn_df_windows.go index 9c390115000..850d620ddd5 100644 --- a/sys_conn_df_windows.go +++ b/sys_conn_df_windows.go @@ -8,7 +8,7 @@ import ( "golang.org/x/sys/windows" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/utils" ) const ( diff --git a/sys_conn_oob.go b/sys_conn_oob.go index 4c6ac2a4d98..84d5e7e6492 100644 --- a/sys_conn_oob.go +++ b/sys_conn_oob.go @@ -17,8 +17,8 @@ import ( "golang.org/x/net/ipv6" "golang.org/x/sys/unix" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" ) const ( diff --git a/sys_conn_oob_test.go b/sys_conn_oob_test.go index 851a8e18044..30b333b971f 100644 --- a/sys_conn_oob_test.go +++ b/sys_conn_oob_test.go @@ -10,8 +10,8 @@ import ( "golang.org/x/net/ipv4" "golang.org/x/sys/unix" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/sys_conn_test.go b/sys_conn_test.go index 5090e53afb8..418e2c31d07 100644 --- a/sys_conn_test.go +++ b/sys_conn_test.go @@ -4,7 +4,7 @@ import ( "net" "time" - "github.com/apernet/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/protocol" "github.com/golang/mock/gomock" diff --git a/token_store.go b/token_store.go index 94fbab92d4c..00460e50285 100644 --- a/token_store.go +++ b/token_store.go @@ -3,8 +3,8 @@ package quic import ( "sync" - "github.com/apernet/quic-go/internal/utils" - list "github.com/apernet/quic-go/internal/utils/linkedlist" + "github.com/quic-go/quic-go/internal/utils" + list "github.com/quic-go/quic-go/internal/utils/linkedlist" ) type singleOriginTokenStore struct { diff --git a/transport.go b/transport.go index fee910f8f3c..b80b7c2cdc8 100644 --- a/transport.go +++ b/transport.go @@ -9,11 +9,11 @@ import ( "sync" "time" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/wire" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/utils" - "github.com/apernet/quic-go/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/utils" + "github.com/quic-go/quic-go/logging" ) // The Transport is the central point to manage incoming and outgoing QUIC connections. @@ -315,7 +315,7 @@ func (t *Transport) listen(conn rawConn) { //nolint:staticcheck // SA1019 ignore this! // TODO: This code is used to ignore wsa errors on Windows. // Since net.Error.Temporary is deprecated as of Go 1.18, we should find a better solution. - // See https://github.com/apernet/quic-go/issues/1737 for details. + // See https://github.com/quic-go/quic-go/issues/1737 for details. if nerr, ok := err.(net.Error); ok && nerr.Temporary() { t.mutex.Lock() closed := t.closed diff --git a/transport_test.go b/transport_test.go index 3d40ed2001a..f46affb3dd9 100644 --- a/transport_test.go +++ b/transport_test.go @@ -9,10 +9,10 @@ import ( "syscall" "time" - mocklogging "github.com/apernet/quic-go/internal/mocks/logging" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" - "github.com/apernet/quic-go/logging" + mocklogging "github.com/quic-go/quic-go/internal/mocks/logging" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" + "github.com/quic-go/quic-go/logging" "github.com/golang/mock/gomock" . "github.com/onsi/ginkgo/v2" diff --git a/window_update_queue.go b/window_update_queue.go index 0a3b3500d51..9ed121430e1 100644 --- a/window_update_queue.go +++ b/window_update_queue.go @@ -3,9 +3,9 @@ package quic import ( "sync" - "github.com/apernet/quic-go/internal/flowcontrol" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/flowcontrol" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" ) type windowUpdateQueue struct { diff --git a/window_update_queue_test.go b/window_update_queue_test.go index c29a910b508..492fd5964aa 100644 --- a/window_update_queue_test.go +++ b/window_update_queue_test.go @@ -1,9 +1,9 @@ package quic import ( - "github.com/apernet/quic-go/internal/mocks" - "github.com/apernet/quic-go/internal/protocol" - "github.com/apernet/quic-go/internal/wire" + "github.com/quic-go/quic-go/internal/mocks" + "github.com/quic-go/quic-go/internal/protocol" + "github.com/quic-go/quic-go/internal/wire" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" From 38b703e9aecd8fce2269629ca13d7674c493b86a Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 5 Aug 2023 10:02:24 -0400 Subject: [PATCH 11/14] add error handling when confirming handshake on HANDSHAKE_DONE frames (#4017) --- connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connection.go b/connection.go index eede6929e02..61e96c286fd 100644 --- a/connection.go +++ b/connection.go @@ -1475,7 +1475,7 @@ func (s *connection) handleHandshakeDoneFrame() error { } } if !s.handshakeConfirmed { - s.handleHandshakeConfirmed() + return s.handleHandshakeConfirmed() } return nil } From 4eedeb073ff6f6538189eab03dd253149675f015 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 5 Aug 2023 16:00:11 -0400 Subject: [PATCH 12/14] add tls.ClientHelloInfo.Conn for recursive GetConfigForClient calls (#4016) --- integrationtests/self/handshake_test.go | 37 +++------- internal/handshake/crypto_setup.go | 36 ++++++---- internal/handshake/crypto_setup_test.go | 92 +++++++++++++++++++++---- 3 files changed, 112 insertions(+), 53 deletions(-) diff --git a/integrationtests/self/handshake_test.go b/integrationtests/self/handshake_test.go index f23ae77cc9e..cccff8a6fe8 100644 --- a/integrationtests/self/handshake_test.go +++ b/integrationtests/self/handshake_test.go @@ -142,13 +142,20 @@ var _ = Describe("Handshake tests", func() { It("has the right local and remote address on the tls.Config.GetConfigForClient ClientHelloInfo.Conn", func() { var local, remote net.Addr + var local2, remote2 net.Addr done := make(chan struct{}) tlsConf := &tls.Config{ GetConfigForClient: func(info *tls.ClientHelloInfo) (*tls.Config, error) { - defer close(done) local = info.Conn.LocalAddr() remote = info.Conn.RemoteAddr() - return getTLSConfig(), nil + conf := getTLSConfig() + conf.GetCertificate = func(info *tls.ClientHelloInfo) (*tls.Certificate, error) { + defer close(done) + local2 = info.Conn.LocalAddr() + remote2 = info.Conn.RemoteAddr() + return &(conf.Certificates[0]), nil + } + return conf, nil }, } runServer(tlsConf) @@ -162,30 +169,8 @@ var _ = Describe("Handshake tests", func() { Eventually(done).Should(BeClosed()) Expect(server.Addr()).To(Equal(local)) Expect(conn.LocalAddr().(*net.UDPAddr).Port).To(Equal(remote.(*net.UDPAddr).Port)) - }) - - It("has the right local and remote address on the tls.Config.GetCertificate ClientHelloInfo.Conn", func() { - var local, remote net.Addr - done := make(chan struct{}) - tlsConf := getTLSConfig() - tlsConf.GetCertificate = func(info *tls.ClientHelloInfo) (*tls.Certificate, error) { - defer close(done) - local = info.Conn.LocalAddr() - remote = info.Conn.RemoteAddr() - cert := tlsConf.Certificates[0] - return &cert, nil - } - runServer(tlsConf) - conn, err := quic.DialAddr( - context.Background(), - fmt.Sprintf("localhost:%d", server.Addr().(*net.UDPAddr).Port), - getTLSClientConfig(), - getQuicConfig(nil), - ) - Expect(err).ToNot(HaveOccurred()) - Eventually(done).Should(BeClosed()) - Expect(server.Addr()).To(Equal(local)) - Expect(conn.LocalAddr().(*net.UDPAddr).Port).To(Equal(remote.(*net.UDPAddr).Port)) + Expect(local).To(Equal(local2)) + Expect(remote).To(Equal(remote2)) }) It("works with a long certificate chain", func() { diff --git a/internal/handshake/crypto_setup.go b/internal/handshake/crypto_setup.go index 7011a6fce83..543e70e0f0b 100644 --- a/internal/handshake/crypto_setup.go +++ b/internal/handshake/crypto_setup.go @@ -127,25 +127,37 @@ func NewCryptoSetupServer( quicConf := &qtls.QUICConfig{TLSConfig: tlsConf} qtls.SetupConfigForServer(quicConf, cs.allow0RTT, cs.getDataForSessionTicket, cs.accept0RTT) - if quicConf.TLSConfig.GetConfigForClient != nil { - gcfc := quicConf.TLSConfig.GetConfigForClient - quicConf.TLSConfig.GetConfigForClient = func(info *tls.ClientHelloInfo) (*tls.Config, error) { + addConnToClientHelloInfo(quicConf.TLSConfig, localAddr, remoteAddr) + + cs.tlsConf = quicConf.TLSConfig + cs.conn = qtls.QUICServer(quicConf) + + return cs +} + +// The tls.Config contains two callbacks that pass in a tls.ClientHelloInfo. +// Since crypto/tls doesn't do it, we need to make sure to set the Conn field with a fake net.Conn +// that allows the caller to get the local and the remote address. +func addConnToClientHelloInfo(conf *tls.Config, localAddr, remoteAddr net.Addr) { + if conf.GetConfigForClient != nil { + gcfc := conf.GetConfigForClient + conf.GetConfigForClient = func(info *tls.ClientHelloInfo) (*tls.Config, error) { info.Conn = &conn{localAddr: localAddr, remoteAddr: remoteAddr} - return gcfc(info) + c, err := gcfc(info) + if c != nil { + // We're returning a tls.Config here, so we need to apply this recursively. + addConnToClientHelloInfo(c, localAddr, remoteAddr) + } + return c, err } } - if quicConf.TLSConfig.GetCertificate != nil { - gc := quicConf.TLSConfig.GetCertificate - quicConf.TLSConfig.GetCertificate = func(info *tls.ClientHelloInfo) (*tls.Certificate, error) { + if conf.GetCertificate != nil { + gc := conf.GetCertificate + conf.GetCertificate = func(info *tls.ClientHelloInfo) (*tls.Certificate, error) { info.Conn = &conn{localAddr: localAddr, remoteAddr: remoteAddr} return gc(info) } } - - cs.tlsConf = quicConf.TLSConfig - cs.conn = qtls.QUICServer(quicConf) - - return cs } func newCryptoSetup( diff --git a/internal/handshake/crypto_setup_test.go b/internal/handshake/crypto_setup_test.go index 4b210d20747..8b2c5efe95b 100644 --- a/internal/handshake/crypto_setup_test.go +++ b/internal/handshake/crypto_setup_test.go @@ -29,6 +29,25 @@ const ( ) var _ = Describe("Crypto Setup TLS", func() { + generateCert := func() tls.Certificate { + priv, err := rsa.GenerateKey(rand.Reader, 2048) + Expect(err).ToNot(HaveOccurred()) + tmpl := &x509.Certificate{ + SerialNumber: big.NewInt(1), + Subject: pkix.Name{}, + SignatureAlgorithm: x509.SHA256WithRSA, + NotBefore: time.Now(), + NotAfter: time.Now().Add(time.Hour), // valid for an hour + BasicConstraintsValid: true, + } + certDER, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, priv.Public(), priv) + Expect(err).ToNot(HaveOccurred()) + return tls.Certificate{ + PrivateKey: priv, + Certificate: [][]byte{certDER}, + } + } + var clientConf, serverConf *tls.Config BeforeEach(func() { @@ -86,26 +105,69 @@ var _ = Describe("Crypto Setup TLS", func() { Expect(err.Error()).To(ContainSubstring("tls: handshake data received at wrong level")) }) - Context("doing the handshake", func() { - generateCert := func() tls.Certificate { - priv, err := rsa.GenerateKey(rand.Reader, 2048) + Context("filling in a net.Conn in tls.ClientHelloInfo", func() { + var ( + local = &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 42} + remote = &net.UDPAddr{IP: net.IPv4(192, 168, 0, 1), Port: 1337} + ) + + It("wraps GetCertificate", func() { + var localAddr, remoteAddr net.Addr + tlsConf := &tls.Config{ + GetCertificate: func(info *tls.ClientHelloInfo) (*tls.Certificate, error) { + localAddr = info.Conn.LocalAddr() + remoteAddr = info.Conn.RemoteAddr() + cert := generateCert() + return &cert, nil + }, + } + addConnToClientHelloInfo(tlsConf, local, remote) + _, err := tlsConf.GetCertificate(&tls.ClientHelloInfo{}) Expect(err).ToNot(HaveOccurred()) - tmpl := &x509.Certificate{ - SerialNumber: big.NewInt(1), - Subject: pkix.Name{}, - SignatureAlgorithm: x509.SHA256WithRSA, - NotBefore: time.Now(), - NotAfter: time.Now().Add(time.Hour), // valid for an hour - BasicConstraintsValid: true, + Expect(localAddr).To(Equal(local)) + Expect(remoteAddr).To(Equal(remote)) + }) + + It("wraps GetConfigForClient", func() { + var localAddr, remoteAddr net.Addr + tlsConf := &tls.Config{ + GetConfigForClient: func(info *tls.ClientHelloInfo) (*tls.Config, error) { + localAddr = info.Conn.LocalAddr() + remoteAddr = info.Conn.RemoteAddr() + return &tls.Config{}, nil + }, } - certDER, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, priv.Public(), priv) + addConnToClientHelloInfo(tlsConf, local, remote) + _, err := tlsConf.GetConfigForClient(&tls.ClientHelloInfo{}) Expect(err).ToNot(HaveOccurred()) - return tls.Certificate{ - PrivateKey: priv, - Certificate: [][]byte{certDER}, + Expect(localAddr).To(Equal(local)) + Expect(remoteAddr).To(Equal(remote)) + }) + + It("wraps GetConfigForClient, recursively", func() { + var localAddr, remoteAddr net.Addr + tlsConf := &tls.Config{} + tlsConf.GetConfigForClient = func(info *tls.ClientHelloInfo) (*tls.Config, error) { + conf := tlsConf.Clone() + conf.GetCertificate = func(info *tls.ClientHelloInfo) (*tls.Certificate, error) { + localAddr = info.Conn.LocalAddr() + remoteAddr = info.Conn.RemoteAddr() + cert := generateCert() + return &cert, nil + } + return conf, nil } - } + addConnToClientHelloInfo(tlsConf, local, remote) + conf, err := tlsConf.GetConfigForClient(&tls.ClientHelloInfo{}) + Expect(err).ToNot(HaveOccurred()) + _, err = conf.GetCertificate(&tls.ClientHelloInfo{}) + Expect(err).ToNot(HaveOccurred()) + Expect(localAddr).To(Equal(local)) + Expect(remoteAddr).To(Equal(remote)) + }) + }) + Context("doing the handshake", func() { newRTTStatsWithRTT := func(rtt time.Duration) *utils.RTTStats { rttStats := &utils.RTTStats{} rttStats.UpdateRTT(rtt, 0, time.Now()) From b6a4725b60f1fe04e8f1ddcc3114e290fcea1617 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 5 Aug 2023 18:25:04 -0400 Subject: [PATCH 13/14] fix handling of ACK frames serialized after CRYPTO frames (#4018) --- connection.go | 31 ++++++++++++++++++++----- connection_test.go | 57 ++++++++++------------------------------------ 2 files changed, 37 insertions(+), 51 deletions(-) diff --git a/connection.go b/connection.go index 61e96c286fd..cca816fc26c 100644 --- a/connection.go +++ b/connection.go @@ -718,20 +718,22 @@ func (s *connection) idleTimeoutStartTime() time.Time { } func (s *connection) handleHandshakeComplete() error { - s.handshakeComplete = true defer s.handshakeCtxCancel() // Once the handshake completes, we have derived 1-RTT keys. - // There's no point in queueing undecryptable packets for later decryption any more. + // There's no point in queueing undecryptable packets for later decryption anymore. s.undecryptablePackets = nil s.connIDManager.SetHandshakeComplete() s.connIDGenerator.SetHandshakeComplete() + // The server applies transport parameters right away, but the client side has to wait for handshake completion. + // During a 0-RTT connection, the client is only allowed to use the new transport parameters for 1-RTT packets. if s.perspective == protocol.PerspectiveClient { s.applyTransportParameters() return nil } + // All these only apply to the server side. if err := s.handleHandshakeConfirmed(); err != nil { return err } @@ -1229,6 +1231,7 @@ func (s *connection) handleFrames( if log != nil { frames = make([]logging.Frame, 0, 4) } + handshakeWasComplete := s.handshakeComplete var handleErr error for len(data) > 0 { l, frame, err := s.frameParser.ParseNext(data, encLevel, s.version) @@ -1265,6 +1268,17 @@ func (s *connection) handleFrames( return false, handleErr } } + + // Handle completion of the handshake after processing all the frames. + // This ensures that we correctly handle the following case on the server side: + // We receive a Handshake packet that contains the CRYPTO frame that allows us to complete the handshake, + // and an ACK serialized after that CRYPTO frame. In this case, we still want to process the ACK frame. + if !handshakeWasComplete && s.handshakeComplete { + if err := s.handleHandshakeComplete(); err != nil { + return false, err + } + } + return } @@ -1360,7 +1374,9 @@ func (s *connection) handleHandshakeEvents() error { case handshake.EventNoEvent: return nil case handshake.EventHandshakeComplete: - err = s.handleHandshakeComplete() + // Don't call handleHandshakeComplete yet. + // It's advantageous to process ACK frames that might be serialized after the CRYPTO frame first. + s.handshakeComplete = true case handshake.EventReceivedTransportParameters: err = s.handleTransportParameters(ev.TransportParameters) case handshake.EventRestoredTransportParameters: @@ -1488,6 +1504,9 @@ func (s *connection) handleAckFrame(frame *wire.AckFrame, encLevel protocol.Encr if !acked1RTTPacket { return nil } + // On the client side: If the packet acknowledged a 1-RTT packet, this confirms the handshake. + // This is only possible if the ACK was sent in a 1-RTT packet. + // This is an optimization over simply waiting for a HANDSHAKE_DONE frame, see section 4.1.2 of RFC 9001. if s.perspective == protocol.PerspectiveClient && !s.handshakeConfirmed { if err := s.handleHandshakeConfirmed(); err != nil { return err @@ -1659,6 +1678,9 @@ func (s *connection) restoreTransportParameters(params *wire.TransportParameters } func (s *connection) handleTransportParameters(params *wire.TransportParameters) error { + if s.tracer != nil { + s.tracer.ReceivedTransportParameters(params) + } if err := s.checkTransportParameters(params); err != nil { return &qerr.TransportError{ ErrorCode: qerr.TransportParameterError, @@ -1685,9 +1707,6 @@ func (s *connection) checkTransportParameters(params *wire.TransportParameters) if s.logger.Debug() { s.logger.Debugf("Processed Transport Parameters: %s", params) } - if s.tracer != nil { - s.tracer.ReceivedTransportParameters(params) - } // check the initial_source_connection_id if params.InitialSourceConnectionID != s.handshakeDestConnID { diff --git a/connection_test.go b/connection_test.go index 20e9872b4bf..724336d678b 100644 --- a/connection_test.go +++ b/connection_test.go @@ -1891,7 +1891,6 @@ var _ = Describe("Connection", func() { It("cancels the HandshakeComplete context when the handshake completes", func() { packer.EXPECT().PackCoalescedPacket(false, gomock.Any(), conn.version).AnyTimes() - finishHandshake := make(chan struct{}) sph := mockackhandler.NewMockSentPacketHandler(mockCtrl) conn.sentPacketHandler = sph tracer.EXPECT().DroppedEncryptionLevel(protocol.EncryptionHandshake) @@ -1901,53 +1900,26 @@ var _ = Describe("Connection", func() { sph.EXPECT().DropPackets(protocol.EncryptionHandshake) sph.EXPECT().SetHandshakeConfirmed() connRunner.EXPECT().Retire(clientDestConnID) - go func() { - defer GinkgoRecover() - <-finishHandshake - cryptoSetup.EXPECT().StartHandshake() - cryptoSetup.EXPECT().NextEvent().Return(handshake.Event{Kind: handshake.EventHandshakeComplete}) - cryptoSetup.EXPECT().NextEvent().Return(handshake.Event{Kind: handshake.EventNoEvent}) - cryptoSetup.EXPECT().SetHandshakeConfirmed() - cryptoSetup.EXPECT().GetSessionTicket() - conn.run() - }() + cryptoSetup.EXPECT().SetHandshakeConfirmed() + cryptoSetup.EXPECT().GetSessionTicket() handshakeCtx := conn.HandshakeComplete() Consistently(handshakeCtx).ShouldNot(BeClosed()) - close(finishHandshake) + Expect(conn.handleHandshakeComplete()).To(Succeed()) Eventually(handshakeCtx).Should(BeClosed()) - // make sure the go routine returns - streamManager.EXPECT().CloseWithError(gomock.Any()) - expectReplaceWithClosed() - packer.EXPECT().PackApplicationClose(gomock.Any(), gomock.Any(), conn.version).Return(&coalescedPacket{buffer: getPacketBuffer()}, nil) - cryptoSetup.EXPECT().Close() - mconn.EXPECT().Write(gomock.Any(), gomock.Any()) - tracer.EXPECT().ClosedConnection(gomock.Any()) - tracer.EXPECT().Close() - conn.shutdown() - Eventually(conn.Context().Done()).Should(BeClosed()) }) It("sends a session ticket when the handshake completes", func() { const size = protocol.MaxPostHandshakeCryptoFrameSize * 3 / 2 packer.EXPECT().PackCoalescedPacket(false, gomock.Any(), conn.version).AnyTimes() - finishHandshake := make(chan struct{}) connRunner.EXPECT().Retire(clientDestConnID) conn.sentPacketHandler.DropPackets(protocol.EncryptionInitial) tracer.EXPECT().DroppedEncryptionLevel(protocol.EncryptionHandshake) - go func() { - defer GinkgoRecover() - <-finishHandshake - cryptoSetup.EXPECT().StartHandshake() - cryptoSetup.EXPECT().NextEvent().Return(handshake.Event{Kind: handshake.EventHandshakeComplete}) - cryptoSetup.EXPECT().NextEvent().Return(handshake.Event{Kind: handshake.EventNoEvent}) - cryptoSetup.EXPECT().SetHandshakeConfirmed() - cryptoSetup.EXPECT().GetSessionTicket().Return(make([]byte, size), nil) - conn.run() - }() + cryptoSetup.EXPECT().SetHandshakeConfirmed() + cryptoSetup.EXPECT().GetSessionTicket().Return(make([]byte, size), nil) handshakeCtx := conn.HandshakeComplete() Consistently(handshakeCtx).ShouldNot(BeClosed()) - close(finishHandshake) + Expect(conn.handleHandshakeComplete()).To(Succeed()) var frames []ackhandler.Frame Eventually(func() []ackhandler.Frame { frames, _ = conn.framer.AppendControlFrames(nil, protocol.MaxByteCount, protocol.Version1) @@ -1963,16 +1935,6 @@ var _ = Describe("Connection", func() { } } Expect(size).To(BeEquivalentTo(s)) - // make sure the go routine returns - streamManager.EXPECT().CloseWithError(gomock.Any()) - expectReplaceWithClosed() - packer.EXPECT().PackApplicationClose(gomock.Any(), gomock.Any(), conn.version).Return(&coalescedPacket{buffer: getPacketBuffer()}, nil) - cryptoSetup.EXPECT().Close() - mconn.EXPECT().Write(gomock.Any(), gomock.Any()) - tracer.EXPECT().ClosedConnection(gomock.Any()) - tracer.EXPECT().Close() - conn.shutdown() - Eventually(conn.Context().Done()).Should(BeClosed()) }) It("doesn't cancel the HandshakeComplete context when the handshake fails", func() { @@ -2027,6 +1989,7 @@ var _ = Describe("Connection", func() { cryptoSetup.EXPECT().SetHandshakeConfirmed() cryptoSetup.EXPECT().GetSessionTicket() mconn.EXPECT().Write(gomock.Any(), gomock.Any()) + Expect(conn.handleHandshakeComplete()).To(Succeed()) conn.run() }() Eventually(done).Should(BeClosed()) @@ -2350,6 +2313,7 @@ var _ = Describe("Connection", func() { cryptoSetup.EXPECT().NextEvent().Return(handshake.Event{Kind: handshake.EventNoEvent}) cryptoSetup.EXPECT().GetSessionTicket().MaxTimes(1) cryptoSetup.EXPECT().SetHandshakeConfirmed().MaxTimes(1) + Expect(conn.handleHandshakeComplete()).To(Succeed()) err := conn.run() nerr, ok := err.(net.Error) Expect(ok).To(BeTrue()) @@ -2867,7 +2831,10 @@ var _ = Describe("Client Connection", func() { TransportParameters: params, }) cryptoSetup.EXPECT().NextEvent().Return(handshake.Event{Kind: handshake.EventHandshakeComplete}).MaxTimes(1) - cryptoSetup.EXPECT().NextEvent().Return(handshake.Event{Kind: handshake.EventNoEvent}).MaxTimes(1) + cryptoSetup.EXPECT().NextEvent().Return(handshake.Event{Kind: handshake.EventNoEvent}).MaxTimes(1).Do(func() { + defer GinkgoRecover() + Expect(conn.handleHandshakeComplete()).To(Succeed()) + }) errChan <- conn.run() close(errChan) }() From 4345a2ddbf45a4964afcb010fc7878080483c2b4 Mon Sep 17 00:00:00 2001 From: elagergren-spideroak <36516532+elagergren-spideroak@users.noreply.github.com> Date: Wed, 9 Aug 2023 05:22:30 -0700 Subject: [PATCH 14/14] fix compatibility with API breaking change in Go 1.21 (#4020) * add Go 1.21 compatibility Signed-off-by: Eric Lagergren * refactor for Go 1.20 Signed-off-by: Eric Lagergren --------- Signed-off-by: Eric Lagergren --- .github/workflows/cross-compile.yml | 2 +- .github/workflows/integration.yml | 2 +- .github/workflows/unit.yml | 2 +- internal/handshake/crypto_setup.go | 2 +- internal/qtls/go120.go | 4 ++++ internal/qtls/go121.go | 19 +++++++++++++------ 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cross-compile.yml b/.github/workflows/cross-compile.yml index 042953f8c50..46309b0ae7e 100644 --- a/.github/workflows/cross-compile.yml +++ b/.github/workflows/cross-compile.yml @@ -4,7 +4,7 @@ jobs: strategy: fail-fast: false matrix: - go: [ "1.20.x", "1.21.0-rc.3" ] + go: [ "1.20.x", "1.21.x" ] runs-on: ${{ fromJSON(vars['CROSS_COMPILE_RUNNER_UBUNTU'] || '"ubuntu-latest"') }} name: "Cross Compilation (Go ${{matrix.go}})" steps: diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 362a24ecb9c..7ad8f5bab7d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -5,7 +5,7 @@ jobs: strategy: fail-fast: false matrix: - go: [ "1.20.x", "1.21.0-rc.3" ] + go: [ "1.20.x", "1.21.x" ] runs-on: ${{ fromJSON(vars['INTEGRATION_RUNNER_UBUNTU'] || '"ubuntu-latest"') }} env: DEBUG: false # set this to true to export qlogs and save them as artifacts diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index fb21749fc17..c9eff032476 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -7,7 +7,7 @@ jobs: fail-fast: false matrix: os: [ "ubuntu", "windows", "macos" ] - go: [ "1.20.x", "1.21.0-rc.3" ] + go: [ "1.20.x", "1.21.x" ] runs-on: ${{ fromJSON(vars[format('UNIT_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }} name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }}) steps: diff --git a/internal/handshake/crypto_setup.go b/internal/handshake/crypto_setup.go index 543e70e0f0b..35d65b5eecb 100644 --- a/internal/handshake/crypto_setup.go +++ b/internal/handshake/crypto_setup.go @@ -359,7 +359,7 @@ func (h *cryptoSetup) GetSessionTicket() ([]byte, error) { if h.tlsConf.SessionTicketsDisabled { return nil, nil } - if err := h.conn.SendSessionTicket(h.allow0RTT); err != nil { + if err := qtls.SendSessionTicket(h.conn, h.allow0RTT); err != nil { return nil, err } ev := h.conn.NextEvent() diff --git a/internal/qtls/go120.go b/internal/qtls/go120.go index 595e6e663ba..3b50441c47c 100644 --- a/internal/qtls/go120.go +++ b/internal/qtls/go120.go @@ -139,3 +139,7 @@ func SetCipherSuite(id uint16) (reset func()) { cipherSuitesModified = false } } + +func SendSessionTicket(c *QUICConn, allow0RTT bool) error { + return c.SendSessionTicket(allow0RTT) +} diff --git a/internal/qtls/go121.go b/internal/qtls/go121.go index 1137556e6a4..4aebc4a14c3 100644 --- a/internal/qtls/go121.go +++ b/internal/qtls/go121.go @@ -11,12 +11,13 @@ import ( ) type ( - QUICConn = tls.QUICConn - QUICConfig = tls.QUICConfig - QUICEvent = tls.QUICEvent - QUICEventKind = tls.QUICEventKind - QUICEncryptionLevel = tls.QUICEncryptionLevel - AlertError = tls.AlertError + QUICConn = tls.QUICConn + QUICConfig = tls.QUICConfig + QUICEvent = tls.QUICEvent + QUICEventKind = tls.QUICEventKind + QUICEncryptionLevel = tls.QUICEncryptionLevel + QUICSessionTicketOptions = tls.QUICSessionTicketOptions + AlertError = tls.AlertError ) const ( @@ -152,3 +153,9 @@ func findExtraData(extras [][]byte) []byte { } return nil } + +func SendSessionTicket(c *QUICConn, allow0RTT bool) error { + return c.SendSessionTicket(tls.QUICSessionTicketOptions{ + EarlyData: allow0RTT, + }) +}