Fix handle missing err on quic sniff

This commit is contained in:
世界 2022-07-08 22:49:17 +08:00
parent 76236a0b75
commit e0cfc33fe2
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -163,6 +163,9 @@ func QUICClientHello(ctx context.Context, packet []byte) (*adapter.InboundContex
}
decryptedReader := bytes.NewReader(decrypted)
frameType, err := decryptedReader.ReadByte()
if err != nil {
return nil, err
}
if frameType != 0x6 {
// not crypto frame
return &adapter.InboundContext{Protocol: C.ProtocolQUIC}, nil