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
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
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
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
1e874896cd
wire: improve logging of connection ID retirements ( #4241 )
2024-01-10 21:53:25 -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
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
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
Marten Seemann
22411e16d5
utils: switch to standard library min and max functions ( #4218 )
...
These functions were added in Go 1.21.
2023-12-27 21:19:13 -08:00
Marten Seemann
18c591c75a
utils: use time.Duration.Abs ( #4217 )
...
This function was added in Go 1.19, and covers some corner cases that
our custom implementation didn't.
2023-12-27 20:49:47 -08:00
Marten Seemann
d795250479
drop support for Go 1.20, build on Go 1.22rc1 on CI ( #4195 )
...
* drop support for Go 1.20
* ci: udpate CircleCI to Go 1.21
* qtls: remove unnecessary type aliases
* ci: build using Go 1.22rc1
2023-12-27 20:31:58 -08:00
Benedikt Spies
31a677cacd
qlog: add support for alpn_information event ( #4216 )
...
* qlog chosen alpn
* qlog chosen alpn
* qlog: fix capitalization of ALPN
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2023-12-25 21:02:47 -08:00
Marten Seemann
6ffb9054a2
fuzzing: add frame validation logic ( #4206 )
2023-12-13 23:09:02 -08:00
Marten Seemann
d234d62d52
qtls: only attempt 0-RTT resumption for 0-RTT enabled session tickets ( #4183 )
2023-12-09 06:17:47 -08:00
chungthuang
7b9d21fbe6
send large max_datagram_frame size, introduce a DatagramTooLargeError error ( #4143 )
...
The size can be overwritten to a lower value for testing.
2023-12-02 06:27:15 -08:00
Marten Seemann
2d7ea37672
wire: reject NEW_CONNECTION_ID frames with zero-length conneciton IDs ( #4180 )
2023-11-23 02:41:12 -08:00
Marten Seemann
3bf2e19d0d
logging: pass the packet number to ConnectionTracer.DroppedPacket ( #4171 )
...
In most cases the packet number is not known when a packet is dropped,
but it's useful to log the packet number when dropping a duplicate
packet.
2023-11-17 04:11:16 -08:00
Marten Seemann
9414ea4910
ackhandler: immediately acknowledge ECN-CE marked packets ( #4147 )
...
* ackhandler: immediately acknowledge ECN-CE marked packets
* shorter debug statements
2023-11-03 08:28:16 -07:00
Marten Seemann
f23da7da47
congestion: don't use floating point math when calculating pacing times ( #4148 )
2023-10-31 02:21:42 -07:00
Marten Seemann
ef800d6f71
handshake: set MinVersion on the Config returned by GetConfigForClient ( #4134 )
2023-10-26 22:35:07 -07:00
Marten Seemann
d309060cde
handshake: clone the tls.Config returned by GetConfigForClient ( #4133 )
...
We modify this tls.Config, so we should clone it first. Otherwise, this could
cause conflicts with how the application is using that config.
2023-10-26 22:22:20 -07:00
Marten Seemann
746290b78a
never allow 0-RTT when using Dial, even if the session ticket allows it ( #4125 )
...
When resuming a TLS session using Dial (and not DialEarly), 0-RTT should
be disabled at the TLS layer, even if the session ticket allows for
0-RTT resumption.
This bug is not critical, since Dial doesn't return an EarlyConnection,
so the client wouldn't be able to actually send 0-RTT data in practice.
2023-10-25 08:20:23 -07:00
Marten Seemann
1c631cf9cb
rename Connection.{Send,Receive}Message to {Send,Receive}Datagram ( #4116 )
...
This is more consistent with both the RFC and the rest of the API. For
example, the option in the Config is already name EnableDatagrams, and
the property in the ConnectionState is named SupportsDatagrams.
2023-10-24 21:18:09 -07:00
Marten Seemann
a263164d9f
use new gomock feature to generate type-safe methods in mocks ( #4057 )
2023-10-20 22:55:33 -07:00
Marten Seemann
9a397abc17
update gomock to v0.3.0 ( #4087 )
2023-09-24 04:38:28 -07:00
Marten Seemann
4a046185b7
ackhandler: fix ECN mangling detection when packets are lost ( #4089 )
...
Some of the 10 testing packets are might be lost, while others might be
CE-marked. We need to detect mangling if all testing packets are either
lost are CE-marked.
2023-09-17 22:08:33 -07:00
Marten Seemann
c12f425803
ackhandler: don't fail ECN validation if less than 10 testing packets are lost ( #4088 )
...
* ackhandler: don't fail ECN validation less than 10 testing packets lost
* ackhandler: simplify checks for mangling and loss of all testing packets
2023-09-17 23:00:05 +04:00
Marten Seemann
1affe38703
move MaxTokenAge configuration option to the Transport ( #4084 )
2023-09-16 05:10:20 -07:00
Marten Seemann
9b82196578
make the logging.Tracer and logging.ConnectionTracer a struct ( #4082 )
2023-09-16 04:58:51 -07:00
Marten Seemann
862e64c7b9
add a Transport config option for the key used to encrypt tokens ( #4066 )
...
* add a Transport config option for the key used to encrypt tokens
* handshake: remove unused error return values
2023-09-15 18:33:57 +07:00
Marten Seemann
d52e9f35bc
ackhandler: detect ECN mangling ( #4080 )
...
* ackhandler: detect ECN mangling
Mangling means that a path is re-marking all ECN-marked packets as CE.
* ackhandler: only detect ECN mangling once all testing packets were sent
2023-09-11 23:18:33 -07:00
Ameagari
d1f6ea997c
save the RTT in non-0-RTT session tickets ( #4042 )
...
* also send session ticket when 0-RTT is disabled for go1.21
* allow session ticket without transport parameters
* do not include transport parameters for non-0RTT session ticket
* remove the test assertion because it is not supported for go1.20
* Update internal/handshake/session_ticket.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
* add a 0-RTT argument to unmarshaling session tickets
* bump sessionTicketRevision to 4
* check if non-0-RTT session ticket has expected length
* change parameter order
* add test checks
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2023-09-11 08:05:31 -07:00
Marten Seemann
d6ac6300a4
feed ECN feedback into the congestion controller
2023-09-11 21:17:31 +07:00
Marten Seemann
797e275293
congestion: rename OnPacketLost to OnCongestionEvent
2023-09-11 21:14:53 +07:00
Marten Seemann
f9cfa248da
implement ECN path validation logic, send ECN-marked 1-RTT packets
2023-09-11 21:14:52 +07:00
Marten Seemann
ffe6546833
add tracing and qlogging of state transitions for ECN validation
2023-09-11 20:31:50 +07:00
Marten Seemann
ad63e2a40a
trace and qlog the ECN marking on sent and received packets
2023-09-11 20:31:50 +07:00
Marten Seemann
bed8ebbd4c
distinguish coalesced and 1-RTT packets when determining ECN mode
2023-09-11 20:31:50 +07:00
Marten Seemann
b73a4de7ea
only add an ECN control message if ECN is supported
2023-09-11 20:31:50 +07:00
Marten Seemann
5dd6d91c11
send and track packets with ECN markings
2023-09-11 20:31:50 +07:00
Marten Seemann
abfe1ef548
remove Config.MaxRetryTokenAge, set it to the handshake timeout ( #4064 )
...
There is no good reason to manually set the validity period for Retry
tokens. Retry tokens are only valid on a single connection during the
handshake, so it makes sense to limit their validity to the configured
handshake timeout.
2023-09-10 13:53:12 +07:00