Skip to content

Commit

Permalink
Initial Webtransport support (#183)
Browse files Browse the repository at this point in the history
Co-authored-by: Tei Roberts <[email protected]>
Co-authored-by: Dario Lencina <[email protected]>
  • Loading branch information
3 people authored Jun 13, 2023
1 parent d9cae33 commit 22da938
Show file tree
Hide file tree
Showing 32 changed files with 2,929 additions and 356 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ target/
# macOS
.DS_Store
._*

# Example Certificates
localhost-key.pem
localhost.crt
localhost.key
localhost.pem
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
members = [
"h3",
"h3-quinn",
"h3-webtransport",

# Internal
"examples",
Expand Down
26 changes: 24 additions & 2 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,37 @@ edition = "2018"
# If you copy one of the examples into a new project, you should be using
# [dependencies] instead.
[dev-dependencies]
anyhow = "1.0"
bytes = "1"
futures = "0.3"
h3 = { path = "../h3" }
h3-quinn = { path = "../h3-quinn" }
h3-webtransport = { path = "../h3-webtransport" }
http = "0.2"
quinn = { version = "0.10", default-features = false, features = ["runtime-tokio", "tls-rustls", "ring"] }
quinn = { version = "0.10", default-features = false, features = [
"runtime-tokio",
"tls-rustls",
"ring",
] }
rcgen = { version = "0.10" }
rustls = { version = "0.21", features = ["dangerous_configuration"] }
rustls-native-certs = "0.6"
structopt = "0.3"
tokio = { version = "1.27", features = ["full"] }
tracing = "0.1.37"
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi", "env-filter", "time", "tracing-log"] }
tracing-subscriber = { version = "0.3", default-features = false, features = [
"fmt",
"ansi",
"env-filter",
"time",
"tracing-log",
] }
octets = "0.2.0"

tracing-tree = { version = "0.2" }

[features]
tree = []

[[example]]
name = "client"
Expand All @@ -28,3 +46,7 @@ path = "client.rs"
[[example]]
name = "server"
path = "server.rs"

[[example]]
name = "webtransport_server"
path = "webtransport_server.rs"
16 changes: 16 additions & 0 deletions examples/launch_chrome.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

SPKI=`openssl x509 -inform der -in localhost.crt -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64`

echo "Got cert key $SPKI"

echo "Opening google chrome"

case `uname` in
(*Linux*) google-chrome --origin-to-force-quic-on=127.0.0.1:4433 --ignore-certificate-errors-spki-list=$SPKI --enable-logging --v=1 ;;
(*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 ;;
esac

## Logs are stored to ~/Library/Application Support/Google/Chrome/chrome_debug.log
Loading

0 comments on commit 22da938

Please sign in to comment.