Commit Graph

6299 Commits

Author SHA1 Message Date
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
2243fdefbf http3: return the context cancellation error from RoundTrip (#4203) 2023-12-20 20:16:30 -08:00
Constantine Shablia
d3c5f389d4 http3: improve debug message when determining the listener port fails (#4214)
Fixes: #4212
2023-12-18 21:03:28 -08:00
Constantine Shablia
5d6bf7e206 http3: don't use error string as a format string in debug log message (#4211)
Fixes: #4209
2023-12-18 19:27:07 -08:00
WeidiDeng
e0bf13be01 http3: reset stream when a handler panics (#4181)
* interrupt the stream when a panick happened

* move the declaration of errPanicked

* check what's read is a prefix of what's written

* check errPanicked

* use MatchError instead of Equal

* use channel to notify the response has been received
2023-12-15 19:39:49 -08:00
Dominik Roos
06c6a8449b http3: add remote address to request context (#4208)
* http3: add remote address to request context

Add the remote address of the underlying packet connection to the
HTTP request context. This is useful for applications that need access
to the actual remote address (wrapped in a net.Addr) rather than just
its string representation.

Fixes #4198

* add an integration test to the self test suite.

I was not sure how deep we want to go to assure the right value is set.
For now, it asserts that a net.Addr is present in the context.

Due to the dynamic nature of the requests, it is a bit harder to know
exactly how the remote address will look like. IPv4 vs IPv6, random high
port. I think it is fine to only assert that the value is present.
2023-12-15 19:29:41 -08:00
Marten Seemann
6ffb9054a2 fuzzing: add frame validation logic (#4206) 2023-12-13 23:09:02 -08:00
Marten Seemann
048940927c ci: update golangci-lint to v1.55.2 (#4204) 2023-12-13 04:02:06 -08:00
Marten Seemann
ff6d575ee3 don't retransmit PATH_CHALLENGE and PATH_RESPONSE frames (#4200) 2023-12-12 20:22:13 -08:00
Marten Seemann
574dc84c0c limit the number of queued PATH_RESPONSE frames to 256 (#4199) 2023-12-12 20:17:09 -08:00
Marten Seemann
a7a66f6437 integrationtests: remove leftover code for Go 1.19 (#4193) 2023-12-10 03:00:26 -08:00
Marten Seemann
659da8ca08 fuzzing: update Go version used on OSS-Fuzz to 1.21 (#4192) 2023-12-09 09:20:09 -08:00
fengyun.rui
f162b948db examples: close listener, connection and stream in echo client and server (#4188)
* fix: add close func in example

Signed-off-by: rfyiamcool <rfyiamcool@163.com>

* fix: add close func in example

Signed-off-by: rfyiamcool <rfyiamcool@163.com>

* fix: add close func in example

Signed-off-by: rfyiamcool <rfyiamcool@163.com>

---------

Signed-off-by: rfyiamcool <rfyiamcool@163.com>
2023-12-09 09:05:31 -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
Charles Xu
38eafe4ad8 README: add gost project (#4154)
* chore: add project

* fix name

* revert unrelated whitespace fix

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-12-06 19:18:33 -08:00
Marten Seemann
9b40c50a73 http3: use the AdditionalSettings for requests (#4156) 2023-12-06 06:22:23 -08:00
Benedikt Spies
45922f76d6 reduce calls to time.Now() calls in connection (#4191) 2023-12-06 06:00:58 -08:00
Marten Seemann
87ef8ec48d fuzzing: add transport parameter validation logic (#4175) 2023-12-03 05:53:36 -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
771d136fa9 interop: update Go version to 1.21.4 (#4179) 2023-11-22 20:30:26 -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
96ab48eb7d fix serialization of connection ID in filenames of qlog files (#4170) 2023-11-16 22:06:42 -08:00
Marten Seemann
427f53328b fix flaky server test (#4167) 2023-11-14 02:00:42 -08:00
Anders Pitman
740119b144 README: fix typo (#4166) 2023-11-14 01:09:47 -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
d4ab27de1f don't set the TLS version in the transport (#4135)
This is already done in the crypto setup.
2023-10-31 22:27:13 -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
a3603549ee document what happens to established connections on Listener.Close (#4138) v0.40.0 2023-10-27 23:40:50 -07:00
Marten Seemann
6eb0caca1a fix race condition in multiplex integration test (#4136) 2023-10-27 22:08:49 -07:00
Marten Seemann
5311f8178c README: link to webtransport-go repo (#4117) 2023-10-27 02:21:26 -07:00
Marten Seemann
dda63b90eb don't close established connections on Listener.Close, when using a Transport (#4072)
* don't close established connections on Listener.Close

* only close once
2023-10-26 23:10:13 -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
e2622bfad8 reject ClientHellos that offer TLS versions older than 1.3 (for Go 1.20) (#4130) 2023-10-25 09:49:53 -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
1bcec70978 ci: run linter on all supported Go versions (#4126) 2023-10-24 22:03:41 -07:00
Marten Seemann
30f9c0139f use typed atomics in integration tests (#4120)
* use typed atomic in integration tests

* use an atomic.Bool in hotswap test
2023-10-24 21:46:29 -07:00
Marten Seemann
6239effc7a fix IPv4 ECN control message length on Linux (#4127) 2023-10-24 21:18:43 -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
7884f87f82 ci: use bash on all platforms (#4122) 2023-10-22 23:36:45 -07:00
Marten Seemann
4c357c8f76 ci: create separate artifact archives per workflow run (#4121) 2023-10-22 22:53:10 -07:00
Marten Seemann
5314d90b9f fix logging of connection IDs in tracer test (#4118) 2023-10-22 22:46:27 -07:00
Glonee
36f7fe7d07 http3: discard body from responses to HEAD requests (#4115)
* http3: HEAD method should not have a body

* add tests

* Update http3/server.go

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

* ruduce the size of responseWriter

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-10-22 19:31:24 -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
b344940f06 catch EPERM sendmsg errors for the very first packet on Linux (#4111) 2023-10-17 01:23:33 -07:00
Marten Seemann
262cf0a592 fix IPv4 ECN control message length on FreeBSD (#4110) 2023-10-16 22:50:40 -07:00