Fix TLS record fragment

This commit is contained in:
Restia-Ashbell 2025-05-13 11:56:48 +08:00 committed by 世界
parent 994c8ccb23
commit e432d7259f
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
2 changed files with 4 additions and 1 deletions

View File

@ -98,7 +98,7 @@ func (c *Conn) Write(b []byte) (n int, err error) {
} }
} }
if c.splitRecord { if c.splitRecord {
_, err = c.tcpConn.Write(buffer.Bytes()) _, err = c.Conn.Write(buffer.Bytes())
if err != nil { if err != nil {
return return
} }

View File

@ -452,6 +452,9 @@ match:
metadata.TLSFragment = true metadata.TLSFragment = true
metadata.TLSFragmentFallbackDelay = routeOptions.TLSFragmentFallbackDelay metadata.TLSFragmentFallbackDelay = routeOptions.TLSFragmentFallbackDelay
} }
if routeOptions.TLSRecordFragment {
metadata.TLSRecordFragment = true
}
} }
switch action := currentRule.Action().(type) { switch action := currentRule.Action().(type) {
case *rule.RuleActionSniff: case *rule.RuleActionSniff: