Skip to content
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

feat: merge go1.17.4 and add factory for uTLS proxy #16

Merged
merged 5 commits into from
Dec 6, 2021
Merged

Conversation

bassosimone
Copy link
Contributor

  • merge with go1.17.4

  • add (experimental) factory for uTLS proxy

neild and others added 5 commits December 1, 2021 22:10
…sponse body read

When sending a Request with a non-context deadline, we create a
context with a timeout. This context is canceled when closing the
response body, and also if a read from the response body returns
an error (including io.EOF).

Cancelling the context in Response.Body.Read interferes with the
HTTP/2 client cleaning up after a request is completed, and is
unnecessary: The user should always close the body, the impact
from not canceling the context is minor (the context timer leaks
until it fires).

Fixes #49559.
For #49366.

Change-Id: Ieaed866116916261d9079f71d8fea7a7b303b8fb
Reviewed-on: https://go-review.googlesource.com/c/go/+/361919
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 76fbd6167364fb98e3ebe946cfc16b5b84d4240e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/368085
Reviewed-by: Michael Knyszek <mknyszek@google.com>
…tity in responses

Server handlers may set a "Transfer-Encoding: identity" header on
responses to disable chunking, but this header should not be sent
on the wire.

For #49194.
Fixes #49568.

Change-Id: I46a9e3b8ff9d93edd7d1c34d264fc309fa322ad5
Reviewed-on: https://go-review.googlesource.com/c/go/+/359176
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit b69b2f63d65609b400b4a40ae01e4a48638f050f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/368087
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Pull in approved backports to golang.org/x/net/http2:

    85e122b net/http2: Fix handling of expect continue
    1dc0aec http2: don't count aborted streams as active in tests
    e973a42 ipv6: OpenBSD does not appear to support multicast loopback
    9592dd5 http2: avoid busy loop when ResponseHeaderTimeout is set
    94fb2bc http2: avoid spurious RoundTrip error when server closes and resets stream
    e108c19 http2: close conns after use when req.Close is set

By doing:

    $ go get -d golang.org/x/net@internal-branch.go1.17-vendor
    go: upgraded golang.org/x/net v0.0.0-20211101194204-95aca89e93de => v0.0.0-20211201233630-85e122b1a9b3
    $ go mod tidy
    $ go mod vendor
    $ go generate -run=bundle std

Fixes #49561.
Fixes #49624.
Fixes #49662.
Fixes #49905.
Fixes #49909.
Fixes #49911.

Change-Id: Ia8f432bd3ea77d24e63d46c8ed2ac8d275406b52
Reviewed-on: https://go-review.googlesource.com/c/go/+/368574
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit adds an experimental factory for create proxying
TLS connections using uTLS rather than crypto/tls.

A user has requested this functionality.

For now, I'd like to avoid advertising it until I get confirmation
that this interface is okay for the user who requested it.

When it's confirmed it's okay, I'll change the README.
@bassosimone bassosimone merged commit 3f5c93b into main Dec 6, 2021
@bassosimone bassosimone deleted the merged-main branch December 6, 2021 14:51
@batuzyn
Copy link

batuzyn commented Dec 8, 2021

Hello @bassosimone,
Thank you for this repository. I think you are working on best library in community.
I tried oohttp + utls with proxy. It's not changing tls fingerprint for proxy connections.
I just started following the library, so I haven't had a chance to dig deeper yet. Just wanted to post here for feedback.

@bassosimone
Copy link
Contributor Author

@bynf Thanks for letting me know! I think there may be something wrong with the proxy factory. I will take a look in the next few days and see what's wrong! ✌️

@bassosimone
Copy link
Contributor Author

@frankwalter1301 you're right, this is the issue. I should have fixed it in #19 and I've also added an example usage in #20 (which works for me). It would be great if you folks could test it!

@frankwalter1301
Copy link

frankwalter1301 commented Jan 11, 2022 via email

@bassosimone
Copy link
Contributor Author

Thanks for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants