Skip to content

XTLS Vision: Suppress outer CloseNotify after switching to direct copy - #6834

Merged
RPRX merged 1 commit into
mainfrom
vision-fix
Sep 27, 2026
Merged

RPRX merged 1 commit into
mainfrom
vision-fix

Conversation

@Fangliding

Copy link
Copy Markdown
Member

Close #6794
幸好ray里的tlsconn已经是自己的结构体了 可以直接拦截关闭调用 本来以为只能用unsafe整点魔法了

patterniha pushed a commit to patterniha/Xray-core that referenced this pull request Sep 27, 2026
Early merge of XTLS#6834 (PR head aac8019), squashed, ahead of
it landing upstream: XTLS#6834
@RPRX

RPRX commented Sep 27, 2026

Copy link
Copy Markdown
Member

似乎同时又解决了一个特征问题(两个 CloseNotify)

至于有些 TLS 实现最后可能没发 CloseNotify 倒没事,TCP 本就可能会提前断

目前最大的特征还是 max record size 问题(虽然合乎 TLSv1.3 的规范但),这个最好靠 geo 分流到服务端多 IP 来解决

但也确实没有“双重加密”产生的那些问题,另外至少不是纯 8k 了,但若把 buf.Size 改成 16k,又会影响有传输层时的 size 特征

还有开很多 TCP 连接的问题,但好处是没有任何“队头阻塞”问题,所以都有利有弊吧,用户应按实际需求选择代理方式组合

@RPRX RPRX changed the title Suppress outer CloseNotify for XTLS Sep 27, 2026
@RPRX RPRX changed the title XTLS Vision: Suppress outer CloseNotify Sep 27, 2026
@RPRX
RPRX merged commit e5e85ca into main Sep 27, 2026
48 checks passed
kryoz pushed a commit to kryoz/Xray-core-openconnect that referenced this pull request Sep 30, 2026
GFW-knocker pushed a commit to GFW-knocker/Xray-core that referenced this pull request Oct 2, 2026
XTLS#6834)

XTLS#6816 (comment)
XTLS#6794 (comment)
XTLS#6834 (comment)

Fixes XTLS#6794 (comment)
Fixes XTLS#6124 (comment)
Fixes XTLS#4878 (comment)

---------

Co-authored-by: Artem Lytkin <146867384+4RH1T3CT0R7@users.noreply.github.com>
(cherry picked from commit e5e85ca)

[GFW-knocker: hand-merged import block in tls/tls.go (the fork no longer
imports slices there); code applied unchanged. Covers vless and mvless, which
share proxy.VisionReader/VisionWriter.]
onesyue pushed a commit to onesyue/Xray-core that referenced this pull request Oct 4, 2026
XTLS#6834)

XTLS#6816 (comment)
XTLS#6794 (comment)
XTLS#6834 (comment)

Fixes XTLS#6794 (comment)
Fixes XTLS#6124 (comment)
Fixes XTLS#4878 (comment)

---------

Co-authored-by: Artem Lytkin <146867384+4RH1T3CT0R7@users.noreply.github.com>
(cherry picked from commit e5e85ca)
onesyue added a commit to onesyue/Xray-core that referenced this pull request Oct 4, 2026
Regression coverage for the cherry-picked upstream e5e85ca: after the real
VisionWriter / VisionReader direct-copy switch, and after
proxy.SuppressOuterCloseNotify on real REALITY server (reality.Conn) and
client (reality.UConn) handshakes, Close must write zero bytes to the raw
socket. Control cases prove the recorder sees the 24-byte close_notify when
nothing is suppressed. Mutation-checked against both halves of the fix.

YUE_FORK.md records v26.9.22-yue.3 as a candidate and why the paced splice
path needs no extra call.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants