Toby
2de4af00d0
fix client SNI handling ( #3613 )
...
* fix: client sni handling
* chore: add comment
2022-11-07 01:52:22 -08:00
João Oliveirinha
66f6fe0b71
add support for providing a custom Connection ID generator via Config ( #3452 )
...
* Add support for providing a custom ConnectionID generator via Config
This work makes it possible for servers or clients to control how
ConnectionIDs are generated, which in turn will force peers in the
connection to use those ConnectionIDs as destination connection IDs when sending packets.
This is useful for scenarios where we want to perform some kind
selection on the QUIC packets at the L4 level.
* add more doc
* refactor populate config to not use provided config
* add an integration test for custom connection ID generators
* fix linter warnings
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-08-24 04:06:16 -07:00
Didrik Nordström
d39a33f921
clone TLS conf in newClient ( #3400 )
...
Fixes #3394
2022-05-12 03:27:25 -07:00
Marten Seemann
4b17343631
rename the session to connection
2022-03-27 12:50:14 +01:00
Marten Seemann
9bc32cd021
rename the SessionTracingKey to ConnectionTracingKey
2022-03-27 11:27:25 +01:00
Marten Seemann
a088ba4607
rename quicConn.earlySessionReady to quicConn.earlyConnReady
2022-03-27 11:27:25 +01:00
Marten Seemann
1ae835d1d8
rename occurrences of session in client, server and packetHandlerMap
2022-03-27 11:27:25 +01:00
Marten Seemann
e7c2e7e147
rename the quicSession to quicConnection
2022-03-27 11:27:25 +01:00
Marten Seemann
6aaa9a817c
rename the EarlySession to EarlyConnection
2022-03-27 11:27:25 +01:00
Marten Seemann
e71c236232
rename the Session to Connection
2022-03-27 11:27:23 +01:00
Marten Seemann
dbb517858e
fix incorrect usage of errors.Is
...
errors.Is is supposed to used for equality of errors, not for type
assertions. That's what errors.As is there for.
2021-06-28 15:29:52 -07:00
Marten Seemann
592fb9cad9
introduce a dedicated qerr.TransportError and qerr.ApplicationError
2021-05-01 09:38:48 +07:00
Marten Seemann
878e0b261a
pass a context to logging.Tracer.NewConnectionTracer
...
This context has the same value attached to it as the context returned
by Session.Context().
In the case of a dialed connection, this context is derived from the
context used for dialing.
2021-04-14 16:59:36 +07:00
Marten Seemann
4917760726
attach a tracing ID to the session context
2021-04-14 16:39:41 +07:00
Marten Seemann
c30a45ef6f
don't pass the QUIC version to the StartedConnection event
...
The version might change in response to a Version Negotiation packet.
2021-04-02 17:33:49 +07:00
Olivier Poitrey
eb6bdfdfc1
Use the correct source IP when binding multiple IPs
...
When the server is listening on multiple interfaces or interfaces with
multiple IPs, the outgoing datagrams are sometime delivered with the
wrong source IP address.
In order to fix that, each quic connection needs to extract the
destination IP (and optionally interface id) of the received datagrams,
and set it as source IP (and interface) on the sent datagrams.
On most platforms, this can be done using ancillary data with recvmsg()
and sendmsg(). Some of the machinery for this is already there for ECN,
this change extends it to read the destination IP info and write it to
the outgoing packets.
Fix #1736
2021-03-16 00:50:05 +01:00
Marten Seemann
ad7d90779a
remove unused initialVersion variable in session
2020-12-18 12:00:17 +07:00
Yingrong Zhao
36add0e7a0
client: Add DialEarlyContext and DialAddrEarlyContext API
2020-10-07 22:20:28 -04:00
Egon Elbre
60bec77f0a
remove unnecessary locking
...
Fixes #2717
2020-09-22 15:43:32 +03:00
Marten Seemann
833027b065
introduce an ECNCapablePacketConn interface to determine ECN support
2020-09-15 14:41:06 +07:00
Marten Seemann
c978b6050c
Merge pull request #2711 from lucas-clemente/validate-quic-config
...
disallow values above 2^60 for Config.MaxIncoming{Uni}Streams
2020-08-18 06:58:55 +07:00
Marten Seemann
69df425318
limit Config.MaxIncoming{Uni}Streams to 2^60
2020-08-11 18:42:32 +07:00
Marten Seemann
89417ab5ca
simplify the connection, rename it to sendConn
2020-08-09 19:24:04 +07:00
Marten Seemann
2f63bc0731
pass a logging.Tracer to the packet handler map
2020-07-15 20:45:36 +07:00
Marten Seemann
ee24d3899e
simplify the Tracer interface by combining the TracerFor... methods
2020-07-11 13:22:52 +07:00
Marten Seemann
fd5f555f36
put the session in the packet handler map directly (for client sessions)
2020-07-10 09:29:43 +07:00
Marten Seemann
ac606222e0
replace the GetLogWriter quic.Config option by a Tracer interface
2020-07-01 16:57:03 +07:00
Marten Seemann
4121ea84f4
rename the logging.Tracer to ConnectionTracer
2020-07-01 16:57:01 +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
06ad477b9b
handle Version Negotiation packets in the session
2020-07-01 14:19:45 +07:00
Zero King
85cd490e9b
make DialEarly return EarlySession
...
Fixes https://github.com/lucas-clemente/quic-go/issues/2619 .
2020-06-22 04:52:15 +00:00
Marten Seemann
63e1153d4a
fix debug message when returning an early session
2020-06-08 08:52:30 +07:00
Marten Seemann
dad30e7c33
only create a single session for duplicate Initials
2020-05-29 16:04:45 +07:00
Marten Seemann
4e4ccdb007
fix qlogging of the remote address when dialing a new connection
2020-04-20 14:30:28 +07:00
Marten Seemann
70ede9d73a
qlog received version negotiation packets
2020-04-16 09:50:34 +07:00
Marten Seemann
5b7b9c84d4
qlog dropped version negotiation packets
2020-04-16 09:50:34 +07:00
Marten Seemann
80418be227
use a mock qlogger in the client tests
2020-04-16 09:50:34 +07:00
Marten Seemann
6ba147119d
set the qlogger as a member variable on the client
2020-04-16 09:50:34 +07:00
Marten Seemann
ef901e3435
use the current timestamp of every event in qlog
2020-03-23 16:25:42 +07:00
Marten Seemann
4109df32ff
copy the GetLogWriter callback when populating a quic.Config
2020-02-27 18:06:25 +07:00
Marten Seemann
14a5cc8ab4
add support for the connection_started event
2020-02-17 15:52:06 +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
f91dfda8c3
make the TLS cipher suites configurable
2020-02-01 15:58:40 +07:00
Marten Seemann
a93e544c94
remove Session.Close()
...
Session.Close() sends a transport-level error code. Applications should
not be able to call this function, but use CloseWithError() instead.
2020-01-26 17:41:53 +07:00
Marten Seemann
db396d8a78
rename packetHandlerMap.Close() to Destroy()
2020-01-22 17:59:22 +07:00
Marten Seemann
eeba3951ae
only enable 0-RTT when using ListenEarly and DialEarly
2020-01-17 11:22:12 +07:00
Marten Seemann
ce7583f813
add DialEarly and DialAddrEarly to dial 0-RTT connections
2020-01-01 18:04:02 +04:00
Marten Seemann
e9bced8d73
simplify populating the quic.Config
2019-12-11 12:41:26 +04:00
Marten Seemann
35ea8213c5
move initialization of the client's transport parameters to the session
2019-11-05 11:00:06 +07:00