This Free CLI Tool Beats Every Paid File Transfer App (croc)
BBetter Stack
Computing/SoftwareSmall Business/StartupsInternet Technology
Transcript
00:00:00This is Croc and it's one of the coolest tools I've recently stumbled upon.
00:00:04I'm just going to put it out there and say it. I think this is the best file transfer tool I've
00:00:10ever used. There you go. I said it. Croc is not just a file transfer tool. It is genuinely different
00:00:17in the way it's built and how it works. So in this video, we'll take a look at Croc,
00:00:22see how it works, and I'll show you how extremely easy it is to use it. It's going to be a lot of
00:00:28fun. So let's dive into it. So here's a question worth asking. How many ways can you think of right
00:00:38now of sending a large file to someone else's computer? So there's AirDrop, WeTransfer, Dropbox,
00:00:46Google Drive, SCP, Discord if you're desperate, a USB stick if you're really desperate, mailing a USB
00:00:56stick to someone if you're absolutely insane. So there are dozens of tools for this. And yet almost
00:01:02everyone has a story about transferring files that should have taken 30 seconds and instead ate their
00:01:08whole afternoon. So for example, your colleague tries to AirDrop something to you, but sadly you're
00:01:15on Windows. In another scenario, the WeTransfer link expired before the other person got around it.
00:01:21The file was too big for email. The other person doesn't have a Dropbox account and doesn't want to
00:01:27make one. And honestly, I don't judge them. So here's the real question. With so many tools out there,
00:01:32why does this keep happening? And the answer is because frankly, none of these solutions use the
00:01:38three-pillar strategy that makes a great file transfer solution. So Croc was created by Zach Scholl,
00:01:45and on his website, he explains in great detail what a good file transfer solution architecture
00:01:51should look like. And honestly, it makes so much sense. A good file transfer system needs three
00:01:57pillars. It needs to be fast, secure, and simple. All three at the same time without giving up on any of
00:02:05them. And most tools out there pick two and can't seem to hit the sweet spot of that Venn diagram.
00:02:11So let's look at each pillar separately. The way most link-based tools work is you upload the file
00:02:18to a server, then the other person downloads it. Sounds fine, but this is actually mathematically
00:02:23slower than it needs to be. If you're uploading at 5 megabits per second and downloading at 8 megabits
00:02:30per second, sequential upload then download gives you an effective rate of about 3.1 megabits per second.
00:02:37And that's slower than either speed on its own. That's just what happens when you do things one after the
00:02:43other instead of at the same time. Let's talk about secure. A lot of secure transfer tools rely on you
00:02:50setting a single shared password to encrypt the file. Which is fine, except passwords are only as strong
00:02:57as the password you actually pick. And if the password gets guessed or leaked, well then that's it. Game over.
00:03:04And three, it needs to be simple. At the moment, we've got amazing tools out there like SSH or FTP,
00:03:11genuinely fast and genuinely very secure. But they require one computer to be running a server with
00:03:18port forwarding enabled. Which is a completely reasonable setup for a data center or a tech savvy
00:03:24person and a completely unreasonable ask for two laptops in a coffee shop. So look at the pattern.
00:03:30WeTransfer is simple, but slow and only as secure as its link. SCP is fast and secure,
00:03:37but nobody's non-technical friend is going to know how to use SCP right off the bat. So almost nothing
00:03:43hits all three pillars. But how is Croc different? Well, Croc is an open source Go-based CLI tool built
00:03:51specifically to not compromise on any of these three pillars. So first of all, fast. Instead of the
00:03:57upload then download model, Croc uses a relay server to set up a full duplex conversation between both
00:04:04computers. Both sides are sending and receiving data at the same time, so you're not bottlenecked by the
00:04:10sequential upload download math from earlier. And if both machines happen to be on the same local area
00:04:17network, Croc will actually detect that and transfer locally instead, which is faster still.
00:04:23Next, secure. Instead of a static shared password, Croc uses something called PAKE, password
00:04:30authenticated key exchange. It uses a disposable code phrase, but it's not an encryption key by itself.
00:04:38Both sides use this phrase in a back and forth cryptographic exchange to generate a much stronger key
00:04:44on the fly. If someone tries to intercept that exchange with the wrong phrase, the whole thing
00:04:50just fails. So no data moves and everyone knows something's wrong. And finally, it's simple. Single
00:04:57binary, no server to configure, no port forwarding, works straight through NATs and firewalls via the relay
00:05:04server. And on the receiving end, you just have to type Croc, followed by the code phrase when it asks,
00:05:10and then accept the transfer and it's done. But wait, who's actually running that relay? Well,
00:05:16by default, Croc routes your transfer through a public relay run by the tool's own creator,
00:05:22Zach himself. Now, because the file itself is encrypted end-to-end via PAKE before it even leaves
00:05:27your machine, that relay only ever sees encrypted bytes and connection metadata. It physically can't read
00:05:34your file contents. But it's still a third party server sitting in the middle of a transfer by default.
00:05:40And if you're at a company with data residency rules or you have a policy against routing traffic
00:05:45through infrastructure you don't control, that's going to be a blocker. But the good news is that
00:05:50Croc accounts for this. There's a built-in Croc relay command that spins up your own relay with a docker image
00:05:57included. And then you just point your transfers at it with the relay command with the relay flag
00:06:03instead of the default. So the public relay is the convenient default for personal use. But for anything
00:06:10in a corporate environment, self-hosting the relay is a five-minute setup and not a deal breaker. But now
00:06:16I want to show you how extremely easy and convenient it is to use Croc. I've personally been using Croc a
00:06:23lot these past days and it's so convenient since I have two workstations here. One is a Windows machine
00:06:29and another one is a MacBook. And check out how easy it is to send large files from one to the other
00:06:35using Croc. Installing Croc is super easy. It's just a one-line command for both Windows and Mac.
00:06:41And the GitHub page has instructions for all sorts of setups. And once we have it installed on the
00:06:47sending side, you need to type Croc send followed by the file and it spits out a randomly generated
00:06:54code phrase. And on the receiving end, run Croc, type in the code phrase when prompted, type Y to accept it,
00:07:01and boom. Magic. It's that easy, that fast. And here's another thing. It also has the ability to resume
00:07:08transfers when the connection breaks. Let's kill the connection mid transfer, then resume it from the
00:07:14sending side. And as you can see, it picks up where it left off instead of starting over. So that's it.
00:07:19That is the entire user experience. One command to send, one code phrase to receive, no account,
00:07:27no browser tab, no server to spin up. How cool is that? So there you have it folks. That is Croc in a nutshell.
00:07:34It's fast because of a full duplex relay transfer. It's secure because of PAKE instead of using static
00:07:40passwords. And it's super simple to use. And once you actually try it against the alternative, like
00:07:46texting someone a WeTransfer link and hoping it doesn't expire, it's honestly hard to go back once
00:07:52you've used it. So what do you think about Croc? Do you like it? Is it going to be in your toolkit?
00:07:57Let us know in the comments down below. And folks, if you like these types of technical breakdowns,
00:08:02please let me know by smashing that like button underneath the video.
00:08:06And also don't forget to subscribe to our channel.
00:08:09This has been Andres from BetterStack and I will see you in the next videos.