Gaukas Wang
4973374ea5
sync: quic-go 0.42.0
...
Signed-off-by: Gaukas Wang <i@gaukas.wang>
2024-04-23 22:34:55 -06:00
Gaukas Wang
95575f5fe7
break: update repo url [ci skip]
...
uTLS is not yet bumped to the new version, so this commit breaks the dependencies relationship by getting rid of the local replace.
2023-08-03 18:58:52 -06:00
Marten Seemann
58cedf7a4f
rename module, adjust import paths to quic-go/quic-go ( #3680 )
2023-01-21 19:53:57 -08:00
Marten Seemann
56985cbfd1
refactor the packet unpacker to remove version param from constructor
2023-01-18 20:53:45 +13:00
Marten Seemann
656f3d2d7d
remove the wire.ShortHeader in favor of more return values ( #3535 )
2022-08-30 04:37:36 -07:00
Marten Seemann
4f3d3b36ac
introduce a separate code path for unpacking short header packets
2022-08-29 15:55:37 +03:00
Marten Seemann
e3723a0ef1
move the check for empty payload to the unpacker
2022-08-29 13:11:58 +03:00
Marten Seemann
fd1b3a23c4
remove unneeded packet number field from the unpackedPacket
2022-08-29 13:11:57 +03: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
d35cce1aa3
Merge pull request #2903 from lucas-clemente/fix-packet-number-decoding
...
fix decoding of packet numbers in different packet number spaces
2020-12-04 09:20:22 +07:00
Marten Seemann
95334202c5
fix decoding of packet numbers in different packet number spaces
...
When QUIC abandoned the "stream 0" design, it introduced separate
packet number spaces for packets with different encryption levels.
Packet number compression now also works per packet number space.
The current code doesn't lead to any problems if the peer starts sending
with packet number 0, as we only exchange a few packets in the Initial
and the Handshake packet number space and there's nothing to compress.
It might lead to problems if the peer starts with a large packet number
in one space (which is allowed by the spec), and then starts with a
small packet number in another packet number space.
2020-12-03 23:35:27 +07:00
Marten Seemann
a76879c305
remove stray print statement
2020-11-24 09:05:23 +07:00
Marten Seemann
55a07c34ee
add the exhaustive linter
2020-10-05 13:47:57 +07:00
Marten Seemann
a528c4c4da
close session on errors unpacking errors other than decryption errors
2020-09-09 23:59:24 +07:00
Marten Seemann
e57caf0bae
send an INVALID_TOKEN error when receiving an invalid token
2020-02-25 19:43:57 +07:00
Marten Seemann
fc37cdc5c5
implement unpacking of 0-RTT packets
2019-12-30 18:39:21 +04:00
Zeymo
f711dfab2b
fix leftover use of Header.GetLength when unpacking packets
2019-12-17 12:22:31 +08:00
Marten Seemann
be59be9ef1
use the parsed header length when unpacking packets
2019-12-09 15:42:37 +08:00
Marten Seemann
6b22f36d82
add the stylecheck linter
2019-09-17 13:50:19 +07:00
Marten Seemann
bb48c9b31a
pass the time a packet was received to the short header opener
...
This saves us one time.Now() syscall per received 1-RTT packet.
2019-08-11 13:33:02 +07:00
Marten Seemann
7b9b711a77
fix timing side channel when reading headers with invalid reserved bits
2019-06-30 15:57:03 +07:00
Marten Seemann
598628d05b
use separate opener interfaces for long and short header packets
2019-06-22 20:01:18 +08:00
Marten Seemann
d4d3f09ee3
use separate functions per encryption level to get openers
2019-06-22 20:01:18 +08:00
Marten Seemann
855b643c7c
move frame parsing to the session
...
This way, we can handle every parsed frame directly, and avoid
allocating a slice of parsed frames.
2019-01-03 18:53:36 +07:00
Marten Seemann
3fb58da7e6
Merge pull request #1707 from lucas-clemente/remove-raw-header
...
remove unnecessary Raw byte slice from the header
2019-01-03 18:39:45 +07:00
Marten Seemann
5a37e8983d
remove unnecessary Raw byte slice from the header
2019-01-03 10:14:08 +07:00
Marten Seemann
ba45256b32
check that the packet is large enough for the header encryption sample
2019-01-01 13:06:02 +07:00
Marten Seemann
6ce7a204fc
move cutting of packets with a length to the packet handler map
2019-01-01 09:50:35 +07:00
Marten Seemann
413844d0bc
use in-place decryption when opening packets
2018-12-30 12:41:41 +07:00
Marten Seemann
d6c304610d
only queue packets for decryption if the opener is not yet available
2018-12-20 15:24:56 +06:30
Marten Seemann
605846cfd8
don't queue a packet for later decryption of decryption already failed
...
This was an optimization in gQUIC, which relied on trial decryption. In
IETF QUIC, we know with certainty which keys were used to encrypt a
packet, so if decryption fails once, we are certain it will never
succeed.
2018-12-19 15:56:01 +06:30
Marten Seemann
a638185f97
apply header encryption when packing and unpacking packets
2018-12-14 21:34:00 +06:30
Marten Seemann
67f923c736
return the Opener from the crypto setup
2018-12-14 16:46:40 +06:30
Marten Seemann
03489f56a7
handle the packet length before parsing the extended header
2018-12-14 16:46:40 +06:30
Marten Seemann
aaea375fb6
move parsing of the extended header to the unpacker
2018-12-14 16:46:40 +06:30
Marten Seemann
c912860a94
don't explicitely pass the header binary to the unpacker
2018-12-14 16:46:40 +06:30
Marten Seemann
ce6b9f2f1d
save the decoded packet number on the unpacked packet
2018-12-14 16:46:40 +06:30
Marten Seemann
a8e5309cd1
move packet number decoding to the unpacker
2018-12-14 16:46:40 +06:30
Marten Seemann
aba2c3d031
remove all references to Public Resets in comments
2018-11-28 11:58:05 +07:00
Marten Seemann
bf96707f48
rename the wire.Header to ExtendedHeader
...
It's not encrypted yet.
2018-11-26 15:57:54 +07:00
Marten Seemann
3ffea5d8c4
internalize the qerr package
2018-11-11 12:44:16 +07:00
Marten Seemann
2eed03c747
remove the header parameter for parsing frames
...
It was only needed for parsing STOP_WAITING frames.
2018-11-03 09:23:22 +07:00
Marten Seemann
90c538bae4
combine packetUnpackerBase and packetUnpacker
...
The split was only needed for unpacking gQUIC packets.
2018-11-02 18:30:33 +07:00
Marten Seemann
3266e36811
drop support for gQUIC
2018-10-30 10:20:39 +07:00
Marten Seemann
82508f1562
use tls-tris instead of mint
2018-10-26 16:18:49 +07:00
Marten Seemann
38efa84e9c
use in place decryption for unpacking packets
2018-04-04 14:56:45 +07:00
Marten Seemann
302d2a1715
don't use trial decryption for IETF QUIC
2018-03-31 14:29:44 +07:00
Marten Seemann
2fbc994d29
move the unencrypted STREAM frame check from the unpacker to the session
2018-03-31 14:29:44 +07:00
Marten Seemann
21b608daac
move frame parsing to the wire package
2018-03-25 18:07:44 +02:00
Marten Seemann
07b8821ef7
use pointer to byte slices in the buffer pool
...
https://staticcheck.io/docs/staticcheck#SA6002 suggests to use pointers
to objects in the sync.Pool.
2018-02-23 18:57:12 +08:00