|
@@ -489,18 +489,6 @@ match:
|
|
|
break match
|
|
|
}
|
|
|
}
|
|
|
- if !preMatch && inputPacketConn != nil && (metadata.InboundType == C.TypeSOCKS || metadata.InboundType == C.TypeMixed) && !metadata.Destination.IsFqdn() && !metadata.Destination.Addr.IsGlobalUnicast() {
|
|
|
- newBuffer, newPacketBuffers, newErr := r.actionSniff(ctx, metadata, &rule.RuleActionSniff{Timeout: C.TCPTimeout}, inputConn, inputPacketConn, buffers)
|
|
|
- if newErr != nil {
|
|
|
- fatalErr = newErr
|
|
|
- return
|
|
|
- }
|
|
|
- if newBuffer != nil {
|
|
|
- buffers = append(buffers, newBuffer)
|
|
|
- } else if len(newPacketBuffers) > 0 {
|
|
|
- packetBuffers = append(packetBuffers, newPacketBuffers...)
|
|
|
- }
|
|
|
- }
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -596,9 +584,6 @@ func (r *Router) actionSniff(
|
|
|
return
|
|
|
}
|
|
|
} else {
|
|
|
- if (metadata.InboundType == C.TypeSOCKS || metadata.InboundType == C.TypeMixed) && !metadata.Destination.IsFqdn() && !metadata.Destination.Addr.IsGlobalUnicast() && !metadata.RouteOriginalDestination.IsValid() {
|
|
|
- metadata.Destination = destination
|
|
|
- }
|
|
|
if len(packetBuffers) > 0 || metadata.PacketSniffError != nil {
|
|
|
err = sniff.PeekPacket(
|
|
|
ctx,
|