mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-09 21:58:41 +00:00
Add more panic information
This commit is contained in:
parent
87ab8e5128
commit
7484097da8
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue