Add stun sniffer

This commit is contained in:
世界 committed 2022-07-16 12:01:02 +08:00
1 parent 8619e07d66
commit fe5618c35d
4 files changed
+54 -1

No files matched your search

+1 -1
View File
@@ -457,7 +457,7 @@ func (r *Router) RoutePacketConnection(ctx context.Context, conn N.PacketConn, m
if err != nil {
return err
}
sniffMetadata, err := sniff.PeekPacket(ctx, buffer.Bytes(), sniff.QUICClientHello)
sniffMetadata, err := sniff.PeekPacket(ctx, buffer.Bytes(), sniff.QUICClientHello, sniff.STUNMessage)
originDestination := metadata.Destination
if err == nil {
metadata.Protocol = sniffMetadata.Protocol