Connection::close_session(code, reason) has the driver's worker write one DATA frame holding a WT_CLOSE_SESSION capsule (draft-ietf-webtrans-http3-16 §6) on the CONNECT stream at the highest send priority, FIN it, and wait at most two seconds for the peer to close its side before closing the QUIC connection with H3_NO_ERROR, so the connection's close cannot overtake the capsule. The reason is cut to 1024 bytes at a character boundary. After it, this end opens no stream and sends no datagram; a close asked for just as the last handle drops still goes out. A session the peer closes is ConnectionError::SessionClosed (the release reported it as ApplicationClosed, the variant of the QUIC connection's close, whose code under HTTP/3 is an HTTP/3 error code), and Connection::closed() reports the session's end as the driver saw it. Unit tests of the capsule's bytes against the draft's layout. The upstream's examples and dev-dependencies are left out so the crate's unit tests run from the workspace (cargo test -p wtransport --lib). VENDORED.md lists every change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
177 lines
3.8 KiB
TOML
177 lines
3.8 KiB
TOML
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
|
#
|
|
# When uploading crates to the registry Cargo will automatically
|
|
# "normalize" Cargo.toml files for maximal compatibility
|
|
# with all versions of Cargo and also rewrite `path` dependencies
|
|
# to registry (e.g., crates.io) dependencies.
|
|
#
|
|
# If you are reading this file be aware that the original Cargo.toml
|
|
# will likely look very different (and much more reasonable).
|
|
# See Cargo.toml.orig for the original contents.
|
|
|
|
[package]
|
|
edition = "2021"
|
|
rust-version = "1.88"
|
|
name = "wtransport"
|
|
version = "0.7.2"
|
|
authors = ["Biagio Festa"]
|
|
build = false
|
|
autolib = false
|
|
autobins = false
|
|
autoexamples = false
|
|
autotests = false
|
|
autobenches = false
|
|
description = "Implementation of the WebTransport (over HTTP3) protocol"
|
|
readme = "README.md"
|
|
keywords = ["webtransport"]
|
|
categories = [
|
|
"network-programming",
|
|
"asynchronous",
|
|
]
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/BiagioFesta/wtransport"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
rustdoc-args = [
|
|
"--cfg",
|
|
"docsrs",
|
|
]
|
|
|
|
[package.metadata.cargo_check_external_types]
|
|
allowed_external_types = [
|
|
"bytes::bytes::Bytes",
|
|
"quinn",
|
|
"quinn::connection::Connecting",
|
|
"quinn::connection::Connection",
|
|
"quinn::incoming::Incoming",
|
|
"quinn::recv_stream::ReadError",
|
|
"quinn::recv_stream::RecvStream",
|
|
"quinn::send_stream::SendStream",
|
|
"quinn::send_stream::WriteError",
|
|
"quinn_proto::config::ClientConfig",
|
|
"quinn_proto::config::EndpointConfig",
|
|
"quinn_proto::config::ServerConfig",
|
|
"quinn_proto::config::transport::TransportConfig",
|
|
"quinn_proto::connection::ConnectionError",
|
|
"rustls",
|
|
"rustls::client::client_conn::ClientConfig",
|
|
"rustls::server::server_conn::ServerConfig",
|
|
"rustls::verify::ServerCertVerifier",
|
|
"rustls::webpki::anchors::RootCertStore",
|
|
"time",
|
|
"time::Duration",
|
|
"time::offset_date_time::OffsetDateTime",
|
|
"tokio::io::async_read::AsyncRead",
|
|
"tokio::io::async_write::AsyncWrite",
|
|
"wtransport_proto",
|
|
"wtransport_proto::WEBTRANSPORT_ALPN",
|
|
"wtransport_proto::ids::SessionId",
|
|
"wtransport_proto::ids::StreamId",
|
|
"wtransport_proto::varint::VarInt",
|
|
]
|
|
|
|
[features]
|
|
aws-lc-rs = [
|
|
"quinn/aws-lc-rs",
|
|
"quinn/rustls-aws-lc-rs",
|
|
"rustls/aws-lc-rs",
|
|
"rcgen?/aws_lc_rs",
|
|
]
|
|
aws-lc-rs-fips = [
|
|
"quinn/aws-lc-rs-fips",
|
|
"quinn/rustls-aws-lc-rs-fips",
|
|
"rustls/fips",
|
|
"rcgen?/fips",
|
|
]
|
|
dangerous-configuration = []
|
|
default = [
|
|
"self-signed",
|
|
"ring",
|
|
]
|
|
fips = ["aws-lc-rs-fips"]
|
|
quinn = []
|
|
quinn-log = ["quinn/log"]
|
|
ring = [
|
|
"quinn/ring",
|
|
"quinn/rustls",
|
|
"rustls/ring",
|
|
"rcgen?/ring",
|
|
]
|
|
self-signed = ["dep:rcgen"]
|
|
|
|
[lib]
|
|
name = "wtransport"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies.bytes]
|
|
version = "1.4.0"
|
|
|
|
[dependencies.pem]
|
|
version = "3.0.4"
|
|
|
|
[dependencies.quinn]
|
|
version = "0.11.6"
|
|
features = ["runtime-tokio"]
|
|
default-features = false
|
|
|
|
[dependencies.rcgen]
|
|
version = "0.14.5"
|
|
optional = true
|
|
default-features = false
|
|
|
|
[dependencies.rustls]
|
|
version = "0.23.23"
|
|
default-features = false
|
|
|
|
[dependencies.rustls-native-certs]
|
|
version = "0.8.0"
|
|
|
|
[dependencies.rustls-pki-types]
|
|
version = "1.13.2"
|
|
|
|
[dependencies.sha2]
|
|
version = "0.11.0"
|
|
|
|
[dependencies.socket2]
|
|
version = "0.6.3"
|
|
|
|
[dependencies.thiserror]
|
|
version = "2.0.3"
|
|
|
|
[dependencies.time]
|
|
version = "0.3.21"
|
|
|
|
[dependencies.tokio]
|
|
version = "1.28.1"
|
|
features = [
|
|
"macros",
|
|
"fs",
|
|
"io-util",
|
|
"time",
|
|
]
|
|
default-features = false
|
|
|
|
[dependencies.tracing]
|
|
version = "0.1.37"
|
|
|
|
[dependencies.url]
|
|
version = "2.4.0"
|
|
|
|
[dependencies.wtransport-proto]
|
|
version = "0.7.2"
|
|
features = ["async"]
|
|
|
|
[dependencies.x509-parser]
|
|
version = "0.18.1"
|
|
|
|
[lints.clippy]
|
|
manual_is_variant_and = "warn"
|
|
manual_let_else = "warn"
|
|
unnecessary_cast = "deny"
|
|
|
|
[lints.rust]
|
|
unfulfilled_lint_expectations = "deny"
|
|
unit_bindings = "deny"
|
|
unsafe_op_in_unsafe_fn = "deny"
|
|
unused_qualifications = "warn"
|