Fix direct connect

This commit is contained in:
世界 2022-08-09 14:48:08 +08:00
parent 8ca6c246a8
commit ecaddd897e
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -110,9 +110,9 @@ func connectPacketConnection(ctx context.Context, this N.Dialer, conn N.PacketCo
var outConn net.Conn
var err error
if len(metadata.DestinationAddresses) > 0 {
outConn, err = N.DialSerial(ctx, this, N.NetworkTCP, metadata.Destination, metadata.DestinationAddresses)
outConn, err = N.DialSerial(ctx, this, N.NetworkUDP, metadata.Destination, metadata.DestinationAddresses)
} else {
outConn, err = this.DialContext(ctx, N.NetworkTCP, metadata.Destination)
outConn, err = this.DialContext(ctx, N.NetworkUDP, metadata.Destination)
}
if err != nil {
return N.HandshakeFailure(conn, err)