Commit graph

6429 commits

Author SHA1 Message Date
Mingye Chen
5aaa94569b fix: rm quic-go multiplexer
Some checks failed
Go Build / build (1.21.x, ubuntu-latest) (push) Successful in 31s
Go Build / build (1.22.x, ubuntu-latest) (push) Successful in 39s
Go Build / build (1.21.x, macos-latest) (push) Has been cancelled
Go Build / build (1.21.x, windows-latest) (push) Has been cancelled
Go Build / build (1.22.x, macos-latest) (push) Has been cancelled
Go Build / build (1.22.x, windows-latest) (push) Has been cancelled
2025-03-17 12:23:27 -06:00
Mingye Chen
6083564c7a feat: use Oscur0Accept independent of quic.server 2025-03-17 12:23:27 -06:00
Mingye Chen
4f7bfe31d0 fix: revert "fix: create sever on each pconn"
This reverts commit 3f93d5a348.
2025-03-17 12:23:27 -06:00
Mingye Chen
8316deb144 fix: create sever on each pconn 2025-03-17 12:23:27 -06:00
Mingye Chen
ad1633e9fe fix: start server run loop only after initialization 2025-03-17 12:23:27 -06:00
Mingye Chen
a04f02dbf9 fix: set tp.ConnectionIDLength 2025-03-17 12:23:27 -06:00
Mingye Chen
cc09271794 refactor: use same rw key in client and server 2025-03-17 12:23:27 -06:00
Mingye Chen
0fcb3d2e45 feat: add funcs for connection variables 2025-03-17 12:23:27 -06:00
Mingye Chen
e5ce91743d fix: do not send packets until first app write
Set MaxActiveConnectionId=1 to prevent sending control frame packets at the beginning of connection.
2025-03-17 12:23:09 -06:00
Mingye Chen
3f2dead301 Upd connection id 2025-03-17 12:23:09 -06:00
Mingye Chen
1f81a6cb8f Working resumed chat 2025-03-17 12:23:09 -06:00
Mingye Chen
b2aebe61d4 Add cid listen 2025-03-17 12:23:09 -06:00
Mingye Chen
368d017585 Implement setting client state 2025-03-17 12:23:09 -06:00
Mingye Chen
ff7775dfe3 Add parts of custom oscur0 conn 2025-03-17 12:23:09 -06:00
Mingye Chen
61f3a514ad Add certs 2025-03-17 12:23:09 -06:00
Mingye Chen
be3c42c940 Rm kyber 2025-03-17 12:23:09 -06:00
Mingye Chen
069466dad7 Add examples 2025-03-17 12:23:09 -06:00
Mingye Chen
22276ac464 Add example 2025-03-17 12:23:08 -06:00
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