Skip to content

Commit 22da938

Browse files
Initial Webtransport support (#183)
Co-authored-by: Tei Roberts <ten3roberts@gmail.com> Co-authored-by: Dario Lencina <dario@securityunion.dev>
1 parent d9cae33 commit 22da938

32 files changed

+2929
-356
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ target/
1313
# macOS
1414
.DS_Store
1515
._*
16+
17+
# Example Certificates
18+
localhost-key.pem
19+
localhost.crt
20+
localhost.key
21+
localhost.pem

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
members = [
33
"h3",
44
"h3-quinn",
5+
"h3-webtransport",
56

67
# Internal
78
"examples",

examples/Cargo.toml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,37 @@ edition = "2018"
77
# If you copy one of the examples into a new project, you should be using
88
# [dependencies] instead.
99
[dev-dependencies]
10+
anyhow = "1.0"
1011
bytes = "1"
1112
futures = "0.3"
1213
h3 = { path = "../h3" }
1314
h3-quinn = { path = "../h3-quinn" }
15+
h3-webtransport = { path = "../h3-webtransport" }
1416
http = "0.2"
15-
quinn = { version = "0.10", default-features = false, features = ["runtime-tokio", "tls-rustls", "ring"] }
17+
quinn = { version = "0.10", default-features = false, features = [
18+
"runtime-tokio",
19+
"tls-rustls",
20+
"ring",
21+
] }
1622
rcgen = { version = "0.10" }
1723
rustls = { version = "0.21", features = ["dangerous_configuration"] }
1824
rustls-native-certs = "0.6"
1925
structopt = "0.3"
2026
tokio = { version = "1.27", features = ["full"] }
2127
tracing = "0.1.37"
22-
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi", "env-filter", "time", "tracing-log"] }
28+
tracing-subscriber = { version = "0.3", default-features = false, features = [
29+
"fmt",
30+
"ansi",
31+
"env-filter",
32+
"time",
33+
"tracing-log",
34+
] }
35+
octets = "0.2.0"
36+
37+
tracing-tree = { version = "0.2" }
38+
39+
[features]
40+
tree = []
2341

2442
[[example]]
2543
name = "client"
@@ -28,3 +46,7 @@ path = "client.rs"
2846
[[example]]
2947
name = "server"
3048
path = "server.rs"
49+
50+
[[example]]
51+
name = "webtransport_server"
52+
path = "webtransport_server.rs"

examples/launch_chrome.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
SPKI=`openssl x509 -inform der -in localhost.crt -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64`
6+
7+
echo "Got cert key $SPKI"
8+
9+
echo "Opening google chrome"
10+
11+
case `uname` in
12+
(*Linux*) google-chrome --origin-to-force-quic-on=127.0.0.1:4433 --ignore-certificate-errors-spki-list=$SPKI --enable-logging --v=1 ;;
13+
(*Darwin*) open -a "Google Chrome" --args --origin-to-force-quic-on=127.0.0.1:4433 --ignore-certificate-errors-spki-list=$SPKI --enable-logging --v=1 ;;
14+
esac
15+
16+
## Logs are stored to ~/Library/Application Support/Google/Chrome/chrome_debug.log

0 commit comments

Comments
 (0)