Skip to content

Commit d5678e0

Browse files
authored
Merge pull request #746 from gseddon/only-h3-changes
Implement experimental HTTP3 support
2 parents a57e595 + 49c6699 commit d5678e0

File tree

11 files changed

+1476
-163
lines changed

11 files changed

+1476
-163
lines changed

Cargo.lock

Lines changed: 340 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ rustls = [
2828
"dep:rustls-pki-types",
2929
]
3030
vsock = ["dep:tokio-vsock"]
31+
http3 = [
32+
"dep:h3",
33+
"dep:h3-quinn",
34+
"dep:quinn-proto",
35+
"dep:quinn",
36+
"dep:http"
37+
]
3138

3239
[dependencies]
3340
anyhow = "1.0.86"
@@ -60,6 +67,12 @@ rustls-native-certs = { version = "0.8.0", optional = true }
6067
tokio-rustls = { version = "0.26.0", optional = true }
6168
rustls-pki-types = { version = "1.7.0", optional = true }
6269

70+
h3 = { version = "0.0.7", optional = true }
71+
h3-quinn = { version = "0.0.9", optional = true }
72+
quinn-proto = { version = "0.11.10", optional = true, features = ["aws-lc-rs"]}
73+
http = { version = "1.3.1", optional = true }
74+
quinn = { version = "0.11.7", optional = true, features = ["aws-lc-rs", "runtime-tokio"]}
75+
6376
base64 = "0.22.1"
6477
rand = "0.9.1"
6578
rand_core = "0.9.3"
@@ -96,6 +109,8 @@ rcgen = { version = "0.13.1", features = ["aws_lc_rs"] }
96109
regex = "1.10.5"
97110
tempfile = "3.10.1"
98111
rustls = "0.23.18"
112+
rstest = "0.25.0"
113+
rstest_reuse = "0.7.0"
99114

100115
[target.'cfg(unix)'.dev-dependencies]
101116
actix-web = "4"
@@ -113,3 +128,6 @@ overflow-checks = false
113128

114129
[profile.release-ci]
115130
inherits = "pgo"
131+
132+
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies.socket2]
133+
version = "0.5"

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ This program is built on stable Rust, with both `make` and `cmake` prerequisites
2121

2222
You can optionally build oha against [native-tls](https://github.com/sfackler/rust-native-tls) instead of [rustls](https://github.com/rustls/rustls).
2323

24-
cargo install --no-default-features --features rustls oha
24+
cargo install --no-default-features --features native-tls oha
2525

2626
You can enable VSOCK support by enabling `vsock` feature.
2727

2828
cargo install --features vsock oha
2929

30+
You can enable experimental HTTP3 support by enabling the `http3` feature. This uses the [H3](https://github.com/hyperium/h3/r) library by the developers of Hyper.
31+
It will remain experimental as long as H3 is experimental. It currently depends on using `rustls` for TLS.
32+
3033
## Download pre-built binary
3134

3235
You can download pre-built binary from [Release page](https://github.com/hatoo/oha/releases) for each version and from [Publish workflow](https://github.com/hatoo/oha/actions/workflows/release.yml) and [Publish PGO workflow](https://github.com/hatoo/oha/actions/workflows/release-pgo.yml) for each commit.
@@ -166,7 +169,7 @@ Options:
166169
--proxy-http2
167170
Use HTTP/2 to connect to proxy. Shorthand for --proxy-http-version=2
168171
--http-version <HTTP_VERSION>
169-
HTTP version. Available values 0.9, 1.0, 1.1, 2.
172+
HTTP version. Available values 0.9, 1.0, 1.1, 2, 3.
170173
--http2
171174
Use HTTP/2. Shorthand for --http-version=2
172175
--host <HOST>

0 commit comments

Comments
 (0)