Marten Seemann
2e4cef10ab
flowcontrol: rewrite tests, use require instead of Ginkgo ( #4734 )
2024-11-30 14:27:57 +08:00
Marten Seemann
36ed693996
flowcontrol: fix timestamp used for receive window auto-tuning ( #4735 )
2024-11-29 13:59:22 +08:00
Marten Seemann
40a768e77b
flowcontrol: avoid calling time.Now(), pass time as a function parameter ( #4731 )
2024-11-28 17:46:22 +08:00
Marten Seemann
90a824a849
flowcontrol: fix start of the flow-control auto-tuning period ( #4730 )
...
The period should start when the first frame is received, not when the data is
first read. This makes a difference when the first STREAM frame is received
out of order.
2024-11-28 15:48:42 +08:00
Marten Seemann
8754d28a6a
handshake: migrate tests away from Ginkgo ( #4667 )
2024-10-11 21:44:30 -07:00
Marten Seemann
3258060b48
utils: migrate tests away from Ginkgo ( #4675 )
2024-09-13 23:36:08 -07:00
Marten Seemann
672f906a40
wire: migrate tests away from Ginkgo ( #4643 )
...
* wire: translate ACK frame tests
* wire: translate CONNECTION_CLOSE frame tests
* wire: translate DATA_BLOCKED frame tests
* wire: translate DATAGRAM frame tests
* wire: translate HANDSHAKE_DONE frame tests
* wire: translate MAX_DATA frame tests
* wire: translate MAX_STREAM_DATA frame tests
* wire: translate MAX_STREAMS frame tests
* wire: translate NEW_CONNECTION_ID frame tests
* wire: translate NEW_TOKEN frame tests
* wire: translate PATH_CHALLENGE frame tests
* wire: translate PATH_RESPONSE frame tests
* wire: translate PING frame test
* wire: translate RESET_STREAM frame tests
* wire: translate RETIRE_CONNECTION_ID frame tests
* wire: translate STOP_SENDING frame tests
* wire: translate STREAM_DATA_BLOCKED frame tests
* wire: translate STREAMS_BLOCKED frame tests
* wire: translate CRYPTO frame tests
* wire: translate STREAM frame tests
* wire: translate version negotiation tests
* wire: translate header tests
* wire: translate pool tests
* wire: translate frame logging tests
* wire: translate short header tests
* wire: translate framer parser tests
* wire: translate transport parameter tests
2024-09-12 19:27:39 -07:00
Marten Seemann
7a10ed602d
utils: remove unused methods and constructor from RTTStats ( #4672 )
2024-09-12 00:55:57 -07:00
Marten Seemann
5247a8ee42
testdata: migrate tests away from Ginkgo ( #4670 )
2024-09-12 00:42:29 -07:00
Marten Seemann
06cfeb1034
ringbuffer: migrate test away from Ginkgo ( #4671 )
2024-09-12 00:26:02 -07:00
Marten Seemann
196c4bb16b
protocol: move away from Ginkgo ( #4650 )
2024-09-11 21:39:03 -07:00
Marten Seemann
889dc81333
qtls: migrate tests away from Ginkgo ( #4642 )
...
* qtls: migrate tests away from Ginkgo
* qtls: simplify the quic.EncryptionLevel <-> tls.EncryptionLevel test
* qtls: improve naming of tests
2024-09-11 20:40:26 -07:00
Marten Seemann
a21f6c1c41
qerr: move away from Ginkgo ( #4649 )
2024-09-11 00:50:06 -07:00
Marten Seemann
4be70e0146
protocol: use the packet number decoding / encoding logic from the RFC ( #4661 )
2024-09-05 09:54:44 -07:00
Marten Seemann
d067fe4156
bump Go version in go.mod, stop testing on Go 1.21 ( #4633 )
...
* bump Go version in go.mod, stop testing on Go 1.21
* ci: update golangci-lint to v1.60.1
* ignore Go 1.23 0-RTT events in exhaustive linter
2024-08-17 00:30:03 -07:00
Marten Seemann
f96923b5b2
logging: rename VersionNumber to Version ( #4621 )
2024-08-03 19:32:11 -07:00
Marten Seemann
f5ceb73171
handshake: generate CRYPTO_ERRORs for internal_error TLS alerts ( #4601 )
...
* handshake: generate CRYPTO_ERRORs for internal_error TLS alerts
* remove stray comment
2024-08-03 17:04:03 -07:00
Marten Seemann
e737d4a40e
wire: speed up parsing of headers with arbitrary length connection IDs ( #4618 )
...
This is significantly faster:
name old time/op new time/op delta
ArbitraryHeaderParsing/dest_8/_src_10-16 53.8ns ± 2% 27.4ns ± 2% -49.01% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16 61.6ns ± 1% 33.3ns ± 3% -46.00% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16 90.0ns ± 3% 54.8ns ± 5% -39.09% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
ArbitraryHeaderParsing/dest_8/_src_10-16 72.0B ± 0% 24.0B ± 0% -66.67% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16 96.0B ± 0% 48.0B ± 0% -50.00% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16 320B ± 0% 272B ± 0% -15.00% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
ArbitraryHeaderParsing/dest_8/_src_10-16 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16 3.00 ± 0% 2.00 ± 0% -33.33% (p=0.008 n=5+5)
2024-08-03 16:50:42 -07:00
Marten Seemann
87f2894af5
handshake: remove gomock tls.ClientSessionCache implementation ( #4619 )
2024-08-03 16:43:30 -07:00
Marten Seemann
b8ea5c7981
simplify generation of STREAM_DATA_BLOCKED frames ( #4608 )
...
The stream always gets blocked at the current write offset. There's no
need to return this offset from the flow controller.
2024-08-01 13:08:09 -07:00
Marten Seemann
047cc90f42
ackhandler: reduce allocations for tracking sent packets ( #4602 )
2024-07-31 16:37:05 -07:00
Marten Seemann
42f04d4e02
refactor frame packing to logic to not access the streams map ( #4596 )
...
* avoid accessing the streams map when packing stream data
* avoid accessing the streams map when packing flow control frames
* remove streamGetter interface
2024-07-28 12:32:54 -07:00
Marten Seemann
8451b0afd7
utils: remove scarcely used time helper functions ( #4593 )
2024-07-23 14:16:12 -07:00
Marten Seemann
e179048526
wire: simplify packet number parsing, remove utils.ByteOrder interface ( #4590 )
2024-07-21 14:50:21 -07:00
Marten Seemann
29550811b4
remove trivial IPv4 helper function ( #4591 )
2024-07-21 14:50:03 -07:00
Marten Seemann
5f8d146836
wire: optimize parsing of long header packets ( #4589 )
2024-07-21 14:22:32 -07:00
Marten Seemann
72092fbc29
move connection logging to a separate file, absorb logutils package ( #4586 )
...
No functional change expected.
2024-07-21 11:31:32 -07:00
Marten Seemann
c40d4ccb7f
ackhandler: optimize received packet tracking ( #4584 )
...
* ackhandler: use slice instead of linked list to track received packets
* ackhandler: add benchmark test for received packet history
* ackhandler: use the slices package for slice manipulations
2024-07-20 08:14:26 -07:00
Marten Seemann
82b275212c
handshake: remove unneeded tokenProtector interface ( #4585 )
2024-07-19 21:45:20 -07:00
Marten Seemann
7825250d3f
ci: use Go 1.23rc2 for unit and integration tests ( #4571 )
...
* ci: use Go 1.23rc1 for unit and integration tests
* handshake: avoid using linkname to access crypto/tls.cipherSuiteTLS13ByID
* ci: use use Go 1.23rc2
2024-07-18 10:20:54 -07:00
Marten Seemann
7379f1fd5e
handshake: ignore unknown QUIC events from crypto/tls ( #4577 )
2024-06-28 06:24:50 -07:00
Marten Seemann
07acaad2f7
add context to EarlyConnection.NextConnection, handle handshake failures ( #4551 )
2024-06-04 20:51:54 -07:00
Marten Seemann
459a6f3df9
fix the server's 0-RTT rejection logic when using GetConfigForClient ( #4550 )
2024-06-03 03:42:58 -07:00
Marten Seemann
dea2eafd1d
remove unused function parameter from qtls.SetupConfigForServer ( #4549 )
2024-06-03 00:12:12 -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
e41d1f9dd7
logging / qlog: add support for DPLPMTUD ( #4517 )
...
* logging / qlog: add support for DPLPMTUD
* improve the MTU discovery integration test
2024-05-14 02:37:54 -07:00
Marten Seemann
e90a0d4e03
increase initial packet size to 1280 bytes (for both IPv4 and IPv6) ( #4500 )
2024-05-08 20:55:19 -07:00
Marten Seemann
d1c1f18e4c
wire: write configured value of max_udp_payload_size transport parameter ( #4501 )
2024-05-07 21:30:28 -07:00
Marten Seemann
4f4da0423f
ci: disable exhaustive linter for test files ( #4499 )
2024-05-06 21:36:22 -07:00
Marten Seemann
b4210f8459
wire: reduce allocations when parsing transport parameters ( #4483 )
2024-05-05 05:48:48 -07:00
Marten Seemann
347a4afc51
wire: refactor header parsing to use quicvarint.Parse ( #4481 )
...
* wire: add benchmark tests for initial and retry header parsing
* wire: refactor header parsing to use quicvarint.Parse
* wire: simplify tracking of parsed length for Long Header parsing
2024-05-05 05:48:06 -07:00
Marten Seemann
f12ee48617
wire: use quicvarint.Parse when parsing frames ( #4484 )
...
* wire: add benchmarks for the frame parser
* wire: use quicvarint.Parse when parsing frames
* wire: always use io.EOF for too short frames
2024-05-05 04:28:28 -07:00
Marten Seemann
1514095afb
wire: use quicvarint.Parse to when parsing transport parameters ( #4482 )
...
* wire: add a benchmark for parsing of transport parameters
* wire: use quicvarint.Parse to when parsing transport parameters
2024-05-05 04:26:51 -07:00
Marten Seemann
394aa5640d
flowcontrol: make it possible to call Abandon multiple times ( #4459 )
...
Abandon is called when a RESET_STREAM frame is received, and marks the
bytes between the highest read position and the final offset as
consumed. Making it possible to call Abandon multiple times makes using
this API a bit easier, since the stream doesn't need to track if it
already called it.
2024-04-24 07:06:16 -07:00
bt90
75662469a1
increase send and receive buffer size to 7 MiB ( #4455 )
...
This increases throughput on high-bandwidth connections.
7 MB is the value that WireGuard uses, see
f26efb65f2
for details.
2024-04-23 13:28:14 -07:00
Marten Seemann
6325696fde
quicvarint: use int return value instead of internal protocol.ByteCount ( #4356 )
2024-03-19 14:56:55 -07:00
Marten Seemann
f1476390f2
update gomock to v0.4.0 ( #4361 )
2024-03-10 18:07:20 -07:00
Marten Seemann
71f5ae5ecb
handshake: optimize AEAD handling for long header sealers and openers ( #4323 )
2024-03-03 04:33:10 -08:00
Marten Seemann
f856163f1e
handshake: embed the mask as an array into the aesHeaderProtector ( #4324 )
2024-03-03 04:32:32 -08:00
Marten Seemann
284996e13c
qtls: protect the tls.ClientSessionCache implementation with a mutex ( #4319 )
...
This prevents a race condition when the underlying ClientSessionCache
provided by the application returns the same session ticket for multiple
connections. Reusing session tickets is explicitly recommended against
by both RFC 8446 and RFC 9001, but it's not forbidden. This fix only
benefits applications that compromise their users' privacy by reusing
session tickets.
2024-02-09 07:47:28 -08:00