# webtransport-go (vendored)

Copied verbatim from https://github.com/quic-go/webtransport-go v0.12.0
(MIT, Copyright 2022 Marten Seemann), with one mechanical change: every
`github.com/quic-go/quic-go` import repointed to `github.com/apernet/quic-go`.
Test files and `internal/testdata` are not vendored.

## Why

The bridge needs `(*quic.Conn).SetCongestionControl` to run BBR instead of
quic-go's loss-based controller (see ../bbr/PROVENANCE.md for the
measurements that justify it). Every quic-go fork that exposes that hook
declares its own module path, so a `replace` directive cannot redirect
upstream webtransport-go onto it - webtransport-go would keep importing
`github.com/quic-go/quic-go` and its `*quic.Conn` would be a different type
from the one the fork's http3 server hands us.

Vendoring is therefore the smallest change that lets one QUIC stack serve
both: this copy and the fork agree on the types, and nothing else in the
repo depends on webtransport-go.

## Updating

Re-copy the non-test `*.go` files from the upstream tag and re-apply the
import rewrite:

    sed -i '' 's|github.com/quic-go/quic-go|github.com/apernet/quic-go|g' *.go

Check upstream for security fixes when bumping `github.com/apernet/quic-go`.
