Marten Seemann
44e0147f2e
pass a context to Transport.ConnContext ( #4536 )
...
* pass a context to Transport.ConnContext
This context is cancelled when the QUIC connection is closed, or when
the QUIC handshake fails. This allows the application to easily build
and garbage collect a map of active connections.
* correctly handle fresh contexts returned from ConnContext
2024-06-04 21:37:18 -07:00
Marten Seemann
0d1e27d77c
introduce Transport.ConnContext, use client's context on the connection ( #4507 )
...
* introduce Transport.ConnContext, use client's context on the connection
* panic if ConnContext returns nil
2024-05-26 21:30:19 -07:00
Marten Seemann
9971fedd42
use Transport.VerifySourceAddress to control the Retry Mechanism ( #4362 )
...
* use Transport.VerifySourceAddress to control the Retry Mechanism
This can be used to rate-limit handshakes originating from unverified
source addresses. Rate-limiting for handshakes can be implemented using
the GetConfigForClient callback on the Config.
* pass the remote address to Transport.VerifySourceAddress
2024-03-14 17:35:52 -07:00
Marten Seemann
4790797b58
only check for stateless resets if packet doesn't belong to a connection ( #4322 )
...
This technically violates the stateless reset handling logic described
in RFC 9000 section 10.3.1 (see comment), but it saves one map lookup in
the hot path.
2024-02-09 00:15:58 -08:00
Marten Seemann
07ec3245bd
logging: add a Close function to the Tracer ( #4298 )
...
* logging: add a Close function to the Tracer
* close the Tracer when the Transport is closed
2024-02-02 21:12:15 -08:00
Marten Seemann
a968e254a1
fix incorrect statement about connection ID lengths in the Transport ( #4247 )
2024-01-23 21:22:28 -08:00
Marten Seemann
a2cf43d75c
remove the RequireAddressValidation callback from the Config ( #4253 )
2024-01-22 21:24:07 -08:00
Marten Seemann
892851eb8c
add Transport config options to limit the number of handshakes ( #4248 )
...
* add Transport config options to limit the number of handshakes
* fix accounting for failed handshakes
* increase handshake limits, improve documentation
2024-01-22 21:04:25 -08:00
Marten Seemann
d4ab27de1f
don't set the TLS version in the transport ( #4135 )
...
This is already done in the crypto setup.
2023-10-31 22:27:13 -07:00
Marten Seemann
dda63b90eb
don't close established connections on Listener.Close, when using a Transport ( #4072 )
...
* don't close established connections on Listener.Close
* only close once
2023-10-26 23:10:13 -07:00
Marten Seemann
9010cfd2bb
remove unused unknownPacketHandler interface ( #4093 )
2023-09-17 05:20:13 -07:00
Marten Seemann
1affe38703
move MaxTokenAge configuration option to the Transport ( #4084 )
2023-09-16 05:10:20 -07:00
Marten Seemann
9b82196578
make the logging.Tracer and logging.ConnectionTracer a struct ( #4082 )
2023-09-16 04:58:51 -07:00
Marten Seemann
862e64c7b9
add a Transport config option for the key used to encrypt tokens ( #4066 )
...
* add a Transport config option for the key used to encrypt tokens
* handshake: remove unused error return values
2023-09-15 18:33:57 +07:00
Marten Seemann
b73a4de7ea
only add an ECN control message if ECN is supported
2023-09-11 20:31:50 +07:00
Marten Seemann
5dd6d91c11
send and track packets with ECN markings
2023-09-11 20:31:50 +07:00
Marten Seemann
090e505aa9
move GSO control message handling to the oobConn ( #4056 )
...
* move GSO control message handling to the oobConn
* disable OOB test on Windows
* improve GSO tests
* update ooConn.WritePacket comment
2023-08-31 00:49:27 -07:00
Marten Seemann
d7334c16e7
move the DisableVersionNegotiationPackets flag to the Transport ( #4047 )
...
* move the DisableVersionNegotiationPackets flag to the Transport
* add an integration test for DisableVersionNegotiationPackets
2023-08-30 23:33:40 -07:00
Marten Seemann
d22854641a
remove the port from the hostname used for tls.Config.ServerName ( #4046 )
2023-08-24 17:53:02 -07:00
Marten Seemann
fe3c4f271d
add a method to retrieve non-QUIC packets from the Transport ( #3992 )
2023-08-19 01:19:17 -07:00
Marten Seemann
4122eb7a7d
disable GSO if sending fails for a particular remote address
2023-08-16 22:09:29 +07:00
Marten Seemann
ca3842d6c8
automatically set the tls.Config.ServerName if unset ( #4032 )
2023-08-16 06:54:42 -07:00
Marten Seemann
2bcfe5bc4b
check for WSAEMSGSIZE errors when receiving UDP packets on Windows ( #3982 )
...
* check for WSAEMSGSIZE errors when receiving UDP packets on Windows
* check EMSGSIZE error on macOS
2023-07-20 20:31:57 -07:00
Marten Seemann
a347d664e2
remove OptimizeConn, add a Transport.WriteTo method instead ( #3957 )
...
* remove OptimizeConn, add a Transport.WriteTo method instead
* fix race condition in Transport.WriteTo
2023-07-19 10:28:11 -07:00
Marten Seemann
418b866e32
perform send / receive buffer increases when setting up the connection ( #3949 )
...
The UDP send and receive buffer is now increased when calling
OptimizeConn.
2023-07-12 10:54:20 -07:00
Marten Seemann
3d89e545d3
use the new crypto/tls QUIC Transport ( #3860 )
2023-07-01 11:15:00 -07:00
Marten Seemann
2f872ea0fb
update link to the wiki page about UDP buffer sizes ( #3924 )
2023-07-01 10:08:25 -07:00
kelmenhorst
0c54d416ee
transport: don't add connection to multiplexer if init fails ( #3931 )
...
* Remove conn from multiplexer when (*Transport).init fails
* Transport: AddConn to multiplexer directly before start listening
* Update transport_test.go
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2023-06-29 10:35:16 -07:00
Marten Seemann
da298d09e1
docs: improve documentation of OptimizeConn ( #3910 )
2023-06-21 02:52:43 -07:00
kelmenhorst
8352e5dc32
check for uninitialized fields when closing the Transport ( #3908 )
...
* close Transport: check for possibly uninitialized fields
* close Transport: close Conn, as conn might not be initialized
* close Transport: add test case
2023-06-21 02:14:57 -07:00
Marten Seemann
edaeed0107
embed the packetInfo in the receivedPacket struct
...
This avoid allocating the packetInfo struct when receiving a packet.
2023-06-03 10:44:16 +03:00
Marten Seemann
072a602cc1
pass around receivedPacket as struct instead of as pointer ( #3823 )
2023-06-03 00:08:58 -07:00
Marten Seemann
5b5ffa942b
pack packets into large buffers when GSO is available
2023-06-03 09:21:55 +03:00
Marten Seemann
727f9e5654
introduce a OptimizeConn function to manually enable UDP optimizations
2023-06-02 18:35:02 +03:00
Marten Seemann
ad79149738
improve document of the Transport and the dial and listen functions ( #3875 )
2023-06-02 03:45:40 -07:00
Sukun
f401a73d27
transport: send stateless reset packets from a single Go routine ( #3842 )
...
* don't spawn new go routine for every stateless packet
* pass *receivedPacket around
2023-05-20 00:53:18 -07:00
Marten Seemann
2ab17e20af
transport: increase the UDP send buffer size as well
2023-05-08 14:35:22 +03:00
Marten Seemann
1cd78f131f
move UDP receive buffer size manipulation to a separate file
2023-05-08 12:50:19 +03:00
Marco Munizaga
843b633434
use SO_RCVBUFFORCE to force receive buffer increase on Linux ( #3804 )
...
* Add ability to force change the receive buffer size using SO_RCVBUFFORCE in Linux
* Fix imports
* Update test
* Add sys_conn_helper_not_linux
* Rename file
* ignore the error on SetReadBuffer
* also run unit tests as root
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2023-05-08 02:40:47 -07:00
Marten Seemann
07ad2cbee2
remove Tracer from Config, put ConnectionTracer constructor there
2023-05-02 15:56:49 +02:00
Marten Seemann
5544f0f9a1
simplify connection handling for the client
2023-05-02 15:56:49 +02:00
Marten Seemann
ba942715db
remove ConnectionIDLength and ConnectionIDGenerator from the Config
2023-05-02 15:56:49 +02:00
Marten Seemann
b79b532b04
remove StatelessResetKey from the Config, it's now on the Transport
2023-05-02 15:56:49 +02:00
Marten Seemann
8189e75be6
implement the Transport
2023-05-02 15:56:48 +02:00