Mark Rushakoff
e2031b7aeb
use clickable links in documentation, fix list styling ( #4955 )
...
* Update comment styles
1. Use doc links (the square brackets around identifiers) to make
clickable links on pkg.go.dev (https://go.dev/doc/comment#doclinks )
2. Indent lists so that they are rendered properly -- at which point go
fmt updates the bullet character to a dash
(https://go.dev/doc/comment#lists )
3. Add a couple missing punctuation marks
These all will improve the experience of browsing the quic-go docs on
pkg.go.dev.
* ignore SA1019 for the ConnectionTracingID
* ci: exclude ConnectionTracing(ID, Key) from staticlint in http3
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2025-04-14 07:44:29 +02:00
Marten Seemann
24acc54ef1
add support for connection migration ( #4960 )
2025-03-12 06:11:11 +01:00
Marten Seemann
eb70424fba
fix race condition on concurrent use of Transport.Dial and Close ( #4904 )
2025-01-21 17:52:16 +08:00
Marten Seemann
07bbe8c383
add ErrTransportClosed and use it for Listen/Dial after transport close ( #4883 )
...
* add ErrTransportClosed and use it for Listen/Dial after transport close
* include the original error in the ErrTransportClosed error string
2025-01-21 13:54:40 +08:00
Marten Seemann
62a94758e6
move dialing logic from the client into the Transport ( #4859 )
2025-01-14 16:40:20 +08:00
Marten Seemann
62947d97f5
simplify generation of stateless reset tokens ( #4858 )
2025-01-11 17:52:59 +08:00
Marten Seemann
9950b4c687
remove validation enforcing one Transport per net.PacketConn ( #4851 )
...
It is invalid to use a net.PacketConn in multiple Transports. However,
the validation logic is causing pain when using wrapped net.PacketConns.
It was introduce to guard against incorrect uses of the API when the
Transport was introduced, but this is probably less relevant now than it
was back then.
2025-01-10 09:32:52 +08:00
Marten Seemann
f337891fc8
trace packets that the transport doesn't send a stateless reset for ( #4826 )
2024-12-31 13:36:16 +08:00
Marten Seemann
c92207c72b
trace dropping of packets by the Transport when no server is set ( #4789 )
2024-12-23 18:54:46 +08:00
Marten Seemann
b493c5d827
migrate the transport tests away from Ginkgo ( #4783 )
...
* migrate the transport tests away from Ginkgo
* simplify mock net.PacketConn implementation
2024-12-23 14:47:44 +08:00
Marten Seemann
408ba9f053
use a 24h maximum token age if Transport.MaxTokenAge is unset ( #4763 )
2024-12-18 19:44:03 +08:00
Marten Seemann
363533dc7a
remove the Token field from the StatelessResetError ( #4740 )
...
There's nothing the application could possibly do with this value.
2024-12-02 13:57:46 +08:00
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