Browse Source

Fix TLS record fragment

Restia-Ashbell 5 months ago
parent
commit
7cee76f9a6
2 changed files with 4 additions and 1 deletions
  1. 1 1
      common/tlsfragment/conn.go
  2. 3 0
      route/route.go

+ 1 - 1
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
 				}

+ 3 - 0
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 *R.RuleActionSniff: