mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-16 10:52:21 +08:00
Check destination before udp connect
This commit is contained in:
parent
92a92f39c5
commit
6a26737508
|
@ -79,8 +79,10 @@ 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:
|
||||
if !metadata.Destination.Addr.IsUnspecified() {
|
||||
return connectPacketConnection(ctx, this, conn, metadata)
|
||||
}
|
||||
}
|
||||
ctx = adapter.WithContext(ctx, &metadata)
|
||||
var outConn net.PacketConn
|
||||
var err error
|
||||
|
|
Loading…
Reference in New Issue
Block a user