Commit graph

167 commits

Author SHA1 Message Date
Marten Seemann
3ffea5d8c4 internalize the qerr package 2018-11-11 12:44:16 +07:00
Marten Seemann
70cb67bd2a check that the server sends the correct original_connection_id 2018-11-11 11:00:40 +07:00
Marten Seemann
a56b85a49a disable flaky client unit test on AppVeyor 2018-11-10 10:06:20 +07:00
Marten Seemann
ce257f3f23 replace quic.clemente.io by localhost in the client unit tests 2018-11-03 09:31:45 +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
82508f1562 use tls-tris instead of mint 2018-10-26 16:18:49 +07:00
Marten Seemann
a7f94d89b6 only allow a single retry 2018-10-24 23:48:33 +07:00
Marten Seemann
c1f55ba910 use tls.Config.ServerName for the passing the hostname around 2018-10-02 14:47:18 -07:00
Marten Seemann
c0d4f00b20 implement gQUIC 44 2018-08-28 08:49:29 +07:00
Marten Seemann
9608e8563f only accept 3 retries
While the server is allowed to perform multiple Retries, the client
should impose a limit in order to avoid being caught in an endless loop.
2018-08-14 18:35:25 +07:00
Marten Seemann
872e1747f4 always use connection IDs longer than 8 bytes when sending a Retry
A server is allowed to perform multiple Retries. There's little to gain
from doing so, but it's something our API allows. If a server performs
multiple Retries, it must use a connection ID that's at least 8 bytes
long. Only if it doesn't perform any further Retries it is allowed to
use shorter IDs. Therefore, we're on the safe side by always using a
long connection ID.
This shouldn't have a performance impact, since the server changes the
connection ID to a short value with the first Handshake packet it sends.
2018-08-14 17:34:21 +07:00
Marten Seemann
f88b7bb175 implement the new Retry mechanism 2018-08-13 08:47:29 +07:00
Marten Seemann
c8d20e86d7 move listening from the multiplexer to the packet handler map 2018-08-08 10:03:20 +07:00
Marten Seemann
7e2adfe19d rename the clientMultiplexer to connMultiplexer 2018-08-08 09:49:49 +07:00
Marten Seemann
a654e7600a move cutting of packets at the payload length to the multiplexer 2018-08-08 09:49:12 +07:00
Marten Seemann
cfa55f91bc close connections created by DialAddr when the session is closed 2018-08-08 08:45:47 +07:00
Marten Seemann
8b2992a243 split the Session.Close(error) in Close() and CloseWithError(error) 2018-07-06 15:51:35 +07:00
Marten Seemann
f806f9146b also use the multiplexer when dialing an address 2018-07-04 10:38:40 +07:00
Marten Seemann
f02dc92a32 make the connection ID length configurable 2018-07-03 18:34:31 +07:00
Marten Seemann
73f7636537 use a random length destination connection ID on the Initial packet
The destination connection ID on the Initial packet must be at least 8
bytes long. By using all valid values, we make sure that the everything
works correctly. The server chooses a new connection ID with the Retry
or Handshake packet it sends, so the overhead of this is negligible.
2018-07-03 18:01:41 +07:00
Marten Seemann
0bd7e744ff implement parsing of headers with different connection ID lengths 2018-07-03 18:01:41 +07:00
Marten Seemann
b682af20cf add some more tests for the client multiplexer 2018-07-03 17:30:51 +07:00
Marten Seemann
0928e91e4d remove closed clients from the multiplexer 2018-07-03 17:30:49 +07:00
Marten Seemann
4109c85c8a refactor header parsing in a version independent and dependent part 2018-07-01 09:01:30 +07:00
Marten Seemann
7b96d158d2 remove the OmitConnectionID field from the Header struct
Instead, just look at the length of the destination connection ID.
2018-06-24 17:21:41 +07:00
Marten Seemann
fc57bf6c35 only set the destination connection ID for the Public Header 2018-06-24 16:47:59 +07:00
Marten Seemann
97e734e973 refactor packet handling functions in the client 2018-06-23 08:20:27 +07:00
Marten Seemann
b3fd768a61 use a smaller packetHandler interface
The packetHandler interface just needs two methods: one for handling
packets, and one for closing.
2018-06-23 08:16:51 +07:00
Marten Seemann
b28615125d only accept authenticated Retry packets 2018-06-19 22:06:38 +07:00
Marten Seemann
3601f06aed only accept a single Retry packet for a connection 2018-06-19 21:49:59 +07:00
Marten Seemann
f26a68d45c implement dial functions that use a context 2018-06-14 16:15:32 +07:00
Marten Seemann
3e03055a7d use varint packet numbers in IETF QUIC headers 2018-06-06 16:07:47 +02:00
Marten Seemann
15da47cf98 use a GoMock mock session in the server and client tests 2018-05-30 21:10:44 +08:00
Marten Seemann
733e2e952b use callbacks for signaling the session status
Instead of exposing a session.handshakeStatus() <-chan error, it's
easier to pass a callback to the session which is called when the
handshake is done.
The removeConnectionID callback is in preparation for IETF QUIC, where a
connection can have multiple connection IDs over its lifetime.
2018-05-29 21:27:08 +08:00
Marten Seemann
c98afd6625 simplify version negotiation in the client 2018-05-15 11:02:21 +09:00
Marten Seemann
8f2fed1b10 parse IETF headers independent of the sender's perspective
The IETF header format allows parsing of the header without knowing
which peer sent the packet.
2018-05-09 13:28:30 +09:00
Marten Seemann
683b5823e4 handle gQUIC and IETF QUIC packets separately in the client 2018-05-08 15:17:16 +09:00
Marten Seemann
cc536fb895 cut packets at the payload length when receiving 2018-04-23 17:47:17 +09:00
Marten Seemann
fae32101a0 use different source and destination connection IDs 2018-04-23 15:23:01 +09:00
Marten Seemann
dd5d376d94 improve packet handling in the client 2018-04-23 11:40:25 +09:00
Marten Seemann
52d31dd7ef implement the new header format
Currently, we're only sending and accepting packets with matching source
and destination connection IDs.
2018-04-19 13:46:54 +09:00
Marten Seemann
1a035a265c change the type of Connection ID to byte slice 2018-04-18 22:41:24 +09:00
Marten Seemann
948eef3e42 create a logger interface and use it everywhere 2018-04-04 13:03:28 +07:00
Marten Seemann
624ac61412 reject unknown versions in the quic.Config 2018-02-26 11:07:06 +08:00
Marten Seemann
58b20c6009 make the number of incoming streams configurable, for IETF QUIC 2018-02-23 22:15:31 +08:00
Marten Seemann
99a2853e7d remove non forward-secure dialing
This was broken for a long time, and won't be available when using the
TLS 1.3 handshake.
2018-01-02 23:26:55 +07:00
Marten Seemann
c50b360fe8 disable flaky client test on AppVeyor 2017-12-20 15:55:08 +07:00
Marten Seemann
25a6dc9654 implement stateless handling of Initial packets for the TLS server 2017-12-08 08:45:54 +07:00
Marten Seemann
57c6f3ceb5 don't return the handshakeChan from the session constructor 2017-12-08 07:34:57 +07:00