Commit Graph

220 Commits

Author SHA1 Message Date
Marten Seemann
5f3d617dec convert Connection interface to Conn struct (#5195) 2025-06-09 11:51:46 +02:00
Marten Seemann
c9c2c86516 fix flaky TestDial test (#5029)
* give the kernel some time to free the socket

* remove problematic assertion

The listen function is started in a Goroutine, hence we
can’t be sure it’s already started.
2025-04-12 04:39:47 +02:00
Marten Seemann
751ca8dfb6 fix typo in UDP connection helper function in tests (#4970) 2025-02-24 09:39:29 +01:00
Marten Seemann
62a94758e6 move dialing logic from the client into the Transport (#4859) 2025-01-14 16:40:20 +08:00
Marten Seemann
62947d97f5 simplify generation of stateless reset tokens (#4858) 2025-01-11 17:52:59 +08:00
Marten Seemann
9950b4c687 remove validation enforcing one Transport per net.PacketConn (#4851)
It is invalid to use a net.PacketConn in multiple Transports. However,
the validation logic is causing pain when using wrapped net.PacketConns.
It was introduce to guard against incorrect uses of the API when the
Transport was introduced, but this is probably less relevant now than it
was back then.
2025-01-10 09:32:52 +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
a263164d9f use new gomock feature to generate type-safe methods in mocks (#4057) 2023-10-20 22:55:33 -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
2797f85fc0 switch from unmaintained golang/mock to go.uber.org/mock (#4050) 2023-08-28 02:23:55 -07:00
Marten Seemann
1c3292d120 fix flaky client test (#3834) 2023-06-02 02:58:07 -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
b79b532b04 remove StatelessResetKey from the Config, it's now on the Transport 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
c9a2f79b1c simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
Marten Seemann
1f57d4e789 protocol: remove VersionTLS, used during the gQUIC -> TLS 1.3 transition (#3764) 2023-04-19 07:24:34 -07:00
Marten Seemann
a0f032ee18 ci: remove special casing for AppVeyor (#3753)
We dropped AppVeyor a long time ago.
2023-04-19 06:05:23 -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
Marten Seemann
8d496ebb5e introduce a type for the stateless reset key (#3621) 2022-11-16 14:11:25 -08:00
Marten Seemann
870fbe7ab0 migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
Marten Seemann
1aced95d41 use an array instead of a byte slice for Connection IDs 2022-08-29 11:30:31 +03: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
Marten Seemann
4b17343631 rename the session to connection 2022-03-27 12:50:14 +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
86338d3ce0 rename the sessionRunner to connRunner 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
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
Marten Seemann
9693a46d31 Merge pull request #2162 from lucas-clemente/datagram
implement the datagram draft
2020-12-17 11:22:40 +07:00
Marten Seemann
913ddc5081 add a quic.Config option for DATAGRAM frames 2020-12-09 15:31:23 +07:00
Marten Seemann
595f6f814a introduce a quic.Config.HandshakeIdleTimeout, remove HandshakeTimeout 2020-12-08 16:12:39 +07:00
Marten Seemann
02b700804f remove support for quic-trace 2020-12-05 23:13:45 +07:00
Marten Seemann
78e9a3bcad use consistent version numbers in client test 2020-11-11 16:58:23 +07:00
Marten Seemann
a65274942c use a mock net.PacketConn in tests 2020-09-27 15:13:07 +07:00
Marten Seemann
ea3d32394d read the ECN bits 2020-09-15 10:51:22 +07:00
Marten Seemann
e0824e3163 move the logging mock implementations to a separate package 2020-09-09 15:15:49 +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