Commit graph

347 commits

Author SHA1 Message Date
Gaukas Wang
856bc02b8f
Merge branch 'upstream' into sync-upstream 2023-08-28 14:12:03 -06:00
Marten Seemann
4122eb7a7d disable GSO if sending fails for a particular remote address 2023-08-16 22:09:29 +07:00
Gaukas Wang
95575f5fe7
break: update repo url [ci skip]
uTLS is not yet bumped to the new version, so this commit breaks the dependencies relationship by getting rid of the local replace.
2023-08-03 18:58:52 -06:00
Gaukas Wang
fca46117e4
impl: uquic with utls 2023-07-29 23:45:16 -06:00
Marten Seemann
edaeed0107 embed the packetInfo in the receivedPacket struct
This avoid allocating the packetInfo struct when receiving a packet.
2023-06-03 10:44:16 +03:00
Marten Seemann
072a602cc1
pass around receivedPacket as struct instead of as pointer (#3823) 2023-06-03 00:08:58 -07:00
Marten Seemann
5b5ffa942b pack packets into large buffers when GSO is available 2023-06-03 09:21:55 +03:00
Marten Seemann
ad79149738
improve document of the Transport and the dial and listen functions (#3875) 2023-06-02 03:45:40 -07:00
Sukun
1951878816
server: send version negotiation and invalid token packets from a single Go routine (#3854)
* server: send invalid token and version negotiation packets from one go routine

* remove unneeded comments
2023-05-28 19:27:32 +03:00
Marten Seemann
07ad2cbee2 remove Tracer from Config, put ConnectionTracer constructor there 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
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
86a1234c87 make EarlyListener a struct, not an interface 2023-05-01 14:41:16 +02:00
Marten Seemann
1b64b13750 make Listener a struct, not an interface 2023-05-01 14:41:16 +02:00
Marten Seemann
6617f3d39a don't use timers to clean up 0-RTT queues 2023-05-01 14:24:28 +02:00
Marten Seemann
58487803d3 move 0-RTT queue handling from the packet handler map to the server 2023-05-01 14:24:28 +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
ac36330dc8
fix logging of sent Version Negotiation Packets (#3691) 2023-02-13 02:51:38 -08: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
c24fbb094c
refactor header writing to append to a byte slice (#3646)
This avoids having to allocate a bytes.Buffer.
2023-01-17 01:56:06 -08:00
Marten Seemann
86edf7fd4b remove the LongHeader field from the wire.Header 2023-01-17 21:53:39 +13:00
Marten Seemann
b52d34008f
add Allow0RTT opt in the quic.Config to control 0-RTT on the server side (#3635) 2023-01-04 16:18:11 -08:00
Marten Seemann
4f3d3b36ac introduce a separate code path for unpacking short header packets 2022-08-29 15:55:37 +03:00
Marten Seemann
1aced95d41 use an array instead of a byte slice for Connection IDs 2022-08-29 11:30:31 +03:00
Marten Seemann
9e0f9e62ff parse arbitrary length Connection IDs in Version Negotiation packets 2022-08-29 10:58:33 +03:00
Marten Seemann
ab6d664b43 rename frame.Write to frame.Append 2022-08-28 23:18:24 +03:00
Marten Seemann
3ca1001951 append to a byte slice instead of a bytes.Buffer when serializing frames 2022-08-28 23:18:06 +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
Benedikt Spies
7da024da5a
Disable anti-amplification limit by address validation token (#3326) 2022-08-20 08:02:17 -07:00
Marten Seemann
f2fa98c0dd implement a more intuitive address validation API 2022-08-12 13:13:29 +03:00
Chao Fei
60bbe92194
remove error return value from ComposeVersionNegotiation (#3410) 2022-05-12 08:03:39 -07:00
hareku
823c609be4
Expose quic server closed err (#3395)
* expose quic server closed error

* http3.Server's serving method returns http.ErrServerClosed when quic listener is closed

* Revert "http3.Server's serving method returns http.ErrServerClosed when quic listener is closed"

This reverts commit fb1f244440466b5ebda6b4e0fdef8c342230b4b2.
2022-04-25 03:10:55 -07:00
Marten Seemann
4b17343631 rename the session to connection 2022-03-27 12:50:14 +01:00
Marten Seemann
d7ad1b6b9b rename the connection to rawConn 2022-03-27 12:28:43 +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
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
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
3a359027b5 add a config option to disable sending of Version Negotiation packets 2021-06-27 15:29:29 -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
162cb16b31 cache the serialized OOB in the conn, not in the packet info
We're allocating a lot of packetInfo structs during the lifetime of a
connection. It's better to keep that struct as small as possible.
2021-03-16 14:04:15 +08: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