From 75af9a824e00061ee8ce33c79b929b5796556dfc Mon Sep 17 00:00:00 2001 From: Restia-Ashbell <107416976+Restia-Ashbell@users.noreply.github.com> Date: Tue, 13 May 2025 11:56:48 +0800 Subject: [PATCH] Fix TLS record fragment --- common/tlsfragment/conn.go | 2 +- route/route.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/tlsfragment/conn.go b/common/tlsfragment/conn.go index c224b689..50baa6ba 100644 --- a/common/tlsfragment/conn.go +++ b/common/tlsfragment/conn.go @@ -98,7 +98,7 @@ func (c *Conn) Write(b []byte) (n int, err error) { } } if c.splitRecord { - _, err = c.tcpConn.Write(buffer.Bytes()) + _, err = c.Conn.Write(buffer.Bytes()) if err != nil { return } diff --git a/route/route.go b/route/route.go index c30e097c..d98d273a 100644 --- a/route/route.go +++ b/route/route.go @@ -450,6 +450,9 @@ match: metadata.TLSFragment = true metadata.TLSFragmentFallbackDelay = routeOptions.TLSFragmentFallbackDelay } + if routeOptions.TLSRecordFragment { + metadata.TLSRecordFragment = true + } } switch action := currentRule.Action().(type) { case *rule.RuleActionSniff: