209 Commits

Author SHA1 Message Date
gr1ffon
4ba42a8456 replace repo 2025-11-14 04:04:40 +03:00
Marten Seemann
c2131eb595 qlog: split serializiation and event definitions, remove logging abstraction (#5356)
* qlog: implement a Trace and a Writer struct

* qlog: rename Trace to FileSeq

* split qlog trace writer and QUIC qlog events into separate packages

* use the new qlog.Recorder instead of the logging.ConnectionTracer
2025-10-08 05:53:02 +02:00
Robin Thellend
0a9c6ea4c8 http3: remove dependency on quic internal packages (#5256)
* Remove http3 dependency on quic internal packages

Remove the dependency on internal/protocol from the http3 package. This
makes it possible for a forked http3 to use the mainline quic-go
package.

* Address review comments

* Fix syntax

* Use broader pattern for http3 directory

* Copy internal/testdata

* Replace perspective with bool

* clone the supported version slice

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2025-07-07 13:41:23 +02:00
Marten Seemann
0eb237f797 add a Config and ConnectionState flag for RESET_STREAM_AT (#5243)
* add a Config and ConnectionState flag for RESET_STREAM_AT

* add RESET_STREAM_AT to README
2025-06-29 05:42:02 +02:00
Marten Seemann
5f3d617dec convert Connection interface to Conn struct (#5195) 2025-06-09 11:51:46 +02:00
Marten Seemann
1169d97e81 convert ReceiveStream interface to a struct (#5173) 2025-06-01 06:08:18 +02:00
Marten Seemann
78e77bcfdb convert SendStream to a struct (#5172) 2025-06-01 05:53:53 +02:00
Marten Seemann
eb656df2fe convert Stream interface to a struct (#5149) 2025-06-01 05:40:05 +02:00
Ameame
8ef0a71581 store the RTT in the token, not in the session ticket (#5065)
* remove RTT from session ticket

* save RTT in token

* use mus as rtt unit in token

* move RTT from session state to token on client side

* Rename the rtt variables

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

* Update internal/handshake/token_generator.go

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

* Update token_generator.go

* Update connection.go

* Update token_generator.go

* correct slice  access in fuzz.go

* rearrange connection constructor parameters

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2025-05-16 12:25:58 +02:00
Marten Seemann
03e9359e38 improve documentation of errors returned from connection and streams (#5061)
* improve documentation of errors returned from the connection and streams

* further wordsmithing
2025-04-20 04:56:11 +02:00
Marten Seemann
7cffd500f1 clarify that Config.InitialPacketSize constitutes a lower limit (#5047) 2025-04-14 15:44:32 +02:00
Mark Rushakoff
e2031b7aeb use clickable links in documentation, fix list styling (#4955)
* Update comment styles

1. Use doc links (the square brackets around identifiers) to make
   clickable links on pkg.go.dev (https://go.dev/doc/comment#doclinks)
2. Indent lists so that they are rendered properly -- at which point go
   fmt updates the bullet character to a dash
   (https://go.dev/doc/comment#lists)
3. Add a couple missing punctuation marks

These all will improve the experience of browsing the quic-go docs on
pkg.go.dev.

* ignore SA1019 for the ConnectionTracingID

* ci: exclude ConnectionTracing(ID, Key) from staticlint in http3

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2025-04-14 07:44:29 +02:00
Marten Seemann
0ac0c1e72c improve documentation for the ConnectionIDGenerator (#5043) 2025-04-14 06:41:17 +02:00
Marten Seemann
79d546379b rename ClientHelloInfo to ClientInfo (#5016)
There’s no ClientHello (which is a TLS concept) involved here.
2025-03-31 16:15:09 +02:00
Marten Seemann
24acc54ef1 add support for connection migration (#4960) 2025-03-12 06:11:11 +01:00
Marten Seemann
5e198b0db1 fix documentation for ConnectionState.SupportsDatagrams (#4754)
Support for QUIC datagrams (RFC 9221) is a unilateral declaration.
2024-12-14 11:18:11 +08:00
Marten Seemann
39e2a69a90 remove deprecated quic.VersionNumber and logging.VersionNumber (#4627) 2024-08-12 02:55:21 -07:00
Marten Seemann
b52c33939d introduce a StreamLimitReachedError for Connection.Open{Uni}Stream (#4579)
Using a concrete type is preferable to relying on interpreting the
return values from net.Error.Timeout and net.Error.Temporary, especially
since the latter has been deprecated since Go 1.18.
2024-06-28 06:58:28 -07:00
Mathis Engelbart
b4f3839fce fix stream documentation for StreamError return values (#4575) 2024-06-23 19:33:56 -07:00
Marten Seemann
0c842975f4 fix incorrect statement about Config.DisablePathMTUDiscovery (#4558) 2024-06-05 19:23:53 -07:00
Marten Seemann
07acaad2f7 add context to EarlyConnection.NextConnection, handle handshake failures (#4551) 2024-06-04 20:51:54 -07:00
Marten Seemann
21b643eeea deprecate the ConnectionTracingKey (#4532)
Applications can set their own tracing key using Transport.ConnContext.
2024-05-27 19:24:10 -07:00
Marten Seemann
f3d76b39bf make the initial packet size configurable (#4503) 2024-05-08 21:41:08 -07:00
Marten Seemann
e90a0d4e03 increase initial packet size to 1280 bytes (for both IPv4 and IPv6) (#4500) 2024-05-08 20:55:19 -07:00
Marten Seemann
857c31dc7c fix documentation for CancelWrite after Close on the send stream (#4419) 2024-04-13 16:36:49 -07:00
Marten Seemann
27a06f32ce introduce a ConnectionTracingID type for the ConnectionTracingKey (#4400)
This is a breaking API change. Unfortunately, context values are not
strongly typed, so users will have have to take to change their type
assertions.
2024-04-01 21:10:12 -07:00
Marten Seemann
ca787d6f00 add an AddrVerified field to the ClientHelloInfo (#4360)
* add an AddressVerified field to the ClientHelloInfo

* rename ClientHelloInfo.AddressVerififed to ClientHelloInfo.AddrVerififed
2024-03-11 05:00:25 -07:00
the harder the luckier
ac1268911e improve API documentation for OpenStreamSync (#4352)
* docs: improve API documentation for OpenStreamSync

Both `OpenStream` and `OpenStreamSync` themselves only create steam objects locally, but `OpenStreamSync` does not add document descriptions, which will cause ambiguity.

* additional description
2024-03-06 16:37:35 -08:00
Marten Seemann
fbaa941ea1 protocol: rename VersionNumber to Version (#4295) 2024-01-31 21:57:33 -08:00
Marten Seemann
a2cf43d75c remove the RequireAddressValidation callback from the Config (#4253) 2024-01-22 21:24:07 -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
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
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
Benedikt Spies
37a3c417a7 expose GSO usage through ConnectionState (#4083) 2023-09-13 23:55:49 -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
Marten Seemann
d7334c16e7 move the DisableVersionNegotiationPackets flag to the Transport (#4047)
* move the DisableVersionNegotiationPackets flag to the Transport

* add an integration test for DisableVersionNegotiationPackets
2023-08-30 23:33:40 -07:00
Ferdinand Holzer
27301f791f surface stream error as stream context cancelation cause (#3970)
* send stream: surface error as stream context cancellation cause

* Update send_stream_test.go

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

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-07-19 10:12:01 -07:00
Ferdinand Holzer
4378283f95 surface connection error as connection context cancelation cause (#3961)
* connection: surface connection error as connection context cancellation cause

* docs: add note about connection context canellation cause
2023-07-17 21:31:31 -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
Marten Seemann
85764da3b6 docs: improve doc comments for the ConnectionState fields (#3901) 2023-06-15 00:03:36 -07:00
Marten Seemann
614fdb3271 only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
Marten Seemann
1d093d7927 config: handle overflows of stream and flow control limits (#3866) 2023-06-02 03:41:14 -07:00
Zxilly
22d6b0e626 docs: fix typo in documentation for EarlyConnection (#3798) 2023-05-06 02:36:43 -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