Commit Graph

163 Commits

Author SHA1 Message Date
Marten Seemann
ed522ebbce make wire an internal package 2017-08-29 23:51:56 +07:00
Marten Seemann
1794636220 more the PublicHeader to the wire package 2017-08-29 23:45:38 +07:00
Marten Seemann
71e82677e1 add a quic.Config option to configure the idle timeout 2017-08-28 17:58:39 +07:00
Marten Seemann
dd0daaaf1e implement version-dependent parsing of the Public Header 2017-08-23 16:00:45 +07:00
Marten Seemann
79642d502e don't close the client connection when the Public Header can't be parsed
When receiving an unparseable packet with a spoofed remote address, we
should not close the connection.
2017-07-11 21:36:36 +07:00
Marten Seemann
0867352b26 implement receiving of Public Resets for the client
When a Public Reset is received, the client validates if it was sent
from the correct remote address and if the connection ID matches. When a
valid Public Reset is received, the connection is closed immediately.
2017-07-11 20:42:55 +07:00
krish7919 (Krish)
755dedf1ff Add keepalive support for clients in quic.Config
Fixes #525.
2017-07-05 20:29:28 +02:00
Marten Seemann
a851aaacda remove the tls.Config from the quic.Config
The tls.Config now is a separate parameter to all Listen and Dial
functions in the quic package.
2017-07-03 22:12:09 +02:00
Phus Lu
25f901bee3 use Config.TLSConfig.ServerName as client hostname if provided
Currently quic client always parse `hostname` from the addr. It prevent us to specific a different `hostname` to the client.

This PR is to enable this by the `TLSConfig.ServerName` field. Thanks.

Signed-off-by: Phus Lu <phuslu@hotmail.com>
2017-06-19 17:02:52 +08:00
Marten Seemann
99527cf3d4 log the local address when starting a new connection in the client 2017-06-16 15:00:48 +02:00
Thomas De Keulenaer
4fa7b9e569 Let server and client fill the flow variables 2017-06-13 16:42:06 +02:00
Thomas De Keulenaer
89f96d1e89 Make max flow control windows configurable 2017-06-13 15:52:51 +02:00
Marten Seemann
c0b09c8646 make utils an internal package 2017-06-09 22:28:40 +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
74f607ce21 implement DialAddrNonFWSecure for the client 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
612323985b remove the ConnStateCallback from the client
Dial and DialAddr return once the connection is forward secure. There is
currently no option to get the session earlier, this will be added later.
2017-05-16 00:56:02 +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
55fa713eac simplify the signature of the version selection 2017-05-05 18:07:17 +08:00
Marten Seemann
16ca3012e9 make it possible to configure the QUIC versions for the client 2017-05-05 18:07:11 +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
Marten Seemann
07cbfec931 drop version negotiation packets that list the version the client chose
fixes #569
2017-04-27 20:22:56 +07:00
Marten Seemann
194c56fcbc don’t pass version negotiation packets to the session
Version negotiation packets don’t have any payload. They must not be
passed to the session, because they’ll end up there as undecryptable
packets.
2017-04-27 20:09:14 +07:00
Lucas Clemente
e2a0d9f77c Remove several unused fields and symbols
Detected with `unused -exports=true ./...`
2017-04-05 21:46:33 +01:00
Marten Seemann
0ef6527165 simplify version negotiation code in the client 2017-03-22 18:31:23 +07:00
Marten Seemann
b4d22b3c75 fix race condition in the client 2017-03-22 16:50:33 +07:00
Marten Seemann
841421ef7a remove ineffective check for too large packets
closes #468
2017-03-15 09:30:06 +07:00
Marten Seemann
1f01904270 read packets with the maximum packet size
fixes #467
2017-03-06 13:02:46 +07:00
Lucas Clemente
1a0dc05211 improve documentation for our new API 2017-02-25 11:28:26 +01:00
Marten Seemann
7109883a95 call the ConnStateCallback in the client for encryption level changes
fixes #439
2017-02-24 09:19:08 +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
f53055b9a0 return packet handling and connection errors in Dial 2017-02-23 11:56:53 +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
8fd2ddf81c properly close the client 2017-02-22 23:03:09 +07:00
Marten Seemann
8247454b0f correctly handle connection errors in the client 2017-02-22 23:03:09 +07:00
Marten Seemann
96edca5219 privatize the client, only expose Dial functions 2017-02-22 23:03:09 +07:00
Marten Seemann
cd465ae0b5 move utils.Stream to quic.Stream 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
824f122a79 remove unused StreamCallback 2017-02-22 23:03:08 +07:00
Marten Seemann
a96211f724 create Session interface 2017-02-22 23:03:07 +07:00
Marten Seemann
f47142eaac remove stream ID from OpenStream() method 2017-02-22 23:03:05 +07:00
Marten Seemann
35242394e1 generate new connection ID after version negotiation
fixes #404
2017-02-06 15:42:37 +07:00
Marten Seemann
268841f0cc add a TLSClientConfig to the QUIC RoundTripper
fixes #407
2017-02-04 10:28:00 +07:00
Marten Seemann
86e02c4d2c use cryptographic random to generate new connection IDs
fixes #348
2017-01-18 14:19:53 +07:00
Marten Seemann
f286ba3d36 fix error code when there are no common version in version negotiation 2017-01-18 10:22:04 +07:00
Marten Seemann
db09de621c detect version downgrade attacks in the client crypto setup 2017-01-14 18:58:47 +07:00
Marten Seemann
9790418eb7 only close the client once 2017-01-14 18:58:44 +07:00
Marten Seemann
08c267431b implement closing the quic client with an error 2017-01-14 18:58:43 +07:00
Marten Seemann
b9f9c2e429 save correct hostname in quic Client 2017-01-14 18:58:43 +07:00