Commit Graph

266 Commits

Author SHA1 Message Date
gr1ffon
4ba42a8456 replace repo 2025-11-14 04:04:40 +03:00
Coia Prant
afe01ef103 close Transport when DialAddr fails (#5259)
Close the transport after dial fails to avoid memory leaks. Same logic as DialAddrEarly.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
2025-07-12 18:58:30 +02:00
Marten Seemann
5f3d617dec convert Connection interface to Conn struct (#5195) 2025-06-09 11:51:46 +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
62a94758e6 move dialing logic from the client into the Transport (#4859) 2025-01-14 16:40:20 +08:00
Marten Seemann
fbbc3c9e30 wait for connection to shut down when the Dial context is cancelled (#4872) 2025-01-14 16:01:57 +08:00
Marten Seemann
62947d97f5 simplify generation of stateless reset tokens (#4858) 2025-01-11 17:52:59 +08:00
Marten Seemann
0d1e27d77c introduce Transport.ConnContext, use client's context on the connection (#4507)
* introduce Transport.ConnContext, use client's context on the connection

* panic if ConnContext returns nil
2024-05-26 21:30:19 -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
fbaa941ea1 protocol: rename VersionNumber to Version (#4295) 2024-01-31 21:57:33 -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
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
ca3842d6c8 automatically set the tls.Config.ServerName if unset (#4032) 2023-08-16 06:54:42 -07:00
Marten Seemann
ad79149738 improve document of the Transport and the dial and listen functions (#3875) 2023-06-02 03:45:40 -07:00
Marten Seemann
07ad2cbee2 remove Tracer from Config, put ConnectionTracer constructor there 2023-05-02 15:56:49 +02:00
Marten Seemann
5544f0f9a1 simplify connection handling for the client 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
Marten Seemann
8189e75be6 implement the Transport 2023-05-02 15:56:48 +02:00
Marten Seemann
ae5a8bd35c move the QUIC version check to the config validation 2023-05-02 09:44:58 +02:00
Marten Seemann
aee7706d5d clean up dial functions
* add a context to all Dial functions
* remove the explicit Dial{*}Context functions
2023-05-01 13:59:54 +02:00
Marten Seemann
d683b841c4 remove the host parameter from all dial functions 2023-05-01 13:59:54 +02:00
Marten Seemann
23f4565108 qtls: don't set the tls.Config.CipherSuites for cipher suite tests (#3726)
* qtls: don't set the tls.Config.CipherSuites for cipher suite tests

* use qtls versions that don't allow setting of tls.Config.CipherSuites
2023-03-26 06:56:41 -07:00
Marten Seemann
a4b0265628 use a chan instead of a context in Connection.HandshakeComplete (#3709) 2023-03-26 06:51:56 -07:00
Marten Seemann
58cedf7a4f rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
Toby
2de4af00d0 fix client SNI handling (#3613)
* fix: client sni handling

* chore: add comment
2022-11-07 01:52:22 -08:00
João Oliveirinha
66f6fe0b71 add support for providing a custom Connection ID generator via Config (#3452)
* Add support for providing a custom ConnectionID generator via Config

This work makes it possible for servers or clients to control how
ConnectionIDs are generated, which in turn will force peers in the
connection to use those ConnectionIDs as destination connection IDs  when sending packets.

This is useful for scenarios where we want to perform some kind
selection on the QUIC packets at the L4 level.

* add more doc

* refactor populate config to not use provided config

* add an integration test for custom connection ID generators

* fix linter warnings

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-08-24 04:06:16 -07:00
Didrik Nordström
d39a33f921 clone TLS conf in newClient (#3400)
Fixes #3394
2022-05-12 03:27:25 -07:00
Marten Seemann
4b17343631 rename the session to connection 2022-03-27 12:50:14 +01:00
Marten Seemann
9bc32cd021 rename the SessionTracingKey to ConnectionTracingKey 2022-03-27 11:27:25 +01:00
Marten Seemann
a088ba4607 rename quicConn.earlySessionReady to quicConn.earlyConnReady 2022-03-27 11:27:25 +01:00
Marten Seemann
1ae835d1d8 rename occurrences of session in client, server and packetHandlerMap 2022-03-27 11:27:25 +01:00
Marten Seemann
e7c2e7e147 rename the quicSession to quicConnection 2022-03-27 11:27:25 +01:00
Marten Seemann
6aaa9a817c rename the EarlySession to EarlyConnection 2022-03-27 11:27:25 +01:00
Marten Seemann
e71c236232 rename the Session to Connection 2022-03-27 11:27:23 +01:00
Marten Seemann
dbb517858e fix incorrect usage of errors.Is
errors.Is is supposed to used for equality of errors, not for type
assertions. That's what errors.As is there for.
2021-06-28 15:29:52 -07:00
Marten Seemann
592fb9cad9 introduce a dedicated qerr.TransportError and qerr.ApplicationError 2021-05-01 09:38:48 +07:00
Marten Seemann
878e0b261a pass a context to logging.Tracer.NewConnectionTracer
This context has the same value attached to it as the context returned
by Session.Context().
In the case of a dialed connection, this context is derived from the
context used for dialing.
2021-04-14 16:59:36 +07:00
Marten Seemann
4917760726 attach a tracing ID to the session context 2021-04-14 16:39:41 +07:00
Marten Seemann
c30a45ef6f don't pass the QUIC version to the StartedConnection event
The version might change in response to a Version Negotiation packet.
2021-04-02 17:33:49 +07:00
Olivier Poitrey
eb6bdfdfc1 Use the correct source IP when binding multiple IPs
When the server is listening on multiple interfaces or interfaces with
multiple IPs, the outgoing datagrams are sometime delivered with the
wrong source IP address.

In order to fix that, each quic connection needs to extract the
destination IP (and optionally interface id) of the received datagrams,
and set it as source IP (and interface) on the sent datagrams.

On most platforms, this can be done using ancillary data with recvmsg()
and sendmsg(). Some of the machinery for this is already there for ECN,
this change extends it to read the destination IP info and write it to
the outgoing packets.

Fix #1736
2021-03-16 00:50:05 +01:00
Marten Seemann
ad7d90779a remove unused initialVersion variable in session 2020-12-18 12:00:17 +07:00
Yingrong Zhao
36add0e7a0 client: Add DialEarlyContext and DialAddrEarlyContext API 2020-10-07 22:20:28 -04:00
Egon Elbre
60bec77f0a remove unnecessary locking
Fixes #2717
2020-09-22 15:43:32 +03:00
Marten Seemann
833027b065 introduce an ECNCapablePacketConn interface to determine ECN support 2020-09-15 14:41:06 +07:00
Marten Seemann
c978b6050c Merge pull request #2711 from lucas-clemente/validate-quic-config
disallow values above 2^60 for Config.MaxIncoming{Uni}Streams
2020-08-18 06:58:55 +07:00
Marten Seemann
69df425318 limit Config.MaxIncoming{Uni}Streams to 2^60 2020-08-11 18:42:32 +07:00
Marten Seemann
89417ab5ca simplify the connection, rename it to sendConn 2020-08-09 19:24:04 +07:00
Marten Seemann
2f63bc0731 pass a logging.Tracer to the packet handler map 2020-07-15 20:45:36 +07:00
Marten Seemann
ee24d3899e simplify the Tracer interface by combining the TracerFor... methods 2020-07-11 13:22:52 +07:00