Commit Graph

6299 Commits

Author SHA1 Message Date
Marten Seemann
198de32ef6 don't enqueue stream for sending on reordered MAX_STREAM_DATA frames (#4269) 2024-02-02 22:02:13 -08:00
Marten Seemann
07ec3245bd logging: add a Close function to the Tracer (#4298)
* logging: add a Close function to the Tracer

* close the Tracer when the Transport is closed
2024-02-02 21:12:15 -08:00
Marten Seemann
b675e34254 logging: add a Debug function to the Tracer (#4297) 2024-02-02 20:21:27 -08:00
Marten Seemann
225d2a3926 qlog: disentangle the ConnectionTracer from the qlog writer (#4300)
The qlog writer simply records events, puts them into a channel, and
consumes these events in a separate Go routine (by serializing them).

The ConnectionTracer is the one generating those events.
2024-02-02 02:00:15 -08:00
Marten Seemann
0344401de5 qlog: rename qlog.go to connection_tracer.go (#4301) 2024-02-02 01:45:51 -08:00
Marten Seemann
f3c4be6b01 qlog: remove unneeded mutex from the ConnectionTracer (#4299)
Events are appended to a channel, which is able to handle concurrect writes.
2024-02-01 15:57:07 -08:00
Marten Seemann
2fbe713bb6 protocol: don't capitalize Perspective.String (#4296) 2024-02-01 15:16:36 -08:00
Marten Seemann
0582e931a5 wire: optimize generation of Version Negotiation packets (#4278)
* wire: optimize generation of Version Negotiation packets

* protocol: optimize adding greased version numbers
2024-01-31 23:54:04 -08:00
Marten Seemann
fbaa941ea1 protocol: rename VersionNumber to Version (#4295) 2024-01-31 21:57:33 -08:00
Marten Seemann
69ba7acb9f ackhandler: don't delay ACKs for Initial and Handshake packets (#4288)
* ackhandler: don't delay ACKs for Initial and Handshake packets

* ackhandler: embed the receivedPacketHistory
2024-01-31 19:13:53 -08:00
Marten Seemann
72c79dbdf5 testutils: expose aliases for all frame types (#4293) 2024-01-30 21:47:03 -08:00
Marten Seemann
86441f1fdc ci: make Codecov ignore testutils and testdata (#4292) 2024-01-30 21:22:40 -08:00
Marten Seemann
e65e99f1d6 ci: remove unused depguard check for qtls (#4291)
Fortunately, qtls is a thing of the past.
2024-01-30 19:30:11 -08:00
Marten Seemann
da25787a3d testutils: make the package public (#4290)
This package can be useful outside of quic-go. We're not making any API
guarantees at this point.
2024-01-30 19:00:08 -08:00
Marten Seemann
d330d2e30d remove unused RTTStats from the received packet handler (#4287) 2024-01-30 01:02:30 -08:00
Marten Seemann
be4838bd64 wire: remove FrameParser interface, expose FrameParser struct (#4284)
Instead, expose the FrameParser struct. This allows us to embed it
directly into the connection struct, avoiding a pointer indirection.
2024-01-28 22:34:28 -08:00
Marten Seemann
34c4d89e8b fix flaky outgoing streams map test (#4283) 2024-01-28 21:52:32 -08:00
Marten Seemann
03ba124241 testutils: add a perspective function parameter to ComposeInitialPacket (#4276)
Currently not used, but this is useful when crafting Initial packets
sent from the client. No functional change expected.
2024-01-28 21:30:23 -08:00
Marten Seemann
940feef063 only log the discarding of Handshake keys once (#4274) 2024-01-28 20:51:22 -08:00
Marten Seemann
9b83ac230b fix flaky handshake limiting test (#4281) 2024-01-28 20:26:03 -08:00
Marten Seemann
c82c37a31c fix flaky accept queue test (#4280) 2024-01-28 20:14:02 -08:00
taoso
808f849ca2 http3: only use :protocol pseudo-header for Extended CONNECT (#4261)
* Fix protocol

The default value should be "HTTP/3.0".

* Reject normal request with :protocol header

The :protocol pseudo header is only defined for
Extended Connect requests (RFC 9220).

* save one branch check

* Fix review issue
2024-01-25 19:07:35 -08:00
Marten Seemann
d3974e1674 fix flaky handshake limiting test (#4270) 2024-01-25 00:53:20 -08:00
Marten Seemann
baeec0f41c ci: update to Go 1.22rc2 (#4267) 2024-01-24 19:16:17 -08:00
Marten Seemann
2a7a11f4c0 remove unneeded nil check for new connections in the server (#4260) 2024-01-23 21:45:03 -08:00
Marten Seemann
a968e254a1 fix incorrect statement about connection ID lengths in the Transport (#4247) 2024-01-23 21:22:28 -08:00
Marten Seemann
a2cf43d75c remove the RequireAddressValidation callback from the Config (#4253) 2024-01-22 21:24:07 -08:00
Marten Seemann
892851eb8c add Transport config options to limit the number of handshakes (#4248)
* add Transport config options to limit the number of handshakes

* fix accounting for failed handshakes

* increase handshake limits, improve documentation
2024-01-22 21:04:25 -08:00
putyWang
bda5b7e6dc handshake: fix documentation for updatableAEAD.SetWriteKey (#4256) 2024-01-22 19:30:50 -08:00
Marten Seemann
4407c60f04 handshake: unexport Set{Read,Write}Key methods on the cryptoSetup (#4254)
No functional change expected.
These methods were exported since they were passed to the old qtls API.
2024-01-19 20:44:09 -08:00
Marten Seemann
594440b04c don't remove closed connections from the server's accept queue (#4245) 2024-01-18 22:45:38 -08:00
Marten Seemann
cb1775a08a send out the CONNECTION_REFUSED error when refusing a connection (#4250)
So far, we used Connection.destroy, which destroys a connection without
sending out a CONNECTION_CLOSE frame. This is useful (for example) when
receiving a stateless reset, but it's not what we want when the server
refuses an incoming connection. In this case, we want to send out a
packet with a CONNECTION_CLOSE frame to inform the client that the
connection attempt is being rejected.
2024-01-18 22:29:22 -08:00
Marten Seemann
b3eb375bc1 remove shutdown method on the Connection (#4249)
There's no need to have a dedicated shutdown method, as the use case
(shutting down an outgoing connection attempt on context cancellation)
can be achieved by using Connection.destroy.
2024-01-18 22:06:04 -08:00
Marten Seemann
d3c2020ecd http3: add a basic README (#4246) v0.41.0 2024-01-16 19:34:10 -08:00
Marten Seemann
3449ace5a6 example: remove -qlog flag in favor of QLOGDIR (#4243) 2024-01-13 18:30:59 -08:00
Marten Seemann
13327521a5 example: remove -v flag and custom logger configuration (#4242)
Users can adjust the log level using the QUIC_GO_LOG_LEVEL environment
variable. This is more representative of how quic-go would actually be
used, since the logger is part of an internal package.
2024-01-13 01:59:58 -08:00
Benedikt Spies
2cd9ed38f1 qlog: add a default tracer that writes to QLOGDIR (#4233)
* add qlog default tracer which writes to QLOGDIR

* gofumpt

* add qlog default tracer which writes to QLOGDIR

* fix flaky tests

* Update README.md

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* Update README.md

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* Update README.md

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* Update README.md

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2024-01-12 03:11:53 -08:00
Marten Seemann
1e874896cd wire: improve logging of connection ID retirements (#4241) 2024-01-10 21:53:25 -08:00
Marten Seemann
0a922b4e7d example: add config flag for TLS key and cert for the server (#4237) 2024-01-05 02:21:42 -08:00
Robin Thellend
3ff50295ce http3: add ConnContext to the server (#4230)
* Add ConnContext to http3.Server

ConnContext can be used to modify the context used by a new http
Request.

* Make linter happy

* Add nil check and integration test

* Add the ServerContextKey check to the ConnContext func

* Update integrationtests/self/http_test.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* Update http3/server.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2024-01-04 19:13:53 -08:00
Marten Seemann
f1b3bdbcb0 fix race condition when dropping Initial packet with short connection ID (#4236) 2024-01-04 18:59:39 -08:00
Marten Seemann
54d6f7dc51 ackhandler: refactor ACK queueing logic (#4225)
Once an ACK has been queued, there's no need to check futher conditions that
would lead to queueing of an ACK.
2024-01-03 18:39:09 -08:00
Marten Seemann
8cad3d2ea5 wire: use netip.AddrPort to encode the IPs in the Preferred Address (#4232) 2024-01-02 21:56:25 -08:00
Marten Seemann
59ed51704a README: add RoadRunner to list of projects (#4226) 2024-01-02 21:32:58 -08:00
Marten Seemann
1083d1fb8f handshake: remove unneeded mutex in cryptoSetup (#4227) 2024-01-01 23:52:08 -08:00
Marten Seemann
22b7f7744e use a ring buffer for the datagram queue (#4223) 2023-12-31 20:50:26 -08:00
Marten Seemann
1fce81f8bb queue up to 32 DATAGRAM frames to send (#4222) 2023-12-31 19:58:41 -08:00
Marten Seemann
7f080dd54b discard DATAGRAM frames that don't fit into packets without an ACK (#4221)
If the packet doesn't contain an ACK (i.e. the payload is empty),
there's no point retrying to pack it later. It's extremely unlikely that
the available packet size will suddenly increase.
2023-12-31 19:17:25 -08:00
Marten Seemann
d6e3f3229f qtls: remove unneeded type alias for the tls.QUICEncryptionLevel (#4220)
* qtls: remove unneeded type alias for the tls.QUICEncryptionLevel

* handshake: make cryptoSetup.WriteRecord private
2023-12-28 18:59:56 -08:00
Vladimir Varankin
a937959fbf http3: fix channel size in ListenAndServe (#4219)
* http3: typo in ListenAndServe docs

Also, partially prevent a goroutine leak on an error from one of the
listeners.

* http3: improve documentation for ListenAndServe

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-12-28 18:35:46 -08:00