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 }