Commit graph

256 commits

Author SHA1 Message Date
Marten Seemann
2b7133a6e2 implement a queue for 0-RTT packets 2020-02-15 15:44:08 +07:00
Marten Seemann
b031615db5 export a qlog when the session's run loop stops 2020-02-12 10:42:37 +07:00
Marten Seemann
93693349f3 collapse packetHandlerManager.Add and AddIfNotTaken into one function 2020-02-03 17:34:07 +01:00
Marten Seemann
7f0dc56d70 introduce a server run loop for handling packets 2020-02-03 17:31:47 +01:00
Marten Seemann
cf71bdd05a use a MockPacketHandlerManager in all server tests 2020-02-03 17:31:47 +01:00
Marten Seemann
5a566f2176
Merge pull request #2226 from lucas-clemente/retry-integrity
implement the retry integrity tag
2020-01-17 17:19:15 +07:00
Marten Seemann
7b10453af8 implement the Retry integrity tag 2020-01-17 13:42:57 +07:00
Marten Seemann
eeba3951ae only enable 0-RTT when using ListenEarly and DialEarly 2020-01-17 11:22:12 +07:00
Marten Seemann
27549c5665 use the minimum of the two peers' max_idle_timeouts 2019-12-11 14:04:33 +04:00
Marten Seemann
e65df402dd only create a single session when two Initials arrive at the same time 2019-11-30 20:01:51 +07:00
Marten Seemann
35ea8213c5 move initialization of the client's transport parameters to the session 2019-11-05 11:00:06 +07:00
Marten Seemann
b64535e656 move initialization of the server's transport parameters to the session 2019-11-05 10:59:21 +07:00
Marten Seemann
416fe8364e remove unused return value from session constructor 2019-10-27 15:35:34 +07:00
Marten Seemann
5cbb8d6597 implement a listener that returns early sessions 2019-08-13 09:07:13 +07:00
Marten Seemann
b06d7b0cba use the HandshakeComplete() context for accepting sessions in the server 2019-08-13 08:52:26 +07:00
Marten Seemann
8c4e4a3208 remove complex checks performed on the tls.Config 2019-07-28 23:57:33 +07:00
Marten Seemann
12bce1caaa add a context to Listener.Accept 2019-06-22 19:36:52 +08:00
Marten Seemann
267d11ee66 add tracing for sent and received packets 2019-06-20 22:58:01 +08:00
Marten Seemann
8eeddeb9c0 reject a tls.Config without NextProtos for listening 2019-06-02 14:58:41 +08:00
Marten Seemann
34543848f0 send a NEW_TOKEN from after completing the handshake (as a server) 2019-06-02 14:18:27 +08:00
Marten Seemann
7c7bcede6c rename handshake.TokenGenerator.NewToken to NewRetryToken 2019-06-02 14:14:05 +08:00
Marten Seemann
1873503937 reduce the Retry token expiry time to 10 seconds
The expiry time used to be 24 hours before. The reason for this long
duration was that this included tokens that were issued to be used
between separate connections in gQUIC. At the moment, we are only
generating tokens for Retry packets, i.e. within a single connection.
They are therefore expected to be used within a single round trip.
2019-06-01 16:32:54 +08:00
Marten Seemann
1d6707325f name the quic.Cookie to quic.Token 2019-05-30 22:13:06 +08:00
Marten Seemann
dc75123836 fix race condition when closing the server after a Read failed 2019-05-10 09:47:52 +09:00
Marten Seemann
7b569ba071 fix flaky server unit test 2019-04-03 01:27:31 +09:00
Marten Seemann
94046cdb4b implement sending of stateless resets 2019-03-08 18:10:15 +09:00
Marten Seemann
733dcb75eb rename the methods of the sessionRunner interface 2019-03-08 18:09:36 +09:00
Marten Seemann
02e851bd11 cut coalesed packets in the session 2019-02-27 10:03:34 +09:00
Marten Seemann
df34e4496e identify version negotiation packets without parsing the header 2019-02-23 10:24:42 +08:00
Marten Seemann
28ed85b9c6 move cutting of coalesced packets to the wire package 2019-02-23 10:24:42 +08:00
Marten Seemann
181aa493e0 make sure not to return closed session from Listener.Accept() 2019-01-06 15:27:42 +07:00
Marten Seemann
90514d53d1 reject new connection attempts if the server's accept queue is full 2019-01-06 15:26:43 +07:00
Marten Seemann
1301610a54 never block when calling the onHandshakeComplete callback 2019-01-06 11:43:49 +07:00
Marten Seemann
767dbdd545 put back packet buffers after processing a packet
This introduces a reference counter in the packet buffer, which will be
used to process coalesced packets.
2019-01-01 09:50:29 +07:00
Marten Seemann
008615284e error when Listen is called without a tls.Config or certificates 2018-11-29 16:01:03 +07:00
Marten Seemann
5e01c49fdf send Version Negotiation packets in a separate Go routine 2018-11-27 17:19:21 +07:00
Marten Seemann
c5ca6fd7e5 parse the extended header in the session 2018-11-26 15:57:54 +07:00
Marten Seemann
70ce6a5814 parse the whole Long Header, if the version is known 2018-11-26 15:57:54 +07:00
Marten Seemann
b740d57c61 embed the Header in the ExtendedHeader 2018-11-26 15:57:54 +07:00
Marten Seemann
af157408de move parsing of extended headers to the same file as the struct 2018-11-26 15:57:54 +07:00
Marten Seemann
9bcedd988d move parsing of version negotiation packets to the wire.Header 2018-11-26 15:57:54 +07:00
Marten Seemann
7b91ba56b6 rename the wire.InvariantHeader to Header 2018-11-26 15:57:54 +07:00
Marten Seemann
bf96707f48 rename the wire.Header to ExtendedHeader
It's not encrypted yet.
2018-11-26 15:57:54 +07:00
Marten Seemann
cef26922b4 when parsing the header from the invariant header, start from first byte
This will be needed once we implement header encryption, because the
flags in the first byte are encrypted.
2018-11-26 15:57:54 +07:00
Marten Seemann
902853784b remove unused perspective from header parsing 2018-11-26 11:14:39 +07:00
Marten Seemann
44513a528c drop short header packets for unknown sessions 2018-11-20 12:21:26 +07:00
Marten Seemann
73ca6a06eb encode the original connection ID into the cookie 2018-11-10 17:12:50 +07:00
Marten Seemann
16848038be remove unnecessary initial packet number parameter 2018-11-02 17:14:31 +07:00
Marten Seemann
3266e36811 drop support for gQUIC 2018-10-30 10:20:39 +07:00
Marten Seemann
2d10796bc2 stop the listener in the server unit tests 2018-09-27 11:55:39 -06:00