Commit Graph

1083 Commits

Author SHA1 Message Date
Marten Seemann
7f6eca84da replace the logging.Export() method by a Close() method 2020-07-01 16:54:44 +07:00
Marten Seemann
7fdace490c rename qlogger (member) variables to tracer 2020-07-01 16:53:45 +07:00
Marten Seemann
78ba619a0b split the qlog package into a logging and a qlog package 2020-07-01 16:49:24 +07:00
Marten Seemann
07d4fd0991 use the new qtls interface for (re)storing app data with a session state
Application data is now retrieved and restored via two callbacks on the
qtls.Config. This allows us the get rid of the rather complex wrapping
of the qtls.ClientSessionCache. Furthermore, it makes sure that we only
restore the application data when qtls decides to actually use the
ticket.
2020-07-01 14:00:08 +07:00
Marten Seemann
f926945ae5 Merge pull request #2632 from lucas-clemente/remove-superfluous-0rtt-logging
remove superfluous parameters logged when not doing 0-RTT
2020-07-01 13:55:37 +07:00
Marten Seemann
eb57da6c11 Merge pull request #2636 from lucas-clemente/fix-bandwidth-estimate-for-short-rtts
return an infinite bandwidth if the RTT is zero
2020-07-01 13:54:45 +07:00
Marten Seemann
a20c5f8db0 return an infinite bandwidth if the RTT is zero 2020-06-28 14:55:47 +07:00
Marten Seemann
3e454ad2f7 remove superfluous parameters logged when not doing 0-RTT 2020-06-27 14:33:11 +07:00
Marten Seemann
012e62112d drop support for Go 1.13 2020-06-25 15:44:50 +07:00
Marten Seemann
fda00fe1cd use a slightly higher bandwidth for the pacer 2020-06-22 14:31:37 +07:00
Marten Seemann
fe622dd780 use a token bucket pacing algorithm 2020-06-22 14:31:37 +07:00
Marten Seemann
312b8d37f0 use a callback to pass the bandwidth to the pacer 2020-06-22 14:31:37 +07:00
Marten Seemann
467e553f2b limit the pacing duration to the minimum pacing delay 2020-06-22 14:31:37 +07:00
Marten Seemann
4163c255e8 implement a basic token bucket pacing algoritm 2020-06-22 14:31:37 +07:00
Marten Seemann
a8ddba6a39 remove unused packet counter in the receivedPacketTracker 2020-06-18 11:28:43 +07:00
Marten Seemann
543c1049dd increase the minimum pacing delay to 1ms 2020-06-15 10:14:55 +07:00
Marten Seemann
cdf7e06ff1 Merge pull request #2587 from lucas-clemente/update-salts-for-draft-29
update initial salts and test vectors for draft-29
2020-06-11 18:50:22 +07:00
Marten Seemann
552b4a8db0 Merge pull request #2596 from lucas-clemente/connection-refused
rename the SERVER_BUSY error to CONNECTION_REFUSED
2020-06-11 18:17:38 +07:00
Marten Seemann
80e5061243 Merge pull request #2591 from lucas-clemente/reduce-flowcontrol-time-now-calls
reduce calls to time.Now() from the flow controller
2020-06-11 17:11:21 +07:00
Marten Seemann
4103e05b36 Merge pull request #2592 from lucas-clemente/remove-redundant-parenthesis
remove redundant parenthesis and type conversion in flow controller
2020-06-11 17:11:03 +07:00
Marten Seemann
2e9b92ab69 rename the SERVER_BUSY error to CONNECTION_REFUSED 2020-06-10 12:13:40 +07:00
Marten Seemann
cea61e364d remove redundant parenthesis and type conversion in flow controller 2020-06-07 11:46:03 +07:00
Marten Seemann
66eeff040b reduce calls to time.Now() from the flow controller 2020-06-07 10:46:24 +07:00
Marten Seemann
6299ef3ab1 use the receipt of a Retry packet to get a first RTT estimate 2020-06-05 16:29:23 +07:00
Marten Seemann
e193568342 update initial salts and test vectors for draft-29 2020-06-05 09:54:14 +07:00
Marten Seemann
b9f26ac99d Merge pull request #2576 from lucas-clemente/split-pto-calculation
split PTO calculation into a separate function
2020-06-03 16:11:56 +07:00
Marten Seemann
28fd878778 add a unit test using the ChaCha20 test vector from the draft 2020-06-03 10:02:15 +07:00
Marten Seemann
dda9c27d07 only send a single packet to unblock the server during the handshake 2020-06-01 12:39:36 +07:00
Marten Seemann
d137e7672d implement a GetPTOTimeAndSpace() as outlined in the draft 2020-06-01 11:18:57 +07:00
Marten Seemann
96acf36cbd rename sentPacketHandler.getEarliestLossTimeAndSpace to getLossTimeAndSpace 2020-06-01 11:18:57 +07:00
Marten Seemann
feb3e9a713 rename lastSentAckElicitingPacketTime to lastAckElicitingPacketTime 2020-06-01 11:18:57 +07:00
Marten Seemann
9177500096 bundle ACK frames when packing a packet 2020-06-01 09:56:06 +07:00
Marten Seemann
77b1021a54 make it possible to generate an ACK frame, even if no ACK is queued yet 2020-06-01 09:31:11 +07:00
Marten Seemann
bee5ef624f determine if a received packet is new (and not a duplicate / delayed packet) 2020-06-01 09:31:11 +07:00
Marten Seemann
ce40a7e28b Merge pull request #2567 from lucas-clemente/authenticate-connection-ids
authenticate connection IDs
2020-05-31 14:01:58 +07:00
Marten Seemann
64ef72fd68 don't switch to PTO mode after early retransmit 2020-05-31 10:47:13 +07:00
Marten Seemann
ee8a0aeb1b improve unit tests for early retransmit 2020-05-31 10:43:04 +07:00
Marten Seemann
cdb22513f3 save the source conn ID used on the Retry packet in the Retry token 2020-05-29 19:50:14 +07:00
Marten Seemann
4451f3bf5c marshal and unmarshal the retry_source_connection_id TP 2020-05-29 19:50:14 +07:00
Marten Seemann
72d7592fb2 marshal and unmarshal the initial_source_connection_id TP 2020-05-29 19:50:14 +07:00
Marten Seemann
b391cce35c always send the original_destination_connection_id TP as a server 2020-05-29 19:50:14 +07:00
Marten Seemann
7e62a2fecc rename original_connection_id to original_destination_connection_id TP 2020-05-29 19:50:14 +07:00
Marten Seemann
99dac1581a fix broken unit test in ackhandler 2020-05-29 17:20:47 +07:00
Marten Seemann
8d00ec135e Merge pull request #2569 from lucas-clemente/drop-duplicate-packets
drop duplicate packets
2020-05-29 16:39:46 +07:00
Marten Seemann
60a918a108 limit available window to 3x of received bytes before address validation 2020-05-27 09:40:50 +07:00
Marten Seemann
440ff107a3 drop duplicate packets
Duplicate detection uses the same data structure that is used to track
received packets to generate ACK frames. That means that after an old
ACK range has been pruned, a severly delayed packet might be incorrectly
detected as a duplicate.
As we wouldn't have acknowledged receipt of this packet, this situation
would have resulted in a retransmission by the peer anyway, so dropping
the packet won't cause a big regression.
2020-05-27 09:20:51 +07:00
Marten Seemann
b2c4dacd25 fix int overflow when parsing the transport parameters 2020-05-24 12:59:47 +07:00
Marten Seemann
ae14a447a5 Merge pull request #2534 from lucas-clemente/reduce-unprocessed-packet-chan-length
reduce the length of the unprocessed packet chan in the session
2020-05-13 21:04:33 +07:00
mawei
38691a1278 calculate version negotiation packet size to avoid bytes.Buffer growing the bytes 2020-05-13 12:34:39 +08:00
Marten Seemann
e7208219a9 reduce the length of the unprocessed packet chan in the session 2020-05-09 09:14:19 +07:00