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
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
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
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
Marten Seemann
2243fdefbf
http3: return the context cancellation error from RoundTrip ( #4203 )
2023-12-20 20:16:30 -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
a7a66f6437
integrationtests: remove leftover code for Go 1.19 ( #4193 )
2023-12-10 03:00:26 -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
6eb0caca1a
fix race condition in multiplex integration test ( #4136 )
2023-10-27 22:08:49 -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
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
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
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
5314d90b9f
fix logging of connection IDs in tracer test ( #4118 )
2023-10-22 22:46:27 -07:00
Marten Seemann
55eebd49ff
return the cancellation cause for cancelled dials ( #4078 )
2023-09-16 05:37:58 -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
d8cc4cb3ef
http3: introduce an HTTP/3 error type ( #4039 )
...
* http3: introduce an HTTP/3 error type
* http3: use a pointer receiver for the Error
2023-09-16 04:57: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
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
Marten Seemann
e1fcac3e46
set the handshake timeout to twice the handshake idle timeout ( #4063 )
2023-09-09 06:12:37 -07:00
Ameagari
6cde43785f
integration tests: fix connection timeout in 0-RTT test ( #4060 )
2023-09-01 19:40:35 -07:00
WeidiDeng
824fd8a2f2
http3: automatically add content-length for small responses ( #3989 )
...
* response writer: add content-length automatically when response is small enough and doesn't call Flush
* fix comment
* add integration test
* Update http3/response_writer.go
* Update integrationtests/self/http_test.go
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2023-08-20 20:31:22 -07:00
Marten Seemann
fe3c4f271d
add a method to retrieve non-QUIC packets from the Transport ( #3992 )
2023-08-19 01:19:17 -07:00
Ameagari
6880f88089
save the max_datagram_frame_size transport parameter in the session ticket ( #4013 )
...
* Add MaxDatagramFrameSize parameter in session ticket
* fix gofumpt issues
* Update integrationtests/self/zero_rtt_test.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
* fix: correct comparsion of max_datagram_frame_size
* test: use constant MaxDatagramFrameSize for session ticket test
* fix grammar
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2023-08-18 19:16:16 -07:00
Marten Seemann
501cc21c4b
expose crypto/tls errors on the TransportError ( #4015 )
2023-08-18 03:01:49 -07:00
Marten Seemann
83c00a574d
ci: also run integration tests on Windows and macOS ( #3987 )
2023-08-16 07:21:48 -07:00
Marten Seemann
4f696569a2
store the server port as an int, not a string, in HTTP tests ( #3959 )
2023-08-16 04:59:11 -07:00
Marten Seemann
1d848392bc
ignore QUICConn.SendSessionTicket error if session tickets are disabled ( #4030 )
2023-08-15 19:53:41 -07:00
Marten Seemann
95ab7bdc9a
add tls.ClientHelloInfo.Conn for recursive GetConfigForClient calls ( #4016 )
2023-08-05 13:00:11 -07:00
Marten Seemann
18d3846d4f
set a net.Conn for tls.ClientHelloInfo.Conn used by GetCertificate ( #4014 )
2023-08-03 20:33:19 -04:00
Marten Seemann
f3a0ce1599
set a net.Conn with the correct addresses on the tls.ClientHelloInfo ( #4001 )
2023-07-31 13:32:10 -07:00
Marten Seemann
a347d664e2
remove OptimizeConn, add a Transport.WriteTo method instead ( #3957 )
...
* remove OptimizeConn, add a Transport.WriteTo method instead
* fix race condition in Transport.WriteTo
2023-07-19 10:28:11 -07:00
Marten Seemann
0662afba63
stop using math/rand.Seed and Read in tests, bump go.mod version to 1.20 ( #3936 )
2023-07-01 11:29:41 -07:00
Marten Seemann
3d89e545d3
use the new crypto/tls QUIC Transport ( #3860 )
2023-07-01 11:15:00 -07:00
Glonee
435444af7e
add a context to Connection.ReceiveMessage ( #3926 )
...
* add context to ReceiveMessage
* add newlines
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2023-06-27 11:29:30 -07:00
Marten Seemann
21388c86bb
drop support for draft-29 ( #3903 )
2023-06-21 04:06:44 -07:00
Benedikt Spies
f57f876446
respect minimum idle timeout of 3 PTOs ( #3909 )
2023-06-20 01:47:29 -07:00
Marten Seemann
39ae200972
enable GSO on Linux, if available
2023-06-02 18:35:02 +03:00
Marten Seemann
cfa03394b5
remove stray print statement in datagram test ( #3828 )
2023-06-02 03:08:02 -07:00
Glonee
9237dbb167
http3: close the connection when closing the roundtripper ( #3873 )
2023-06-01 01:06:13 -07:00
Glonee
c96fbd2e4a
http3: correctly use the quic.Transport ( #3869 )
...
* use quic.Transport in http3
* add intergrationtests to dial server with different server names
* update test
2023-05-31 23:31:20 -07:00
Marten Seemann
e9fea08613
fix HTTP/3 connection test on draft-29 ( #3819 )
2023-05-12 00:19:43 -07:00
Marten Seemann
b425465bf9
fix flaky timeout integration test ( #3818 )
2023-05-12 00:12:40 -07:00
Marten Seemann
22ca1fb8a5
change how the multiplex test is skipped on Linux ( #3817 )
2023-05-11 22:14:46 -07:00
Marten Seemann
07ad2cbee2
remove Tracer from Config, put ConnectionTracer constructor there
2023-05-02 15:56:49 +02:00
Marten Seemann
7a0ef5f867
make Config.Allow0RTT a bool, not a callback
2023-05-02 15:56:49 +02:00
Marten Seemann
bc7cb706c5
add a GetConfigForClient callback to the Config
2023-05-02 15:56:49 +02:00
Marten Seemann
ba942715db
remove ConnectionIDLength and ConnectionIDGenerator from the Config
2023-05-02 15:56:49 +02:00