mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-09 21:58:41 +00:00
Remove err print
This commit is contained in:
parent
e3b9e2543b
commit
d2b84cadd4
1 changed files with 1 additions and 11 deletions
|
@ -5,7 +5,6 @@ import (
|
||||||
"crypto/aes"
|
"crypto/aes"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/quic-go/quic-go/quicvarint"
|
"github.com/quic-go/quic-go/quicvarint"
|
||||||
|
@ -48,15 +47,6 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func SniffQUIC(b []byte) (*SniffHeader, error) {
|
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 {
|
if len(b) == 0 {
|
||||||
return nil, common.ErrNoClue
|
return nil, common.ErrNoClue
|
||||||
}
|
}
|
||||||
|
@ -169,7 +159,7 @@ func SniffQUIC(b []byte) (*SniffHeader, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// very stange packet length, maybe a fake QUIC header
|
// very strange packet length, maybe a fake QUIC header
|
||||||
if packetNumberLength > int(packetLen) {
|
if packetNumberLength > int(packetLen) {
|
||||||
return nil, errNotQuic
|
return nil, errNotQuic
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue