Check destination before udp connect
This commit is contained in:
parent
763b93c021
commit
cbcaa0f590
1 changed files with 3 additions and 1 deletions
|
|
@ -79,7 +79,9 @@ func NewEarlyConnection(ctx context.Context, this N.Dialer, conn net.Conn, metad
|
|||
func NewPacketConnection(ctx context.Context, this N.Dialer, conn N.PacketConn, metadata adapter.InboundContext) error {
|
||||
switch metadata.Protocol {
|
||||
case C.ProtocolQUIC, C.ProtocolDNS:
|
||||
return connectPacketConnection(ctx, this, conn, metadata)
|
||||
if !metadata.Destination.Addr.IsUnspecified() {
|
||||
return connectPacketConnection(ctx, this, conn, metadata)
|
||||
}
|
||||
}
|
||||
ctx = adapter.WithContext(ctx, &metadata)
|
||||
var outConn net.PacketConn
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue