Commit Graph

346 Commits

Author SHA1 Message Date
Marten Seemann
13a25a5ba5 use the correct error code for handshake timeouts 2017-06-01 20:02:57 +02:00
Marten Seemann
9040fd25e7 add a quic.Config option to set the handshake timeout 2017-06-01 19:47:28 +02:00
Marten Seemann
15a51c06c3 Merge pull request #627 from lucas-clemente/fix-303
add a quic.Config option to verify source address tokens
2017-05-27 13:23:50 +08:00
Marten Seemann
ac21fc3349 Merge pull request #619 from lucas-clemente/fix-444
improve logging
2017-05-26 17:53:03 +08:00
Marten Seemann
87df63dd5f add a quic.Config option to verify source address tokes 2017-05-25 11:49:19 +08:00
Marten Seemann
e68e2d287a pass remote address to cryptoSetupServer 2017-05-20 23:27:38 +08:00
Marten Seemann
7e256e0ebe log timestamps 2017-05-16 12:19:36 +08:00
Marten Seemann
996fad14f8 remove unsafe from the session tests for the crypto setup 2017-05-16 10:55:55 +08:00
Marten Seemann
9fad63ff50 improve client tests
Use a mock newClientSession. That way, it’s a lot easier to test dialing
new connections.
2017-05-16 00:56:09 +08:00
Marten Seemann
889d3b38f8 remove the cryptoChangeCallback from the server 2017-05-16 00:56:09 +08:00
Marten Seemann
2bfa7e59cb implement DialNonFWSecure for the client 2017-05-16 00:56:09 +08:00
Marten Seemann
e6aeb143a7 simplify the blocking logic for the non-forward-secure session 2017-05-16 00:56:08 +08:00
Marten Seemann
cb8bea73c7 implement a non-forward-secure session 2017-05-16 00:56:08 +08:00
Marten Seemann
4fd410700d properly handle errors that occur while handling packets in the session
fixes #614
2017-05-14 10:05:15 +08:00
Marten Seemann
7a18b870e8 add a quic.Config option to ask the server to truncate the connection ID 2017-05-13 17:19:09 +08:00
Marten Seemann
650af86c70 pass the quic.Config to the session 2017-05-13 17:08:15 +08:00
Marten Seemann
69d5f3c262 send ConnectionCloses and PublicReset from the session run loop
This avoids several race conditions that can occur when trying to pack
packets and to write to the underlying connection concurrently.
2017-05-10 15:38:40 +08:00
Marten Seemann
75308ab56e improve runClosed channel semantics in session 2017-05-10 11:32:57 +08:00
Marten Seemann
ab613c3ab0 use a directed aeadChanged chan in the session 2017-05-09 18:42:49 +08:00
Marten Seemann
0a6a9551f8 close the aeadChanged chan when the handshake completes
This allows us to remove HandshakeComplete() from the CryptoSetup
interface. It also provides a signal to the session when the handshake
completes.
2017-05-09 18:40:23 +08:00
Marten Seemann
b305cd674f make it possible to configure the QUIC versions for the server 2017-05-05 18:05:57 +08:00
Lucas Clemente
fa12f3664d Merge pull request #582 from lucas-clemente/improve-ackhandler-logs
Improve ackhandler logs
2017-05-05 10:48:35 +02:00
Marten Seemann
a6f67c7e14 simplify error handling in the session 2017-05-03 14:07:53 +08:00
Marten Seemann
96e49b0c31 remove the closeCallback from the session
The closeCallback was run when a session was closed, i.e. after the run
loop of the session stopped. Instead of explicitely calling this callback
from the session, the caller of session.run() can just execute the code
after session.run() returns.
2017-05-03 14:06:47 +08:00
Lucas Clemente
a2e079c052 Remove an unnecessary error return value 2017-04-30 15:32:01 +02:00
Lucas Clemente
013d7fdb30 Simplify code in a few places
Found by running `gosimple ./...`
2017-04-13 16:43:58 +02:00
Marten Seemann
81e06c1f02 don’t send a Public Reset if trial decryption succeeds
fixes #516
2017-04-11 10:45:08 +07:00
Marten Seemann
8565fdf722 fix limit of undecrytable packets queue length
fixes #517
Also fixes an off-by-one error, such that the queue now holds exactly
protocol.MaxUndecrytablePackets packets when enough undecryptable
packets are received.
2017-04-11 10:37:25 +07:00
Lucas Clemente
612fa16a43 Move SentPacketHandler.CheckForError into SentPacket 2017-04-02 10:29:09 +02:00
Lucas Clemente
1c5380c49b Implement loss recovery from the current WG draft
Fixes #498 and will hopefully go a long way towards fixing the many
flaky tests.
2017-04-02 10:29:09 +02:00
Marten Seemann
6d5c9776e9 send a Public Reset when receiving a CHLO with the FHL2 tag
Fixes #411.

Chrome sends the FHL2 when it wants to perform a head-of-line blocking
experiment, introduced in QUIC version 36 (see
https://codereview.chromium.org/2115033002). We don’t support this
experiment. By sending a Public Reset when receiving this tag we force
Chrome to use the TCP fallback.
2017-03-20 12:35:34 +07:00
Marten Seemann
34b688b3b9 add a LocalAddr to the Session 2017-03-10 00:07:27 +07:00
Marten Seemann
eb7ed2624a only send Public Reset after a timeout
fixes #471
2017-03-08 18:15:52 +07:00
Marten Seemann
936a29ff35 retransmit packets with the encryption level they were sent with 2017-03-01 14:11:25 +07:00
Marten Seemann
7d2922d7ab save the encryption level of a sent packet in the SentPacketHandler 2017-03-01 14:09:50 +07:00
Marten Seemann
9e147714ac pack smaller packets as long as the encryption is not forward secure 2017-03-01 14:01:52 +07:00
Marten Seemann
6cb19e42a5 explicitly pass encryption level in the aeadChanges channel 2017-02-25 21:38:08 +07:00
Marten Seemann
b84e945868 log the encryption level of sent and received packets 2017-02-25 08:27:15 +07:00
Marten Seemann
820eb2e6ee call the ConnStateCallback in the server for encryption level changes
ref #439
2017-02-24 08:42:49 +07:00
Marten Seemann
8bfeb2ea8d return from Dial after conn is forward-secure, unless ConnState is given 2017-02-22 23:03:10 +07:00
Marten Seemann
cd465ae0b5 move utils.Stream to quic.Stream 2017-02-22 23:03:09 +07:00
Marten Seemann
592ef45fdf add OpenStreamSync() method to Session interface 2017-02-22 23:03:09 +07:00
Marten Seemann
af4b36b002 use a connection in the Client 2017-02-22 23:03:08 +07:00
Marten Seemann
d61c0eb85d add a Write and a Close method to the connection interface 2017-02-22 23:03:08 +07:00
Marten Seemann
824f122a79 remove unused StreamCallback 2017-02-22 23:03:08 +07:00
Marten Seemann
6dd163020a never return stream 1 from Session.AcceptStream() 2017-02-22 23:03:07 +07:00
Marten Seemann
a96211f724 create Session interface 2017-02-22 23:03:07 +07:00
Marten Seemann
5b42675da2 use a net.PacketConn instead of a net.UDPConn in Server and Session 2017-02-22 23:03:07 +07:00
Marten Seemann
c533a9adb8 implement an AcceptStream method in the Session 2017-02-22 23:03:06 +07:00
Marten Seemann
f47142eaac remove stream ID from OpenStream() method 2017-02-22 23:03:05 +07:00