Skip to content

Get the negotiated protocol to support WebTransport#3466

Open
jesup wants to merge 1 commit intousers/jesup/drainingfrom
users/jesup/sub_protocol
Open

Get the negotiated protocol to support WebTransport#3466
jesup wants to merge 1 commit intousers/jesup/drainingfrom
users/jesup/sub_protocol

Conversation

@jesup
Copy link
Copy Markdown
Member

@jesup jesup commented Mar 16, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 16, 2026 04:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for capturing and exposing the negotiated WebTransport subprotocol (from the server’s wt-protocol response header) so callers can query it by session ID.

Changes:

  • Add plumbing to store a negotiated protocol on WebTransport sessions and expose it via a new Http3Client::webtransport_session_protocol() API.
  • Parse wt-protocol from extended CONNECT response headers and store it on the session protocol handler.
  • Extend server-side session acceptance to optionally include extra response headers (used by new WebTransport protocol tests).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
neqo-http3/src/lib.rs Adds a default session_protocol() hook on the internal Stream trait.
neqo-http3/src/features/extended_connect/webtransport_session.rs Stores negotiated protocol on WebTransport session protocol object and exposes getter/setter via Protocol.
neqo-http3/src/features/extended_connect/session.rs Extracts wt-protocol from response headers and wires protocol value into the session’s protocol handler; exposes it via Stream::session_protocol().
neqo-http3/src/connection_client.rs Adds public client API to retrieve negotiated protocol by session ID.
neqo-http3/src/connection.rs Adds SessionAcceptAction::AcceptWith to include extra response headers; adds internal getter for session protocol.
neqo-http3/src/features/extended_connect/tests/webtransport/sessions.rs Adds tests for wt-protocol parsing/availability.

Comment thread neqo-http3/src/features/extended_connect/session.rs Outdated
Comment thread neqo-http3/src/connection.rs
Comment thread neqo-http3/src/connection.rs Outdated
Comment thread neqo-http3/src/connection.rs Outdated
Comment thread neqo-http3/src/connection_client.rs
Comment thread neqo-http3/src/features/extended_connect/session.rs Outdated
@jesup jesup force-pushed the users/jesup/draining branch from 66d783f to 798edf9 Compare March 17, 2026 15:32
@jesup jesup force-pushed the users/jesup/sub_protocol branch from c2bb439 to 58be5ff Compare March 17, 2026 18:43
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 83.67347% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.39%. Comparing base (1f45777) to head (c140eef).

Additional details and impacted files
@@                  Coverage Diff                  @@
##           users/jesup/draining    #3466   +/-   ##
=====================================================
  Coverage                 94.38%   94.39%           
=====================================================
  Files                       133      133           
  Lines                     40275    40323   +48     
  Branches                  40275    40323   +48     
=====================================================
+ Hits                      38015    38063   +48     
+ Misses                     1408     1406    -2     
- Partials                    852      854    +2     
Flag Coverage Δ
freebsd 78.55% <ø> (ø)
linux 94.51% <83.67%> (-0.02%) ⬇️
macos 94.48% <83.67%> (+0.01%) ⬆️
windows 94.50% <83.67%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
neqo-common 98.61% <ø> (ø)
neqo-crypto 86.49% <ø> (ø)
neqo-http3 93.90% <83.67%> (-0.05%) ⬇️
neqo-qpack 95.14% <ø> (ø)
neqo-transport 95.64% <ø> (+0.04%) ⬆️
neqo-udp 84.90% <ø> (ø)
mtu 86.61% <ø> (ø)

Copy link
Copy Markdown
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two comments, otherwise looks good to me.

Comment thread neqo-http3/src/features/extended_connect/webtransport_session.rs Outdated
Comment thread neqo-http3/src/connection.rs Outdated
@larseggert larseggert added the needs-rebase PR needs rebasing before it can be merged. label Apr 8, 2026
@jesup jesup force-pushed the users/jesup/draining branch 3 times, most recently from 496a483 to 1f45777 Compare April 29, 2026 03:54
@jesup jesup force-pushed the users/jesup/sub_protocol branch from 58be5ff to c140eef Compare April 29, 2026 03:54
@jesup
Copy link
Copy Markdown
Member Author

jesup commented Apr 29, 2026

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results

Significant performance differences relative to 1f45777.

transfer/1-conn/1-100mb-resp (aka. Download): 💚 Performance has improved by -2.0516%.
       time:   [208.27 ms 208.62 ms 209.03 ms]
       thrpt:  [478.39 MiB/s 479.35 MiB/s 480.15 MiB/s]
