From 7484097da800028ddcf91177fd61df454ea64dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E6=89=87=E6=BB=91=E7=BF=94=E7=BF=BC?= Date: Tue, 6 May 2025 06:33:13 +0000 Subject: [PATCH] Add more panic information --- common/protocol/quic/sniff.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/protocol/quic/sniff.go b/common/protocol/quic/sniff.go index 3a22d454..73b9bf97 100644 --- a/common/protocol/quic/sniff.go +++ b/common/protocol/quic/sniff.go @@ -4,6 +4,7 @@ import ( "crypto" "crypto/aes" "crypto/tls" + "fmt" "encoding/binary" "io" @@ -47,6 +48,15 @@ var ( ) func SniffQUIC(b []byte) (*SniffHeader, error) { + defer func() { + if r := recover(); r != nil { + fmt.Println("QUIC sniffer panic, please send the information below to the developer.") + fmt.Println("<-------------------- BEGIN QUIC BYTE -------------------->") + fmt.Println(b) + fmt.Println("<--------------------- END QUIC BYTE -------------------->") + panic(r) + } + }() if len(b) == 0 { return nil, common.ErrNoClue }