By Casey Liss
Sending Files Securely but Quickly

Since I’m, well, me, I often find that I want to send multi-gigabyte files to others. I want to do this quickly, but also securely. About eleventy years ago, I got a deal on a lifetime Droplr account, and that works great for files up to around 15 GB. But what about even larger stuff?

I’ve found two approaches that work well for this, though I will concede, they’re both… a touch fiddly.

Both of these require using Homebrew to install them, and they must be run from the command line. Perhaps there are GUI wrappers for one or both of these, but I’m not aware of them.

Magic Wormhole

magic-wormhole was the first tool I used to do this sort of thing. It’s reliable and easy. magic-wormhole makes it quick and easy to send files between computers regardless of what network they’re on.

To send a file between computers/people:

  1. On the sender, start a session by selecting a file to send:
    wormhole send ~/path/to/some/file.mp4

  2. This will emit a text-base code, as well as a QR code. For example, in a test, I received the following:

     On the other computer, please run: 
    
     wormhole receive 8-virginia-beehive
    
  3. Guess what‽ On the other computer, you’ll run:
    wormhole receive 8-virginia-beehive

  4. Wait while the file is transferred; it shouldn’t take too long.

In my experience, magic-wormhole always uses a relay — the connections are rarely direct. However, the files sent via the relay are encrypted. Additionally, in order to make connections easy — and sharable using the brief numeral-word-word template — there’s also a “mailbox server” used to facilitate these connections.

All that said, magic-wormhole is great for novices, if they’re able to use the command line under direction from you.

Tailcat

Just announced this week, tailcat can best be summarized by the marketing line they’ve adopted:

Tailscale, without Tailscale, by Tailscale.

Perfect. No notes.

I’ve spoken about my love of Tailscale many times before on this blog. Tailscale is many things to many people, but in short, it answers the question of “what if I could connect to all of my devices, no matter where they are, or what network they’re on?”.

tailcat uses the underlying Tailscale technology to punch holes in firewalls and establish direct connections between two computers. You don’t need to run the full Tailscale client software. You just need to pass a [very unwieldy] code between two people.

To send a file between computers/people:

  1. On the receiver, start a tailcat session, and point to a destination folder:
    tailcat recv ~/Downloads
  2. The receiver will emit a very long string that is the “key”; use iMessage or some other out-of-band communication protocol to send this to the other person. The string will begin with tco.
  3. The sender will then send the file in question, using the long string:
    tailcat cp ~/path/to/some/file.mp4 tco[…]:
    Note that you need to add a : suffix to the long string that was passed.
  4. Wait for the transfer to finish. It shouldn’t take long.

There is a whole discussion about how this works under the hood, but the short-short version is that the connection starts by using a very aggressively throttled relayed connection through one of Tailscale’s servers. Note that your data is end-to-end encrypted, so they can’t see any of it; they simply carry it.

While the relayed transfer is happening, behind the scenes, tailcat is trying to establish a direct connection between you and your friend. Once that direct connection is established, tailcat stops using Tailscale’s relay, and simply sends the files from one computer to the other. At that point, you’ll see the transfer speed ramp up dramatically.

Trade-offs

If you want something that’s [mostly] easy to use — particularly for novices — then you should probably use magic-wormhole. It’s far easier for people to understand and interact with. However, it’s slower.

If you want to transfer files as quickly as possible — ease of use be damned — then tailcat is your answer. Doing some quick testing with a local friend, we found magic-wormhole topped out at around 5 MB/sec, where tailcat topped out at around 20 MB/sec.

No matter what, both tools are invaluable to have at your disposal.