From 0bdd896c45ce54cccda1e4f380a11df98b4d3ccb Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sat, 25 Feb 2023 15:00:21 +0800 Subject: [PATCH] fix: Vision disable filter for non-TLS connections --- transport/vless/conn.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/transport/vless/conn.go b/transport/vless/conn.go index eae8868e..fd1767cf 100644 --- a/transport/vless/conn.go +++ b/transport/vless/conn.go @@ -340,15 +340,20 @@ func (vc *Conn) sendRequest(p []byte) bool { if isVision && !vc.dst.UDP && !vc.dst.Mux { if len(p) == 0 { - vc.packetsToFilter = 0 - vc.writeFilterApplicationData = false WriteWithPadding(buffer, nil, commandPaddingEnd, vc.id) + + // disable XTLS + vc.readProcess = false + vc.writeFilterApplicationData = false + vc.packetsToFilter = 0 } else { vc.FilterTLS(p) if vc.isTLS { WriteWithPadding(buffer, p, commandPaddingContinue, vc.id) } else { buf.Must(buf.Error(buffer.Write(p))) + + // disable XTLS vc.readProcess = false vc.writeFilterApplicationData = false vc.packetsToFilter = 0