From 6a5618bc54df1f17357b86ab55ba2ac5688deaac Mon Sep 17 00:00:00 2001 From: RPRX <63339210+rprx@users.noreply.github.com> Date: Wed, 16 Dec 2020 10:35:28 +0000 Subject: [PATCH] Outbound Splice supports Inbound XTLS --- proxy/trojan/protocol.go | 3 +++ proxy/vless/encoding/encoding.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/proxy/trojan/protocol.go b/proxy/trojan/protocol.go index e6bd65d5..07fe188b 100644 --- a/proxy/trojan/protocol.go +++ b/proxy/trojan/protocol.go @@ -326,6 +326,9 @@ func ReadV(reader buf.Reader, writer buf.Writer, timer signal.ActivityUpdater, c if ok { iConn = statConn.Connection } + if xc, ok := iConn.(*xtls.Conn); ok { + iConn = xc.Connection + } if tc, ok := iConn.(*net.TCPConn); ok { if conn.SHOW { fmt.Println(conn.MARK, "Splice") diff --git a/proxy/vless/encoding/encoding.go b/proxy/vless/encoding/encoding.go index 6c0522f2..77646e6b 100644 --- a/proxy/vless/encoding/encoding.go +++ b/proxy/vless/encoding/encoding.go @@ -189,6 +189,9 @@ func ReadV(reader buf.Reader, writer buf.Writer, timer signal.ActivityUpdater, c if ok { iConn = statConn.Connection } + if xc, ok := iConn.(*xtls.Conn); ok { + iConn = xc.Connection + } if tc, ok := iConn.(*net.TCPConn); ok { if conn.SHOW { fmt.Println(conn.MARK, "Splice")