New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http3: support HTTP CONNECT and CONNECT-UDP (masque) protocols #4392
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Hi Max! Thank you for your PR! quic-go will gain MASQUE capabilities soon(-ish). I just opened a tracking issue for that: #4393. The way we’ll implement it will look a bit different though. Regarding backwards compatibility with old versions of the datagram draft, we won’t add that to quic-go, given that the RFC has shipped for quite a while now. If I understand correctly though, all you seem to need is a different code point in the SETTINGS. Does the current API already cover this? It should be possible to define additional settings code points using the Regarding the |
Thanks so much for your interest and response! #4393 seems like an exciting direction for the project :)
I might not have the most full understanding of the api and how the case settingDatagramDraft03:
if readDatagramDraft03 {
return nil, fmt.Errorf("duplicate setting: %d", id)
}
readDatagramDraft03 = true
if val != 0 && val != 1 {
return nil, fmt.Errorf("invalid value for Draft03 SETTINGS_H3_DATAGRAM: %d", val)
}
frame.Datagram = val == 1 sf, ok := f.(*settingsFrame)
if !ok {
conn.CloseWithError(quic.ApplicationErrorCode(ErrCodeMissingSettings), "")
return
}
if !sf.Datagram {
return
}
We'd be happy to break this piece out into a separate PR if that would be helpful?
golang/go#54299 and https://go-review.googlesource.com/c/go/+/447216 seem helpful. The functionality isn't quite parallel though as that method is actually responsible for the functionality of http/socks/etc proxying. It's not super clear to me how the Thanks! |
You're right. You could negotiate the extension, but quic-go wouldn't recognize it as having been negotiated, and therefore reject datagrams. |
Yes, definitely! I'm not sure I fully understand this field (even in the standard library) yet: What happens if you return a socks5 URL? Doesn't this mean we now need to support socks5? What if http is returned? Do we now need to branch out to the standard library to do an HTTP request on TCP? |
We originally developed our client targeting h2o while it was still only implementing the draft. Since Fall of last year they've added support for the finalized rfc: h2o/h2o#3278 We're currently only using the draft version, but in the future we do expect we'll eventually update to use the finalized spec, perhaps if/when h2o decides to drop draft support. We'd prefer to have the extra settings code point here and both quiche and h2o implement it this way, but it's obviously up to you and if you choose not to we will eventually move to the finalize rfc version. |
CONNECT-UDP is now being worked on in https://github.com/quic-go/masque-go. |
We'd like to propose these changes in order for us to support client http3 CONNECT and CONNECT-UDP.
We've rolled up a few changes into this single PR:
Proxy
method to the http3.RoundTripperquic.Connection
from ahijackableBody
Client
/RoundTripper
We're currently using quic-go along with these changes for our implementation of a MASQUE proxy client: Invisv-Privacy/masque#4
I'm aware that we've not had any previous interaction w/ y'all so we're very open to any/all feedback/changes/etc.
I think that this would address the client sides of #3370 and #3543