Commit graph

6411 commits

Author SHA1 Message Date
Mingye Chen
a157e2d9de Fix panic when using QUICRandomFrames 2025-01-17 19:06:48 -07:00
Mingye Chen
bbc1fe07d7 Add panic test 2025-01-17 19:06:48 -07:00
phoenix6936
98f5a5debc
Updates dependencies (#43)
* build(deps): bump the go_modules group across 2 directories with 1 update

Bumps the go_modules group with 1 update in the / directory: [golang.org/x/crypto](https://github.com/golang/crypto).
Bumps the go_modules group with 1 update in the /integrationtests/gomodvendor directory: [golang.org/x/crypto](https://github.com/golang/crypto).


Updates `golang.org/x/crypto` from 0.23.0 to 0.31.0
- [Commits](https://github.com/golang/crypto/compare/v0.23.0...v0.31.0)

Updates `golang.org/x/crypto` from 0.22.0 to 0.31.0
- [Commits](https://github.com/golang/crypto/compare/v0.23.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  dependency-group: go_modules
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update dependabot.yml

Signed-off-by: phoenix6936 <189024923+phoenix6936@users.noreply.github.com>

* Update dependabot.yml

Signed-off-by: phoenix6936 <189024923+phoenix6936@users.noreply.github.com>

* build(deps): bump github.com/onsi/gomega from 1.33.1 to 1.36.1

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.33.1 to 1.36.1.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.33.1...v1.36.1)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump github.com/refraction-networking/utls

Bumps [github.com/refraction-networking/utls](https://github.com/refraction-networking/utls) from 1.6.6 to 1.6.7.
- [Release notes](https://github.com/refraction-networking/utls/releases)
- [Commits](https://github.com/refraction-networking/utls/compare/v1.6.6...v1.6.7)

---
updated-dependencies:
- dependency-name: github.com/refraction-networking/utls
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump go.uber.org/mock from 0.4.0 to 0.5.0

Bumps [go.uber.org/mock](https://github.com/uber/mock) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/uber/mock/releases)
- [Changelog](https://github.com/uber-go/mock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uber/mock/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: go.uber.org/mock
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump github.com/onsi/ginkgo/v2 from 2.17.2 to 2.22.0

Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.17.2 to 2.22.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v2.17.2...v2.22.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump golang.org/x/net from 0.25.0 to 0.32.0

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.25.0 to 0.32.0.
- [Commits](https://github.com/golang/net/compare/v0.25.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump github.com/quic-go/qpack from 0.4.0 to 0.5.1

Bumps [github.com/quic-go/qpack](https://github.com/quic-go/qpack) from 0.4.0 to 0.5.1.
- [Release notes](https://github.com/quic-go/qpack/releases)
- [Commits](https://github.com/quic-go/qpack/compare/v0.4.0...v0.5.1)

---
updated-dependencies:
- dependency-name: github.com/quic-go/qpack
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump golang.org/x/time from 0.5.0 to 0.8.0

Bumps [golang.org/x/time](https://github.com/golang/time) from 0.5.0 to 0.8.0.
- [Commits](https://github.com/golang/time/compare/v0.5.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Run go mod tidy, rm toolchain

* Downgrade back to 1.21

* build(deps): bump github.com/quic-go/qpack from 0.4.0 to 0.5.1

Bumps [github.com/quic-go/qpack](https://github.com/quic-go/qpack) from 0.4.0 to 0.5.1.
- [Release notes](https://github.com/quic-go/qpack/releases)
- [Commits](https://github.com/quic-go/qpack/compare/v0.4.0...v0.5.1)

---
updated-dependencies:
- dependency-name: github.com/quic-go/qpack
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump go.uber.org/mock from 0.4.0 to 0.5.0

Bumps [go.uber.org/mock](https://github.com/uber/mock) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/uber/mock/releases)
- [Changelog](https://github.com/uber-go/mock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uber/mock/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: go.uber.org/mock
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump github.com/onsi/ginkgo/v2 from 2.17.2 to 2.22.0

Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.17.2 to 2.22.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v2.17.2...v2.22.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump github.com/onsi/gomega from 1.33.1 to 1.36.1

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.33.1 to 1.36.1.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.33.1...v1.36.1)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update go.mod

Signed-off-by: phoenix6936 <189024923+phoenix6936@users.noreply.github.com>

* Update go.sum

Signed-off-by: phoenix6936 <189024923+phoenix6936@users.noreply.github.com>

* Update go.sum

Signed-off-by: phoenix6936 <189024923+phoenix6936@users.noreply.github.com>

* Update go.sum

Signed-off-by: phoenix6936 <189024923+phoenix6936@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: phoenix6936 <189024923+phoenix6936@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mingye Chen <mingye.chen@colorado.edu>
2024-12-15 19:01:17 -07:00
Mingye Chen
cc7f02d9b9 Support non-zero lowest frame offset
The lowest offset of CRYPTO frames in a QUIC packet does not necessarily start at zero, such as the second packet of a connection using Kyber key in the client hello.
Also updates clienthellod to new repo.
2024-11-22 15:12:57 -07:00
Gaukas Wang
cb2c7f1296
deps: update to latest dependencies (#37)
Signed-off-by: Gaukas Wang <i@gaukas.wang>
2024-05-06 10:31:38 -06:00
Gaukas Wang
9178bdb6a5
fix: MaybePackProbePacket also use QUIC spec (#34)
Patch MaybePackProbePacket to also generate the initial packet based on the QUIC spec if set. This fixes the incorrect behavior observed on automatic retry on timeout (sending probe packet), where uquic was inccorectly sending the default frames (PADDING, CRYPTO) instead of specified frames by QUIC spec.

Signed-off-by: Gaukas Wang <i@gaukas.wang>
2024-05-02 19:09:00 -06:00
Gaukas Wang
164729a701
fix: cipherSuitesTLS13 linked to crypto/tls (#35)
This linkage issue caused the testing to fail, since we are modifying the available Cipher Suites from the TLS provider (crypto/tls -> utls) to manipulate the selection results.

Signed-off-by: Gaukas Wang <i@gaukas.wang>
2024-05-02 11:57:44 -06:00
dependabot[bot]
b24875057d
build(deps): bump actions/checkout from 3 to 4 (#28)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-24 00:40:27 -06:00
dependabot[bot]
8a76d80568
build(deps): bump actions/setup-go from 4 to 5 (#29)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-24 00:39:34 -06:00
dependabot[bot]
5e504393a9
build(deps): bump golang.org/x/net in /integrationtests/gomodvendor (#30)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-24 00:39:26 -06:00
dependabot[bot]
bd4a3dff02
build(deps): bump golang.org/x/crypto in /integrationtests/gomodvendor (#31)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.4.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.4.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-24 00:39:16 -06:00
Gaukas Wang
0018ce1ff4
sync: merge refraction-networking/sync-upstream-0-42-0 (#27)
sync: upstream quic-go v0.42.0

Signed-off-by: Gaukas Wang <i@gaukas.wang>
2024-04-23 22:33:05 -07:00
Gaukas Wang
05c12945b8
fix: build error after sync
Signed-off-by: Gaukas Wang <i@gaukas.wang>
2024-04-23 23:20:14 -06:00
Gaukas Wang
b66e1ed5f5
sync: 0.42.0 merge commit
Signed-off-by: Gaukas Wang <i@gaukas.wang>
2024-04-23 22:38:58 -06:00
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
dependabot[bot]
d40dde9b9b
build(deps): bump golang.org/x/net from 0.17.0 to 0.23.0 (#26) 2024-04-19 12:30:10 -06:00
dependabot[bot]
b5b59e42e9
build(deps): bump github.com/quic-go/quic-go from 0.39.4 to 0.42.0 (#25)
* build(deps): bump github.com/quic-go/quic-go from 0.39.4 to 0.42.0

Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go) from 0.39.4 to 0.42.0.
- [Release notes](https://github.com/quic-go/quic-go/releases)
- [Changelog](https://github.com/quic-go/quic-go/blob/master/Changelog.md)
- [Commits](https://github.com/quic-go/quic-go/compare/v0.39.4...v0.42.0)

---
updated-dependencies:
- dependency-name: github.com/quic-go/quic-go
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* bump: go minimum version 1.21

Signed-off-by: Gaukas Wang <i@gaukas.wang>

* update: github action scripts Go version

Signed-off-by: Gaukas Wang <i@gaukas.wang>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Gaukas Wang <i@gaukas.wang>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gaukas Wang <i@gaukas.wang>
2024-04-04 22:52:55 -06:00
Marten Seemann
4a99b816ae
close connection when an abnormally large number of frames are queued (#4369)
Under normal circumstances, we should be able to send out control frames
right away, so we don't expect any queue to build up. To defend against
resource exhaustion attacks, we limit the control frame queue to 16384
elements.
2024-03-17 17:29:00 -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
497d3f58a5
http3: add a RoundTripOpt to check the server's SETTINGS frame (#4355)
For some requests, the client is required to check the server's HTTP/3
SETTINGS. For example, a client is only allowed to send HTTP/3 datagrams
if the server explicitly enabled support.

SETTINGS are sent asynchronously on a control stream (usually the first
unidirectional stream). This means that the SETTINGS might not be
available at the beginning of the connection. This is not expected to be
the common case, since the server can send the SETTINGS in 0.5-RTT data,
but we have to be able to deal with arbitrary delays.

For WebTransport, there are even more SETTINGS values that the client
needs to check. By making CheckSettings a callback on the RoundTripOpt,
this entire validation logic can live at the WebTransport layer.
2024-03-12 01:03:00 -07:00
Marten Seemann
ca787d6f00
add an AddrVerified field to the ClientHelloInfo (#4360)
* add an AddressVerified field to the ClientHelloInfo

* rename ClientHelloInfo.AddressVerififed to ClientHelloInfo.AddrVerififed
2024-03-11 05:00:25 -07:00
Marten Seemann
f1476390f2
update gomock to v0.4.0 (#4361) 2024-03-10 18:07:20 -07:00
Marten Seemann
06b421411d
remove unused ReceiveStream.CloseRemote method (#4357) 2024-03-09 02:29:43 -08:00
Marten Seemann
5fd5d7770d
Merge pull request #4305 from quic-go/qlog-tracer
add a qlog tracer for events outside of QUIC connections
2024-03-09 19:59:14 +09:30
Marten Seemann
30e01b9524 use the transport tracer in integration tests 2024-03-09 19:32:15 +09:30
Marten Seemann
55c05aceed qlog: log sent packets outside of a QUIC connection 2024-03-09 19:32:15 +09:30
Marten Seemann
aff90a6ffa qlog: log sent Version Negotiation packets 2024-03-09 19:32:15 +09:30
Marten Seemann
3a7a53fdb9 qlog: log packet drops outside of a QUIC connection 2024-03-09 19:32:15 +09:30
Marten Seemann
2abbd41806 qlog: introduce a basic tracer for non-connection events 2024-03-09 19:32:15 +09:30
the harder the luckier
ac1268911e
improve API documentation for OpenStreamSync (#4352)
* docs: improve API documentation for OpenStreamSync

Both `OpenStream` and `OpenStreamSync` themselves only create steam objects locally, but `OpenStreamSync` does not add document descriptions, which will cause ambiguity.

* additional description
2024-03-06 16:37:35 -08:00
Thijs van Dien
a70419b49f
unmap IPv4-mapped IPv6 addresses (#4309) 2024-03-05 01:45:53 -08: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
dependabot[bot]
067e7db750
ci: bump docker/setup-buildx-action from 2 to 3 (#4349)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 04:30:28 -08:00
dependabot[bot]
dbbb6ca736
ci: bump docker/setup-qemu-action from 2 to 3 (#4345)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 03:45:33 -08:00
dependabot[bot]
5a70d18c77
ci: bump docker/login-action from 2 to 3 (#4348)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 03:45:01 -08:00
dependabot[bot]
b21bd58281
ci: bump docker/build-push-action from 4 to 5 (#4347)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 03:37:06 -08:00
dependabot[bot]
60b4a9c630
ci: bump actions/upload-artifact from 3 to 4 (#4346)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 03:36:31 -08:00
Sukun
d6269b71af
fix deadlock when concurrently closing server and transport (#4332)
* server: fix deadlock when closing concurrently with transport

* add test for checking no deadlock
2024-03-03 03:00:28 -08:00
Marten Seemann
ba1fbbe964
ci: enable Dependabot for GitHub Actions (#4343) 2024-03-03 00:15:49 -08:00
Marten Seemann
d41c0b68cd
http3: reject duplicate control streams opened by the client (#4344) 2024-03-02 23:52:52 -08:00
Marten Seemann
c5f7096f00
http3: reject duplicate control streams opened by the server (#4342) 2024-03-02 23:28:24 -08:00
Marten Seemann
9813766373
http3: send SETTINGS_ENABLE_CONNECT_PROTOCOL (for Extended CONNECT) (#4341) 2024-03-02 23:15:59 -08:00
Marten Seemann
0405634108
http3: don't automatically set RoundTripper.QuicConfig.EnableDatagrams (#4340)
If the user provides a quic.Config, we shouldn't modify it. Instead, we
should return an error if the user enables HTTP Datagrams but fails to
enable datagrams on the QUIC layer.
2024-03-02 22:39:21 -08:00
Marten Seemann
c786a46f42
remove unused perspective arg from packetHandlerMap.ReplaceWithClosed (#4330) 2024-02-10 19:27:51 -08:00
Marten Seemann
7b8ceaa264
remove unused getPerspective function from quicConn interface (#4329) 2024-02-10 19:05:27 -08:00
Marten Seemann
69fe37885f
reenable previously disabled server unit test (#4328) 2024-02-10 18:44:43 -08:00
Marten Seemann
07a17ffffb
remove unused GetVersion function from quicConn interface (#4327) 2024-02-10 18:38:38 -08:00
Marten Seemann
0a7823c991
ci: update golangci-lint to v1.56.1 and golangci-lint action to v4 (#4326) 2024-02-10 17:46:27 -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