Commit Graph

1669 Commits

Author SHA1 Message Date
Marten Seemann
501cc21c4b expose crypto/tls errors on the TransportError (#4015) 2023-08-18 03:01:49 -07:00
Marten Seemann
bda01bc489 handshake: use the correct hash function for TLS_AES_256_GCM_SHA384 (#4031) 2023-08-15 20:09:01 -07:00
Marten Seemann
1d848392bc ignore QUICConn.SendSessionTicket error if session tickets are disabled (#4030) 2023-08-15 19:53:41 -07:00
elagergren-spideroak
571d3adef4 fix compatibility with API breaking change in Go 1.21 (#4020)
* add Go 1.21 compatibility

Signed-off-by: Eric Lagergren <elagergren@spideroak-inc.com>

* refactor for Go 1.20

Signed-off-by: Eric Lagergren <elagergren@spideroak-inc.com>

---------

Signed-off-by: Eric Lagergren <elagergren@spideroak-inc.com>
2023-08-09 05:22:30 -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
Ameagari
1c47ebefc0 check transport parameters after 0-RTT resumption (#3985)
* check new transport parameters do not contain redueced limits

* redefine ValidForUpdate and add tests

* fix test assertion and update comment
2023-08-01 18:34:42 -07: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
469a6153b6 use a synchronous API for the crypto setup (#3939) 2023-07-21 10:00:42 -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
Marten Seemann
28d5106a1c wire: switch to crypto/rand for greased transport parameter generation (#3904) 2023-06-20 09:31:12 -07:00
Marten Seemann
e45c46041a ackhandler: don't allocate a packet struct for non-ack-eliciting packets 2023-06-05 21:07:05 +03:00
Marten Seemann
da55dfaabd ackhandler: unexport Packet 2023-06-05 21:06:58 +03:00
Marten Seemann
e1bcedc78c ackhandler: use a frame handler interface for OnAcked / OnLost of all frame types (#3888) 2023-06-04 13:04:28 -07:00
Marten Seemann
bde283640b ackhandler: be explicit about skipping packet numbers (#3886) 2023-06-04 12:45:43 -07:00
Marten Seemann
6619e17dd7 ackhandler: don't log / trace skipped packets when declaring them lost (#3887) 2023-06-04 12:29:40 -07:00
Marten Seemann
8f3a68b4eb ackhandler: use a slice to keep track of sent packets (#3841)
* ackhandler: simplify deletion of old packets in packet history

* ackhandler: use a slice to keep track of sent packets

This is a vastly simpler data structure than the combination of map
and linked list used before. It avoids using a linked list (bad cache
locality) and a sync.Pool (for list elements), as well as having to do
hash table lookups.

In the future, this can be easily replaces with a ring buffer, avoiding
all allocations.

* ackhandler: don't store packets that were declared lost
2023-06-04 02:36:38 -07:00
Marten Seemann
6f07050269 ackhandler: apply logic from RFC 9000 to derive packet number length (#3885) 2023-06-04 02:17:57 -07:00
Marten Seemann
b27d114f07 pass the current timestamp to the pacer instead of calling time.Now() (#3824) 2023-06-03 00:26:30 -07:00
Marten Seemann
9d70bc24a5 simplify pacing logic by introducing a SendPacingLimited send mode 2023-06-02 18:35:02 +03:00
Marten Seemann
7d8db149b6 introduce a buffer pool for large buffers (20k) 2023-06-02 18:35:02 +03:00
Marten Seemann
7ea6dc991f use the same ACK frame struct in the send path, remove ACK frame pool (#3831) 2023-06-02 08:34:27 -07:00
Marten Seemann
21544085e1 Merge pull request #3878 from quic-go/single-ack-receiving
use a single ACK frame in the receive path
2023-06-02 18:06:06 +03:00
Marten Seemann
a595d34557 use a single ACK frame in the receive path 2023-06-02 17:21:46 +03:00
Marten Seemann
0438eada95 use ackhandler.Frame directly, not as a pointer, remove its sync.Pool (#3835) 2023-06-02 04:56:18 -07:00
Marten Seemann
f8d24ef1e9 don't use closures for passing OnLost and OnAcked STREAM frame callbacks (#3833) 2023-06-02 04:14:04 -07:00
Marten Seemann
215ba85db4 ackhandler: simplify sentPacketHandler.SentPacket (#3847)
No functional change expected.
2023-06-02 02:59:46 -07:00
Glonee
f1f42d8d90 use a ring buffer in the framer (#3857)
* implement and use ringbuffer in framer

* Add comments for ring buffer

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

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-06-01 11:53:37 -07:00
Marten Seemann
fce0261c34 wire: apply the default value for the active_connection_id_limit (#3806) 2023-05-28 11:45:46 -07:00
Marten Seemann
378e3c8b74 wire: save ECN counts on the ACK frame (#3829) 2023-05-28 16:36:38 +03:00
Marten Seemann
02013caaa4 rttstats: don't set initial RTT after having obtained a measurement (#3852) 2023-05-28 15:09:25 +03:00
Sukun
cb3453db25 fix comment claiming ParseConnectionID reuses the data slice (#3848) 2023-05-21 07:54:50 -07:00
Marten Seemann
cf267ff7d7 optimize memory layout of ackhandler.Packet (#3844)
Before: 88 bytes. After: 80 bytes.
2023-05-19 10:03:24 +03:00
Marten Seemann
74be4d2755 add a function to set the UDP send buffer size
This function is the equivalent to the function used to set the UDP
receive buffer size. It's so similar that code generation is used to
make a copy of the setReceiveBuffer function.
2023-05-08 14:35:21 +03: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
86a1234c87 make EarlyListener a struct, not an interface 2023-05-01 14:41:16 +02:00
Marten Seemann
94829edf35 congestion: fix overflow when calculating the pacing budget (#3796) 2023-05-01 05:32:20 -07:00
Marten Seemann
c9a2f79b1c simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
Marten Seemann
379e7ec848 Merge pull request #3745 from quic-go/aggressive-key-updates
initiate the first key update after sending / receiving 100 packets
2023-04-19 16:28:33 +02:00
Marten Seemann
e7751de92e qtls: fix cipher suite selection for ClientHellos (#3751) 2023-04-19 07:26:47 -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
a519d827d1 wire: use a dedicated rand.Rand for greasing transport parameters (#3758)
rand.Seed is deprecated since Go 1.20. This change also reduces
(potential) lock contention when obtaining random numbers / bytes.
2023-04-19 06:21:25 -07:00
Marten Seemann
f36690ae9c protocol: remove VersionWhatever, previously used for testing (#3763) 2023-04-19 06:19:27 -07:00
Marten Seemann
969b5dc131 add a handshake test for post-quantum-size ClientHellos (#3759)
Post-quantum ClientHellos typically are larger than 1 MTU and will
therefore need to be split across multiple packets.
2023-04-19 06:01:43 -07:00
Marten Seemann
7a393315bd wire: use constants for frame types (#3739) 2023-04-19 05:58:31 -07:00
Marten Seemann
eb05964942 wire: speed up identification of 0-RTT packets (#3761) 2023-04-19 05:50:57 -07:00