Repository navigation
HTTPUpgrade client: Close the connection when the upgrade fails - #7395
Merged
Merged
Conversation
When the upgrade request could not be sent, or the server did not answer with a valid "101 Switching Protocols", the dial returned the error and left the TCP connection open until the garbage collector closed it. With "fingerprint": "unsafe", a failed TLS handshake is one of these cases. Go's TLS does the handshake at the first write, and here the first write is the upgrade request. Co-Authored-By: Claude Fable 5.2 <[email protected]>
patterniha
added a commit
to patterniha/Xray-core
that referenced
this pull request
Nov 13, 2026
HTTPUpgrade client: Close the connection when the upgrade fails Co-authored-by: Copilot <[email protected]>
RPRXX
force-pushed
the
main
branch
2 times, most recently
from
November 14, 2026 15:58
9ade89d to
5d17b87
Compare
Member
|
我记得这种问题不止一处 返回了err忘记关的 顺便都补一下吧 |
Medium1992
added a commit
to Medium1992/xray-proxy-ros
that referenced
this pull request
Nov 22, 2026
XTLS/Xray-core#7395 (3dee8518) took two hunks of patches/close upstream: conn.Close() after a failed upgrade request and read in the HTTPUpgrade dialer. On upstream main the patch no longer applied and the alpha build stopped at the half-close step. With --3way a hunk that is already upstream merges as is, so the same patch serves v26.11.9 and main. Checked by replaying every series as Dockerfile-release does and building on v26.11.9 and on 74cbdf46. Co-Authored-By: Claude Opus 5.5 <[email protected]>
patterniha
added a commit
to patterniha/Xray-core
that referenced
this pull request
Nov 22, 2026
Brings in XTLS/Xray-core up to 74cbdf4 (4 commits). XTLS's version is unchanged, so the fork's core/core.go stays 26.11.22. Includes: XMC finalmask Yggdrasil third-party login and texture verification (XTLS#7416), outbounds avoiding circular dependencies with the built-in DNS (XTLS#7425), the HTTPUpgrade client closing the connection when the upgrade fails (XTLS#7395) and a README update (XTLS#7446). No conflicts. XTLS#7395 is identical to the fork's early merge of it (cbf3dac), so transport/internet/httpupgrade/dialer.go is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the upgrade request could not be sent, or the server did not answer with a valid "101 Switching Protocols", the dial returned the error and left the TCP connection open until the garbage collector closed it.
With "fingerprint": "unsafe", a failed TLS handshake is one of these cases. Go's TLS does the handshake at the first write, and here the first write is the upgrade request.