change:
       time:   [-2.2902% -2.0516% -1.8075] (p = 0.00 < 0.05)
       thrpt:  [+1.8407% +2.0946% +2.3439]
       Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
transfer/1-conn/1-100mb-req (aka. Upload): 💚 Performance has improved by -2.2296%.
       time:   [208.97 ms 209.31 ms 209.66 ms]
       thrpt:  [476.97 MiB/s 477.76 MiB/s 478.53 MiB/s]
change:
       time:   [-2.4881% -2.2296% -1.9890] (p = 0.00 < 0.05)
       thrpt:  [+2.0293% +2.2804% +2.5515]
       Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
All results
transfer/1-conn/1-100mb-resp (aka. Download): 💚 Performance has improved by -2.0516%.
       time:   [208.27 ms 208.62 ms 209.03 ms]
       thrpt:  [478.39 MiB/s 479.35 MiB/s 480.15 MiB/s]
change:
       time:   [-2.2902% -2.0516% -1.8075] (p = 0.00 < 0.05)
       thrpt:  [+1.8407% +2.0946% +2.3439]
       Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS): Change within noise threshold.
       time:   [284.94 ms 286.77 ms 288.62 ms]
       thrpt:  [34.648 Kelem/s 34.871 Kelem/s 35.095 Kelem/s]
change:
       time:   [-1.9836% -1.1782% -0.3502] (p = 0.01 < 0.05)
       thrpt:  [+0.3514% +1.1922% +2.0237]
       Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) low mild
2 (2.00%) high mild
transfer/1-conn/1-1b-resp (aka. HPS): Change within noise threshold.
       time:   [38.424 ms 38.548 ms 38.690 ms]
       thrpt:  [25.847   B/s 25.941   B/s 26.025   B/s]
change:
       time:   [-1.1590% -0.5873% -0.0403] (p = 0.04 < 0.05)
       thrpt:  [+0.0403% +0.5908% +1.1726]
       Change within noise threshold.
Found 5 outliers among 100 measurements (5.00%)
1 (1.00%) high mild
4 (4.00%) high severe
transfer/1-conn/1-100mb-req (aka. Upload): 💚 Performance has improved by -2.2296%.
       time:   [208.97 ms 209.31 ms 209.66 ms]
       thrpt:  [476.97 MiB/s 477.76 MiB/s 478.53 MiB/s]
change:
       time:   [-2.4881% -2.2296% -1.9890] (p = 0.00 < 0.05)
       thrpt:  [+2.0293% +2.2804% +2.5515]
       Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
streams/walltime/1-streams/each-1000-bytes: Change within noise threshold.
       time:   [582.86 µs 583.41 µs 584.35 µs]
       change: [-1.4507% -1.0633% -0.6964] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 5 outliers among 100 measurements (5.00%)
4 (4.00%) high mild
1 (1.00%) high severe
streams/walltime/1000-streams/each-1-bytes: No change in performance detected.
       time:   [12.313 ms 12.332 ms 12.351 ms]
       change: [-0.1599% +0.0504% +0.2605] (p = 0.64 > 0.05)
       No change in performance detected.
streams/walltime/1000-streams/each-1000-bytes: No change in performance detected.
       time:   [45.067 ms 45.113 ms 45.160 ms]
       change: [-0.1333% +0.0099% +0.1643] (p = 0.90 > 0.05)
       No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high mild
transfer/walltime/pacing-false/varying-seeds: Change within noise threshold.
       time:   [23.129 ms 23.153 ms 23.182 ms]
       change: [+0.3446% +0.4837% +0.6453] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) low mild
1 (1.00%) high mild
1 (1.00%) high severe
transfer/walltime/pacing-true/varying-seeds: No change in performance detected.
       time:   [23.341 ms 23.360 ms 23.381 ms]
       change: [-0.1377% -0.0299% +0.0816] (p = 0.59 > 0.05)
       No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severe
transfer/walltime/pacing-false/same-seed: Change within noise threshold.
       time:   [23.107 ms 23.131 ms 23.164 ms]
       change: [+0.5014% +0.6298% +0.7997] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) low mild
1 (1.00%) high severe
transfer/walltime/pacing-true/same-seed: Change within noise threshold.
       time:   [23.781 ms 23.803 ms 23.827 ms]
       change: [+1.6894% +1.8046% +1.9336] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe

Download data for profiler.firefox.com or download performance comparison data.

@github-actions
Copy link
Copy Markdown
Contributor

Failed Interop Tests

QUIC Interop Runner, client vs. server, differences relative to users/jesup/draining at 1f45777.

neqo-pr as clientneqo-pr as server
neqo-pr vs. go-x-net: BP BA
neqo-pr vs. haproxy: BP BA
neqo-pr vs. kwik: ⚠️C1 BP BA
neqo-pr vs. linuxquic: 🚀L1 ⚠️C1
neqo-pr vs. lsquic: L1 C1
neqo-pr vs. msquic: A L1 C1
neqo-pr vs. mvfst: A BP BA
neqo-pr vs. neqo: A
neqo-pr vs. nginx: BP BA
neqo-pr vs. ngtcp2: CM
neqo-pr vs. picoquic: A ⚠️BP
neqo-pr vs. quic-go: A
neqo-pr vs. quiche: BP BA
neqo-pr vs. s2n-quic: BA CM
neqo-pr vs. tquic: S BP BA
neqo-pr vs. xquic: A C1
aioquic vs. neqo-pr: 🚀C1 CM
go-x-net vs. neqo-pr: CM
kwik vs. neqo-pr: BP BA CM
msquic vs. neqo-pr: CM
mvfst vs. neqo-pr: 🚀H DC LR C20 M S R Z 🚀3 B U E A L1 🚀L2 C1 🚀C2 6 V2 BP BA CM
neqo vs. neqo-pr: A
openssl vs. neqo-pr: LR M A CM
quic-go vs. neqo-pr: CM
quiche vs. neqo-pr: CM
quinn vs. neqo-pr: L1 ⚠️C1 V2 CM
s2n-quic vs. neqo-pr: 🚀BP CM
tquic vs. neqo-pr: CM
xquic vs. neqo-pr: M CM
All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

@github-actions
Copy link
Copy Markdown
Contributor

Client/server transfer results

Performance differences relative to 1f45777.

Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.

Client vs. server (params) Mean ± σ Min Max MiB/s ± σ Δ baseline Δ baseline
neqo-msquic-cubic 148.1 ± 3.7 142.2 173.0 216.1 ± 8.6 💚 -6.5 -4.2%
neqo-neqo-newreno 90.7 ± 2.2 86.7 95.0 352.9 ± 14.5 💚 -1.3 -1.5%
quiche-neqo-cubic 171.6 ± 3.0 165.3 180.9 186.5 ± 10.7 💚 -1.2 -0.7%

Table above only shows statistically significant changes. See all results below.

All results

Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.

Client vs. server (params) Mean ± σ Min Max MiB/s ± σ Δ baseline Δ baseline
google-google-nopacing 458.1 ± 2.5 453.7 471.6 69.8 ± 12.8
google-neqo-cubic 267.8 ± 2.6 262.7 277.6 119.5 ± 12.3 -0.6 -0.2%
msquic-msquic-nopacing 138.1 ± 45.2 109.8 336.4 231.7 ± 0.7
msquic-neqo-cubic 153.9 ± 42.4 120.5 381.2 207.9 ± 0.8 2.5 1.7%
neqo-google-cubic 769.0 ± 7.0 705.2 782.0 41.6 ± 4.6 -0.4 -0.0%
neqo-msquic-cubic 148.1 ± 3.7 142.2 173.0 216.1 ± 8.6 💚 -6.5 -4.2%
neqo-neqo-cubic 90.9 ± 2.4 86.8 96.1 352.1 ± 13.3 -0.5 -0.5%
neqo-neqo-cubic-nopacing 90.5 ± 3.1 84.8 98.3 353.7 ± 10.3 0.6 0.7%
neqo-neqo-newreno 90.7 ± 2.2 86.7 95.0 352.9 ± 14.5 💚 -1.3 -1.5%
neqo-neqo-newreno-nopacing 90.9 ± 4.0 83.5 118.1 352.0 ± 8.0 -0.4 -0.5%
neqo-quiche-cubic 190.7 ± 2.9 183.9 203.2 167.8 ± 11.0 -0.7 -0.4%
neqo-s2n-cubic 214.9 ± 1.9 208.8 223.1 148.9 ± 16.8 -0.2 -0.1%
quiche-neqo-cubic 171.6 ± 3.0 165.3 180.9 186.5 ± 10.7 💚 -1.2 -0.7%
quiche-quiche-nopacing 139.6 ± 2.5 134.8 149.6 229.3 ± 12.8
s2n-neqo-cubic 214.4 ± 3.1 207.9 222.0 149.3 ± 10.3 -0.0 -0.0%
s2n-s2n-nopacing 293.6 ± 28.5 277.5 387.7 109.0 ± 1.1

Download data for profiler.firefox.com or download performance comparison data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase PR needs rebasing before it can be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants