Marten Seemann
229ff4fa4c
ci: update Codecov action to v4 ( #4321 )
2024-02-08 19:55:24 -08:00
Marten Seemann
8e93770dd3
avoid lock contention when accepting new connections ( #4313 )
...
* avoid lock contention when accepting new connections
The server used to hold the packet handler map's lock while creating the
connection struct for a newly accepted connection. This was intended to
make sure that no two connections with the same Destination Connection
ID could be created.
This is a corner case: it can only happen if two Initial packets with
the same Destination Connection ID are received at the same time. If
the second one is received after the first one has already been
processed, it would be routed to the first connection. We don't need to
optimized for this corner case. It's ok to create a new connection in
that case, and immediately close it if this collision is detected.
* only pass 0-RTT to the connection if it was actually accepted
2024-02-08 19:34:42 -08:00
Marten Seemann
013949cda3
ci: update to Go 1.22.0 ( #4312 )
2024-02-07 18:15:56 -08:00
bt90
43baf2db7a
README: add frp to list of projects ( #4316 )
2024-02-07 18:06:12 -08:00
Marten Seemann
ab17a5df6a
qlog: rename generation to key_phase on key_updated and key_discarded ( #4315 )
2024-02-07 18:04:23 -08:00
Marten Seemann
c22a3c8e6f
handshake: validate HKDF-Expand-Label against crypto/tls implementation ( #4311 )
...
* handshake: validate HKDF-Expand-Label against crypto/tls implementation
* handshake: add a benchmark for HKDF-Expand-Label
2024-02-04 21:27:21 -08:00
Marten Seemann
dc49f5673b
fix flaky 0-RTT packet loss recovery test ( #4306 )
2024-02-02 22:19:33 -08:00
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
dependabot[bot]
4684e2dde1
build(deps): bump github.com/quic-go/quic-go from 0.39.2 to 0.39.4 ( #23 )
...
Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go ) from 0.39.2 to 0.39.4.
- [Release notes](https://github.com/quic-go/quic-go/releases )
- [Changelog](https://github.com/quic-go/quic-go/blob/master/Changelog.md )
- [Commits](https://github.com/quic-go/quic-go/compare/v0.39.2...v0.39.4 )
---
updated-dependencies:
- dependency-name: github.com/quic-go/quic-go
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-20 00:50:12 -07: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 )
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
dependabot[bot]
fa047fddb7
build(deps): bump github.com/cloudflare/circl from 1.3.5 to 1.3.7 ( #21 )
...
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl ) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/cloudflare/circl/releases )
- [Commits](https://github.com/cloudflare/circl/compare/v1.3.5...v1.3.7 )
---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 10:06:36 -07: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