News for hackers. Stuff that matters.
Re:Croc: Easily and securely send things from one computer t... by Freedom2 on Friday September 22, 2023 @09:00PM (#37619695)
I have a few qualms with this app. I've easily and securely sent things from one computer to another using a simple FTP server, with all of the features that croc has listed. As for CLI support, I've written a small helper tool that allows me to transfer via CLI - giving me more security since I don't pull in any dependencies in my own code.
Re:Croc: Easily and securely send things from one computer t... by johng on Friday September 22, 2023 @09:25PM (#37619825)
Isn't FTP still plaintext?
Re:Croc: Easily and securely send things from one computer t... by chrisweekly on Friday September 22, 2023 @09:41PM (#37619908)
I read "FTP" as "SFTP".
Re:Croc: Easily and securely send things from one computer t... by LinuxBender on Friday September 22, 2023 @10:21PM (#37620080)
Isn't FTP still plaintext?

It can be or it can be encrypted. FTPS(i|e) implements encryption over FTP. I prefer SFTP as it just uses one port which I can define. SFTP also works better through firewalls and NATs.

VSFTPD is an example of an FTP server that supports encryption or FTPS.

Re:Croc: Easily and securely send things from one computer t... by klabb3 on Friday September 22, 2023 @09:50PM (#37619942)
FTP requires one-time config though, setting up credentials. Of course, it also needs a port to be opened. Croc and other apps like this[1] target different use cases.

[1]: I am building a UX-focused app over at payload.app, but there are many others, both CLI and GUI/web apps.

Re:Croc: Easily and securely send things from one computer t... by rajamaka on Friday September 22, 2023 @09:52PM (#37619952)
Your qualm with the app is that you like FTP?
Re:Croc: Easily and securely send things from one computer t... by ajot on Friday September 22, 2023 @11:15PM (#37620312)
Why would anyone use Dropbox?
Re:Croc: Easily and securely send things from one computer t... by rajamaka on Saturday September 23, 2023 @05:35AM (#37621820)
Why would anyone use TikTok when they can FTP videos to each other?
Re:Croc: Easily and securely send things from one computer t... by gyrovagueGeist on Friday September 22, 2023 @09:15PM (#37619770)
I'm surprised it's not listed on the README directly but in case you looked for it like me :) here is what their site says about the alternative you're probably thinking of:

"toss cleverly encodes port information in the code phrase, making it simple but it requires using connected computers (no firewalls) and the long random-ish code phrase is hard to “tell” someone. magic-wormhole has most everything (currently its missing capabilities for multiple file transfers and file resuming), but it requires installing lots of the python ecosystem which is tricky for non-developers (and windows users)."

Re:Croc: Easily and securely send things from one computer t... by vdm on Saturday September 23, 2023 @02:08AM (#37620961)
Re:Croc: Easily and securely send things from one computer t... by tptacek on Friday September 22, 2023 @09:53PM (#37619955)
A more popular and, I think, carefully analyzed alternative, from which croc was inspired, is Magic Wormhole; a good Golang implementation that compiles down to a single binary is wormhole-william:

https://github.com/psanford/wormhole-william/releases

I believe croc has some features wormhole doesn't (and some anti-features, like being able to pick curves and hashes). But also just that it's worth knowing that Magic Wormhole is kind of the "default" tool that does this.

Re:Croc: Easily and securely send things from one computer t... by auxfil on Friday September 22, 2023 @10:48PM (#37620192)
What does "carefully analyzed" mean in this context? Who analyzed it?
Re:Croc: Easily and securely send things from one computer t... by Zambyte on Friday September 22, 2023 @11:19PM (#37620325)
Also if GitHub stars are anything to go off of, croc is several orders of magnitude more popular. Also croc is written in Go and compiles to a single binary, but there are some helper scripts in the repo for a few things. I really don't know why they said all that in their comment.
Re:Croc: Easily and securely send things from one computer t... by wolverine876 on Friday September 22, 2023 @11:33PM (#37620389)
Emailing files is even more popular; does that make it more secure?
Re:Croc: Easily and securely send things from one computer t... by Zambyte on Saturday September 23, 2023 @10:56AM (#37623818)
Did you mean to reply to me? I didn't say anything about being more popular -> being more secure. If you did want my input, my answer is: no. I was just commenting on the fact that the commenter said croc was less popular, when I cannot find any metric for that.
Re:Croc: Easily and securely send things from one computer t... by tptacek on Friday September 22, 2023 @11:52PM (#37620455)
Wormhole-william is a Go port of Magic Wormhole. Github stars are not anything to go off of. If you're unaware of Magic Wormhole but have strong opinions about croc, we're not speaking the same language and there's little point in us irritating ourselves by trying fruitlessly to hash things out.
Re:Croc: Easily and securely send things from one computer t... by cphoover on Friday September 22, 2023 @11:05PM (#37620268)
There is also https://wormhole.app

Which looking at your link I guess is unrelated

Re:Croc: Easily and securely send things from one computer t... by mc10 on Friday September 22, 2023 @11:09PM (#37620286)
This looks very different; it requires having a server to temporarily store the file, while croc and magic-wormhole directly connect two peers (via a relayer) to send the file.
Re:Croc: Easily and securely send things from one computer t... by PBnFlash on Saturday September 23, 2023 @01:51AM (#37620895)
It's based on webtorrent, so it will p2p but it is dog slow for serious files.
Re:Croc: Easily and securely send things from one computer t... by tptacek on Friday September 22, 2023 @11:51PM (#37620451)
This is totally unrelated to Magic Wormhole, and the name is problematic; it has a different security model.
Re:Croc: Easily and securely send things from one computer t... by qrv3w on Saturday September 23, 2023 @01:41AM (#37620840)
I think the main advantage that I like croc over many utilities is that it can resume file transfers from where it left off. I'm not sure if wormhole has this yet. Of course torrents do this, but I find sharing via torrenting still not super easy for the layperson.
Re:Croc: Easily and securely send things from one computer t... by Bu9818 on Saturday September 23, 2023 @02:21AM (#37621007)
Torrents also don't provide encryption between peers, unless you use SSL torrents, but it's clearly designed towards sharing between a group, not one-on-one transfers.
Re:Croc: Easily and securely send things from one computer t... by eviks on Saturday September 23, 2023 @02:52AM (#37621158)
How does the group design hurt 1-1

(BitTorrent/Resilio sync uses SSL and seems fine for 1-1 design-wise)

Re:Croc: Easily and securely send things from one computer t... by Bu9818 on Saturday September 23, 2023 @03:17AM (#37621263)
It's just a bit more involved to use for this use case, especially if the data is confidential (having to set the private flag so clients don't publish the infohash to DHT, using a built-in tracker in your client, transport layer encryption not provided by default). Things like Resilio are fine, they build on top of the protocol and provide a different UX.
Re:Croc: Easily and securely send things from one computer t... by forty on Saturday September 23, 2023 @03:07AM (#37621216)
It's weird croc doesn't mention magic wormhole in their readme, if only to explain the differences with this well known tool, and why one would use croc rather than wormhole, which people are probably more used to using and that they can apt install, etc
Re:Croc: Easily and securely send things from one computer t... by forty on Saturday September 23, 2023 @03:14AM (#37621253)
Here is the answer from the project website

"magic-wormhole has most everything (currently its missing capabilities for multiple file transfers and file resuming), but it requires installing lots of the Python ecosystem which is tricky for non-developers (and Windows users)."

For the python part, I guess wormhole-williams works too then.

Re:Croc: Easily and securely send things from one computer t... by tptacek on Saturday September 23, 2023 @09:51AM (#37623208)
A wormhole user would just transfer a directory, rather than a globbed list of files, but croc's multiple file transfer thing is a difference between the two tools.
Re:Croc: Easily and securely send things from one computer t... by throwaway-4LGvv on Saturday September 23, 2023 @04:24AM (#37621558)
winden.app is a Magic Wormhole web app for files up to 200MB https://github.com/LeastAuthority/winden
Re:Croc: Easily and securely send things from one computer t... by pepa65 on Saturday September 23, 2023 @05:38AM (#37621832)
I think Wormhole William is great, also has a mobile app. But when I discovered croc, I switched to that, it has been very reliable. From the developer:

AFAIK, croc is the only CLI file-transfer tool does all of the following:

- allows any two computers to transfer data (using a relay)

- provides end-to-end encryption (using PAKE)

- enables easy cross-platform transfers (Windows, Linux, Mac)

- allows multiple file transfers

- allows resuming transfers that are interrupted

- does not require a server or port forwarding

Re:Croc: Easily and securely send things from one computer t... by tptacek on Saturday September 23, 2023 @09:50AM (#37623199)
Magic Wormhole:

* Allows any two computers, NAT'd or otherwise, to transfer data

* Invented the PAKE model that croc uses

* Is cross-platform and runs on Windows

* Allows multiple file transfers (directories)

* Does not require a server or port forwarding.

The thing croc does on this list that Magic Wormhole doesn't is resumption.

Re:Croc: Easily and securely send things from one computer t... by ggeorgovassilis on Saturday September 23, 2023 @09:57AM (#37623247)
AFAIK it doesn't support authentication for private relays
Re:Croc: Easily and securely send things from one computer t... by tptacek on Saturday September 23, 2023 @10:49AM (#37623753)
Why do I care? All of these designs --- croc is "a Magic Wormhole" --- are end-to-end secure.
Re:Croc: Easily and securely send things from one computer t... by ggeorgovassilis on Sunday September 24, 2023 @04:02AM (#37631054)
I can't tell you what _you_ should care about, but I wouldn't want to run an open relay everybody can abuse and eat up my traffic allowance.
Re:Croc: Easily and securely send things from one computer t... by eduction on Saturday September 23, 2023 @12:01PM (#37624436)
> Does not require a server or port forwarding.

I’m probably missing something, new to magic wormhole, but this seems to contradict the docs on magic wormholes linked by the tool you recommended, wormhole william:

“ The wormhole library requires a “Mailbox Server” (also known as the “Rendezvous Server”): a simple WebSocket-based relay that delivers messages from one client to another. This allows the wormhole codes to omit IP addresses and port numbers.“

https://magic-wormhole.readthedocs.io/en/latest/welcome.html...

Is this a particular library choice vs protocol choice? Wormhole william perhaps allows codes with ip addresses etc?

What makes me wary about these tools is the way many of them seem to bake in a default relay server but aren’t up front about it (i want that discussed in the readme.md, it’s a big deal, even if they can’t read the payload - presumably they can see which two IPs are communicating which should be absolutely disclosed). Like, to me it’s not “magic” to route stuff through a relay server. That’s the whole thing I want “magic” to avoid. (Also it doesn’t seem at all like a “wormhole” - the nomenclature strikes me as insanely grandiose)

Re:Croc: Easily and securely send things from one computer t... by tptacek on Saturday September 23, 2023 @01:55PM (#37625644)
That's how croc works, too. You can run your own Magic Wormhole relay. These tools all have the same fundamental design.

What's magic-seeming about them is that you can be deep in a prod network, with tightly controlled ACLs and no routable address, and just "wormhole server.log", and then on your dev laptop on your random home wireless type, like, "wormhole receive 32-hazardous-baboon" and poof! you have "server.log". It feels pretty magical, which is why it has the name.

Croc doesn't change any of that. What croc does differently from Wormhole is that it handles resumption, and you can apparently send a globbed list of files rather than just a file or a directory. Resumption is a real feature (I'd like to know more about how the cryptography works, though). The multi-file thing is a UX tweak.

Croc has a bunch of knobs to change cryptography primitives. Those are anti-features.

You can password-authenticate a custom croc relay. I don't know why you'd ever care. Maybe this is an abuse concern? These are all E2EE designs. You don't trust the server in the first place. It's like a STUN/TURN server.

Re:Croc: Easily and securely send things from one computer t... by d-z-m on Saturday September 23, 2023 @03:26PM (#37626519)
> Invented the PAKE model that croc uses

Nit: Magic Wormhole pioneered SPAKE2's application in a file transfer utility, but the actual invention of SPAKE2 predates Magic Wormhole.

Re:Croc: Easily and securely send things from one computer t... by tptacek on Sunday September 24, 2023 @12:23AM (#37630100)
I don't mean that they invented PAKE's, I mean that they invented this application of PAKEs (I'd say: one of the very few genuinely useful PAKE use cases).
Re:Croc: Easily and securely send things from one computer t... by bobbylarrybobby on Saturday September 23, 2023 @11:03PM (#37629802)
One thing missing from this list: a GitHub readme with a how-to. Magic wormhole makes you visit ReadTheDocs
Re:Croc: Easily and securely send things from one computer t... by tptacek on Sunday September 24, 2023 @12:22AM (#37630098)
`wormhole send <filename>`

The output of the command tells you what to do next.

They really nailed the UX on this.

Re:Croc: Easily and securely send things from one computer t... by brnt on Saturday September 23, 2023 @07:29AM (#37622274)
An even more popular alternative is Resilio Sync. I still use it because somehow sharing with the tech savvy isn't a big problem, but with the unsavvy is. A GUI and a single string is on the edge of the possible, and I share much more (large, noncode, files) with this group.
Re:Croc: Easily and securely send things from one computer t... by tptacek on Saturday September 23, 2023 @11:02AM (#37623877)
It makes sense to compare croc to wormhole because they're the same thing: PAKE-backed file transfer, where nobody has accounts, no central server holds the files, everything works from behind a NAT, all you have to is install the tool and give your counterparty an autogenerated secret password for the file.
Re:Croc: Easily and securely send things from one computer t... by brnt on Saturday September 23, 2023 @03:34PM (#37626616)
Apart from Pake, all that applies to Resilio, which I'm pretty sure has a bigger uptake than the rest combined.
Re:Croc: Easily and securely send things from one computer t... by tptacek on Saturday September 23, 2023 @06:02PM (#37627956)
I mean, Google Drive has more uptake than any of these things. We're comparing PAKE-driven file transfer schemes.
Re:Croc: Easily and securely send things from one computer t... by brnt on Saturday September 23, 2023 @06:27PM (#37628131)
I thought we were comparing p2p file sharing applications. Drive et all are of course entirely different.
Re:Croc: Easily and securely send things from one computer t... by eviks on Sunday September 24, 2023 @02:31AM (#37630645)
And it has a mobile client that has autosynced folders, so you only need to set it up once
Re:Croc: Easily and securely send things from one computer t... by jdironman on Friday September 22, 2023 @10:09PM (#37620036)
I am having a hard time understanding. Does this allow you to send / receive anywhere? Across the internet I mean. what external server does it use for 'stapling' the connection or is it also expected that you self host a relay server + set up the necessary ports etc. Do both ends require a relay server?
Re:Croc: Easily and securely send things from one computer t... by jdironman on Friday September 22, 2023 @10:11PM (#37620041)
>I am having a hard time understanding. Does this allow you to send / receive anywhere? Across the internet I mean. what external server does it use for 'stapling' the connection or is it also expected that you self host a relay server + set up the necessary ports etc. Do both ends require a relay server?

Sorry, I have spoke too soon. I see now it uses a public relay by default, and you can self host as needed. Sorry for the unnecessary comment!

Re:Croc: Easily and securely send things from one computer t... by gregschlom on Friday September 22, 2023 @10:50PM (#37620212)
Haven't tried this but I recently started using syncthing.net and I highly recommend it.

Like rsync, it only sends the chunks of the file that changed, so it can be extremely fast for small changes in large files. It's able to use a variety of methods to connect including good through relay servers if the machines can't directly talk to each other.

Re:Croc: Easily and securely send things from one computer t... by _-_-__-_-_- on Friday September 22, 2023 @11:21PM (#37620337)
I also use syncthing. It's been working so well that it's magical for sending files and keeping a passwork manager up-to-date between devices. My next step for my homelab, is to run my own announce server and relay on my local network.
Re:Croc: Easily and securely send things from one computer t... by blooalien on Saturday September 23, 2023 @02:43AM (#37621112)
Also fun to run yourself a little private wireguard server for easy access to all that your homelab offers from anywhere "outside" your home network.
Re:Croc: Easily and securely send things from one computer t... by ekianjo on Saturday September 23, 2023 @04:57AM (#37621674)
Syncthing is not for ad hoc file sending. Totally different use case
Re:Croc: Easily and securely send things from one computer t... by stavros on Saturday September 23, 2023 @07:59AM (#37622477)
SyncThing is fantastic, but a different purpose. It's great for syncing files between persistent computer relationships, magic wormhole (or croc) is better at ad-hoc sending of random files.
Re:Croc: Easily and securely send things from one computer t... by carterschonwald on Friday September 22, 2023 @10:55PM (#37620238)
So one thing is that this by default uses a specific public relay server to setup the handshake. So there’s a little mitm by default.
Re:Croc: Easily and securely send things from one computer t... by mc10 on Friday September 22, 2023 @11:07PM (#37620277)
magic-wormhole (which croc was inspired by) also uses a public relay server: https://magic-wormhole.readthedocs.io/en/latest/welcome.html...

Any tool that wants to reliably connect two clients P2P is going to need something like a TURN server to traverse restrictive NATs. See for instance Tailscale's use of DERP servers: https://tailscale.com/blog/how-tailscale-works/#encrypted-tc...

Re:Croc: Easily and securely send things from one computer t... by carterschonwald on Saturday September 23, 2023 @03:11PM (#37626384)
Yeah, ultimately you're correct
Re:Croc: Easily and securely send things from one computer t... by ComodoHacker on Saturday September 23, 2023 @04:29AM (#37621577)
There's no MITM, transfers are end-to-end encrypted. You don't have to trust the relay.
Re:Croc: Easily and securely send things from one computer t... by rurcliped on Friday September 22, 2023 @11:17PM (#37620316)
a recent audit claims the author "doesn't have enough resources to address" security issues: https://www.openwall.com/lists/oss-security/2023/09/08/2 https://github.com/schollz/croc/issues/594 etc.
Re:Croc: Easily and securely send things from one computer t... by qrv3w on Saturday September 23, 2023 @01:36AM (#37620811)
These issues are pretty recent. I would greatly appreciate sponsorship to address issues faster: https://github.com/sponsors/schollz or just help with PRs.
Re:Croc: Easily and securely send things from one computer t... by AequitasOmnibus on Saturday September 23, 2023 @02:59AM (#37621186)
Just wanted to say that Croc is one of the most reliable and straightforward file transfer tools I’ve ever used. It worked so well that I used it for Android (via Termux) to Windows transfers regularly. I only wish there was a way to use it on iOS but I imagine that’s challenging.
Re:Croc: Easily and securely send things from one computer t... by qrv3w on Saturday September 23, 2023 @09:47AM (#37623178)
Thanks for the kindness :) I use it the same way actually! I don't use any Apple products so that's the major roadblock for me to develop against iOS...
Re:Croc: Easily and securely send things from one computer t... by hn_throwaway_99 on Saturday September 23, 2023 @02:06AM (#37620955)
I appreciated the links to the audit, but your quote was misleading to me when taken out of context like you did. I interpreted it as basically saying that the author couldn't or wouldn't address the issues identified. The full quote was:

> The upstream author doesn't have enough resources to address them on its own and wants to develop fixes in the open. Therefore I have created GitHub issues in the upstream project and publish the full report today.

I.e. the "and wants to develop fixes in the open" part left me with a very different interpretation from when I first read your comment.

Re:Croc: Easily and securely send things from one computer t... by aborsy on Saturday September 23, 2023 @02:15AM (#37620982)
There was a deadly security flaw two years ago:

https://redrocket.club/posts/croc/

But audits finding vulnerabilities are better than no audit and no known flaw.

Re:Croc: Easily and securely send things from one computer t... by fmajid on Saturday September 23, 2023 @02:33AM (#37621055)
Re:Croc: Easily and securely send things from one computer t... by mrintegrity on Saturday September 23, 2023 @03:09AM (#37621227)
Perhaps you missed this https://news.ycombinator.com/item?id=37608110 but it has given me fresh, sceptical, eyes with which to read cve reports.
Re:Croc: Easily and securely send things from one computer t... by fmajid on Saturday September 23, 2023 @04:04AM (#37621477)
Yes, I subscribe to Daniel Stenberg's RSS feed and have seen his many articles bemoaning excessive classification of bugs as vulnerabilities. One of these bugs, however, show serious cryptographic deficiencies. Unfortunately there are a lot of cryptography amateurs making stuff without a proper understanding ond making grandiose claims, so my default stance is one of skepticism unless reputable cryptographers have looked at it.

I use wormhole-william, the Go version of the Python magic wormhole, and age, mostly because of this Latacora endorsement:

https://www.latacora.com/blog/2019/07/16/the-pgp-problem/

Re:Croc: Easily and securely send things from one computer t... by celtoid on Friday September 22, 2023 @11:32PM (#37620385)
Re:Croc: Easily and securely send things from one computer t... by matsz on Saturday September 23, 2023 @09:38AM (#37623103)
Thanks for mentioning this but would be more useful to provide some context here.

This works via WebRTC, and since the wtrc package for node.js is not well maintained, the CLI for drop.lol has been abandoned. Therefore croc solves a huge problem that I can't solve in drop.lol right now.

For anyone who needs a web application, this should work though.

(Although: I've stumbled upon a really good implementation of WebRTC in pure Rust, so I might end up trying to get it working with that or even trying to port that to node.js somehow)

Re:Croc: Easily and securely send things from one computer t... by jmbwell on Saturday September 23, 2023 @01:05AM (#37620703)
Printing and transferring files: two operations that computing will never solve once and for all
Re:Croc: Easily and securely send things from one computer t... by pkulak on Saturday September 23, 2023 @02:11AM (#37620967)
Or what to call it.
Re:Croc: Easily and securely send things from one computer t... by ajkjk on Saturday September 23, 2023 @01:30AM (#37620787)
Which public server does it use by default? I'm surprised the docs don't mention it.

More generally, it feels like in 2023 that connecting two computers via a public relay ought to be a solved problem, on the level of, like, DNS. Or maybe it is and I haven't heard?

Re:Croc: Easily and securely send things from one computer t... by IshKebab on Saturday September 23, 2023 @02:36AM (#37621074)
It is! RustDesk has a really great 2-pane file manager for sending files. Works really well.
Re:Croc: Easily and securely send things from one computer t... by mc10 on Saturday September 23, 2023 @03:18AM (#37621275)
The default relay can be found in constants.go [1]:

  // DEFAULT_RELAY is the default relay used (can be set using --relay)
  var (
   DEFAULT_RELAY      = "croc.schollz.com"
   DEFAULT_RELAY6     = "croc6.schollz.com"
   DEFAULT_PORT       = "9009"
   DEFAULT_PASSPHRASE = "pass123"
   INTERNAL_DNS       = false
  )

[1]: https://github.com/schollz/croc/blob/f91c7a9948f94007d6be2b0...
Re:Croc: Easily and securely send things from one computer t... by crabbone on Saturday September 23, 2023 @06:00AM (#37621909)
Where I live ISPs give static IPs with subscription, so, at least sending files from office home is a non-issue.

In principle IPv6 should've solved this problem a long time ago... without a need for third parties.

Re:Croc: Easily and securely send things from one computer t... by ajkjk on Saturday September 23, 2023 @05:58PM (#37627925)
Well static IPs solve the problem if everyone has them. But what about a 'standard relay' system that could, like, obsolete port forwarding by giving any two machines a way to negotiate a connection?
Re:Croc: Easily and securely send things from one computer t... by winrid on Saturday September 23, 2023 @02:28AM (#37621034)
I don't see KDE Connect mentioned so I'd like to just say it's great. Send files and clipboard between PC/Mac/Linux/Android/iOS. And it's a native QT app so pretty light. Only works on same network though.
Re:Croc: Easily and securely send things from one computer t... by mixmastamyk on Saturday September 23, 2023 @04:22AM (#37621552)
Unfortunately didn't work well for me using the gnome libraries on linux or mobian/phosh. (If you don't want to install KDE just for file transfer, etc.) scp on the other hand is bulletproof when hosts are directly accessible.
Re:Croc: Easily and securely send things from one computer t... by winrid on Saturday September 23, 2023 @06:35PM (#37628191)
Weird, works fine on xfce connecting to Android and iOS for me.
Re:Croc: Easily and securely send things from one computer t... by mixmastamyk on Saturday September 23, 2023 @09:23PM (#37629291)
Gonnect or valent?
Re:Croc: Easily and securely send things from one computer t... by winrid on Saturday September 23, 2023 @09:36PM (#37629348)
I see what you're asking now. I think just the QT client in desktop.
Re:Croc: Easily and securely send things from one computer t... by mixmastamyk on Sunday September 24, 2023 @08:35PM (#37638485)
Likely means you installed KDE which is huge just to send messages on your LAN.

Could probably be a Python script.

Re:Croc: Easily and securely send things from one computer t... by winrid on Wednesday September 27, 2023 @11:00AM (#37675609)
I'm fine downloading some dependencies so I don't have to run random scripts on my phone, and can share clipboard, thanks.
Re:Croc: Easily and securely send things from one computer t... by winrid on Saturday September 23, 2023 @09:35PM (#37629342)
haha I have no idea - never heard those terms before.
Re:Croc: Easily and securely send things from one computer t... by eviks on Saturday September 23, 2023 @02:54AM (#37621170)
What about mobile computers?
Re:Croc: Easily and securely send things from one computer t... by dennis-tra on Saturday September 23, 2023 @03:05AM (#37621206)
I’m currently working on a new version of pcp [0]. Based on croc, magic-wormhole and the likes it doesn’t require a relay. It uses the IPFS DHT as a discovery point to connect two machines. Haven’t touched the currently released code in two years but the new hole punching capabilities of libp2p show promising result so I’m working on a new version.

[0] https://github.com/dennis-tra/pcp

Re:Croc: Easily and securely send things from one computer t... by mc10 on Saturday September 23, 2023 @03:16AM (#37621259)
Does this run a mini IPFS node on the sender and relayer and rely instead on the IPFS network being up to propagate the DHT changes through the network?
Re:Croc: Easily and securely send things from one computer t... by dennis-tra on Saturday September 23, 2023 @03:41AM (#37621392)
It’s just running a very lightweight libp2p host that speaks the DHT protocol. It’s basically just taking the bare minimum part of Kubo (IPFS) that’s necessary to interact with the DHT.
Re:Croc: Easily and securely send things from one computer t... by stkdump on Saturday September 23, 2023 @03:18AM (#37621277)
Can you send files from one mobile network connected computer to another?
Re:Croc: Easily and securely send things from one computer t... by garganzol on Saturday September 23, 2023 @06:40AM (#37622047)
Here is my feedback about the pcp's main GitHub page, if you don't mind:

    - Move "Motivation", "Project Status", "How Does It Work?" somewhere else
    - Add "What is It?" and "Encryption" sections and place them just before the "Usage" section. Keep them reasonable small, the smaller the better
I believe that it will help the project to have a much better resonance with the target audience.
Re:Croc: Easily and securely send things from one computer t... by dheera on Saturday September 23, 2023 @04:07AM (#37621494)
I wish there was an easier way to send things to/from a phone. I use a 1-person slack channel for this because I can't find a simpler way.

Google Drive and Dropbox are both awful mobile clients.

Re:Croc: Easily and securely send things from one computer t... by mixmastamyk on Saturday September 23, 2023 @04:24AM (#37621564)
Was just dissing KDE connect but it works well in most combinations.

Also you can connect a USB cable.

Re:Croc: Easily and securely send things from one computer t... by dheera on Saturday September 23, 2023 @04:33AM (#37621596)
USB cables involve about 5 steps and half my cables don't work because they were not built sturdy enough and got chomped by my office chair, standing desk, or something else.

There should be a way to just right click and "send to phone"

Re:Croc: Easily and securely send things from one computer t... by xyzzy_plugh on Saturday September 23, 2023 @10:02AM (#37623306)
Highly recommend KDE Connect, even if it seems like it's not relevant for you (the KDE bit) it's quite solid.
Re:Croc: Easily and securely send things from one computer t... by mixmastamyk on Saturday September 23, 2023 @05:12PM (#37627602)
I have a hub and an extra cable hidden under my keyboard. When I need to plug in a device for power or thunderbolt transfer it is a two step... 1) grab cable 2) plug in. Konnect is fine for other cases.
Re:Croc: Easily and securely send things from one computer t... by dheera on Saturday September 23, 2023 @10:44PM (#37629700)
and then disable "do not disturb mode", swipe down notifications about 5 times until USB device pops up, open it, approve the hex shit, peck at the tiny button to change its mode from MDI/UTP/PCP/whatever other hell options are out there to a file transfer mode, then hope and pray it shows up on computer, then click, wait a long time, then navigate the phone's messed up file system before you can drop something in there.
Re:Croc: Easily and securely send things from one computer t... by mixmastamyk on Sunday September 24, 2023 @11:10AM (#37633834)
I don’t do any of that. Once I had to say “trust computer.” It mounts automatically after that.
Re:Croc: Easily and securely send things from one computer t... by minhmeoke on Saturday September 23, 2023 @07:20PM (#37628560)
The problem with email attachments is that they only support files up to around 25MB, while slack has a 1GB attachment limit, and if you have a slow uplink to the cloud, it could take a while to upload the file.

A friend wrote a faster and more sophisticated version of `python -m http.server 8000` in rust which also supports uploads, you can read about here: https://news.ycombinator.com/item?id=37628347

File transfers are performed over the local network, and therefore should be very fast. If you don't have a network connection, you can just enable a Wifi hotspot on your mobile device and transfer the files over that. There is no need to install any software on the mobile device, you can just use a web browser to browse to a directory that you share over the network.

Re:Croc: Easily and securely send things from one computer t... by psanford on Saturday September 23, 2023 @10:15PM (#37629553)
I made the android† port of Wormhole William[1] specifically to help transfer some encryption keys that I didn't want to ever live unencrypted on a server in the cloud.

[1]: https://github.com/psanford/wormhole-william-mobile

†: There's also a working iOS port but its not released on the App Store because of how hostile Apple makes that process to open source developers.

Re:Croc: Easily and securely send things from one computer t... by networked on Sunday September 24, 2023 @04:09AM (#37631083)
The main thing I use for ad hoc file transfers is Total Commander for Android (https://www.ghisler.com/android.htm). It can copy files to and from a WebDAV inbox on the local network as well as my home directory (although the SFTP plugin I use for that is fiddly to set up and a bit buggy).

For copying the same things on a regular basis, I run rsync scripts in Termux (https://termux.dev/en/). They push photos from my phone to my computer and pull essential backup from my computer to my phone. They also synchronize themselves and Termux configuration. For exchanging files without a direct network connection, I have croc and the Rust version of Magic Wormhole (https://github.com/magic-wormhole/magic-wormhole.rs) installed in Termux.

It may seem arcane and archaic, but I have found this setup better (more predictable and more reliable) than anything "mobile-native". I appreciate that Termux behaves mostly like other Linux machines.

I had a pretty positive experience with Syncthing for Android on my previous phone. It was before I started using Termux. I had a directory called "clipboard" that synchronized between my desktop, laptop, and phone. Sometimes it took a while to notice new files. I would use it if I didn't use Termux or if I needed to keep multiple mobile devices in sync.

If I had to often send files to a mix of Android and iOS devices on the same local network, I would try LocalSend (https://localsend.org/).

Re:Croc: Easily and securely send things from one computer t... by lopkeny12ko on Saturday September 23, 2023 @04:20AM (#37621545)
This isn't really "sending files from one computer to another" aka P2P, as the title claims, if a relay is required.
Re:Croc: Easily and securely send things from one computer t... by zelphirkalt on Saturday September 23, 2023 @05:07AM (#37621710)
Tried it with a friend a few weeks ago and unfortunately it failed. It first began transferring the file, then for seemingly no reason I stopped receiving and then after waiting a bit got EOF and the file was not fully transferred. Seems like it is not that reliable in transferring files, or it has requirements, like open ports or so. But then why would it start and then stop trnasferring?
Re:Croc: Easily and securely send things from one computer t... by cl3misch on Saturday September 23, 2023 @07:55AM (#37622454)
I have used it many times in different scenarios and networks, including firewall and behind NAT. I never had to do anything manually except copying the passphrase.

Did you transfer a very large file?

Re:Croc: Easily and securely send things from one computer t... by zelphirkalt on Saturday September 23, 2023 @06:25PM (#37628118)
Yes, approximately 3 to 4 GB in size.
Re:Croc: Easily and securely send things from one computer t... by qrv3w on Saturday September 23, 2023 @09:50AM (#37623197)
It would be great if you could make a GH issue explaining your use case. I try to reproduce bugs and could possibly find a solution.
Re:Croc: Easily and securely send things from one computer t... by Zetobal on Saturday September 23, 2023 @05:13AM (#37621727)
I like croc, wormhole, snapdrop and whatever else there is I just don't get that there is no universal convenient standard for transferring files from one device to another over a wired/wireless connection. Mindboggling that most people use cloud hosting or email to transfer a file from one device to another when they are just 30cm from each other.
Re:Croc: Easily and securely send things from one computer t... by Gabrys1 on Saturday September 23, 2023 @05:32AM (#37621802)
Used to be "put it on a USB stick". Now no-one carries those so email/google drive it is :-)

When sharing files between devices I own (including my mobile phones) I attach them to a draft email to myself, then get them from the drafts on the other device.

Re:Croc: Easily and securely send things from one computer t... by minhmeoke on Saturday September 23, 2023 @07:19PM (#37628557)
The problem with email attachments is that it only supports files up to around 25MB, and if you have a slow uplink to the cloud, it could take a while.

A friend wrote a faster and more sophisticated version of `python -m http.server 8000` in rust which also supports uploads, you can read about here: https://news.ycombinator.com/item?id=37628347 File transfers are over the local network, and therefore should be very fast.

Re:Croc: Easily and securely send things from one computer t... by AtlasBarfed on Saturday September 23, 2023 @09:28AM (#37623039)
Security is always the reason we can't have nice things
Re:Croc: Easily and securely send things from one computer t... by minhmeoke on Saturday September 23, 2023 @07:06PM (#37628443)
Just start the server using:

    python -m http.server 8000
to share a directory over a local network. Then you can point a web browser on another device to port 8000 of the server's IP address to download files. However, this can be slow for larger files.

A friend wrote a faster and more sophisticated version of `python -m http.server 8000` in rust which also supports uploads, you can read about here: https://news.ycombinator.com/item?id=37628347

Re:Croc: Easily and securely send things from one computer t... by m000 on Saturday September 23, 2023 @05:24AM (#37621771)
I wish there was a gui version for croc. I've used it a couple of times to send files to non-techie friends. While croc worked great, having to spend 15' on the phone guiding them how to run the command felt like an unnecessary hassle.
Re:Croc: Easily and securely send things from one computer t... by rkangel on Saturday September 23, 2023 @05:29AM (#37621786)
For that application, Web Wormhole is unbeatable: https://webwormhole.io/
Re:Croc: Easily and securely send things from one computer t... by mr_mitm on Saturday September 23, 2023 @05:32AM (#37621800)
But here you download the source code every time you use it. It's not end-to-end anymore, as the person who designed the website can deliver malicious code, unless you pin the JS somehow.

I wish magicwormhole or croc came with every major OS preinstalled.

Re:Croc: Easily and securely send things from one computer t... by forty on Saturday September 23, 2023 @05:45AM (#37621858)
You can apt install magic-wormhole on Debian.

I'm not aware of any other major OS ;)

Re:Croc: Easily and securely send things from one computer t... by pepa65 on Saturday September 23, 2023 @05:47AM (#37621862)
About relying on the developer to provide the relay server (this was early 2022):

The cost of croc is mostly bandwidth - over 8 terabytes of data is sent every month through croc! That's amazing to me since I started this project just as a way for me to share files with friends. Four years ago, the public relay server only costed $5/month, but now it is costing me $40-50/month. The higher cost is enabling file transfers for thousands of people all around the world.

Re:Croc: Easily and securely send things from one computer t... by joelthelion on Saturday September 23, 2023 @07:13AM (#37622176)
Isn't it possible to use the relay to initiate a direct connection between the two clients, instead of transferring the data itself?
Re:Croc: Easily and securely send things from one computer t... by gitanovic on Saturday September 23, 2023 @07:50AM (#37622410)
It depends on the topology of the clients network, if they are both behind a specific kind of firewall (don't remember the details) no connection can be established from outside

When connection is possible, is my understanding that croc connects directly

Re:Croc: Easily and securely send things from one computer t... by navigate8310 on Saturday September 23, 2023 @09:13AM (#37622949)
CGNAT
Re:Croc: Easily and securely send things from one computer t... by wakamoleguy on Saturday September 23, 2023 @08:28AM (#37622682)
Sometimes. The VoIP world has been dealing with this for years. The process of finding and connecting the clients is called signaling, and that typically requires a shared relay. The signaling can contain information on how the clients can be reached directly. In SIP, typically each client will use a STUN server to discover their public IPs, and a process call ICE allows the clients to iteratively try those candidates until they establish a connection. Based on the NAT settings, it may not be possible, so clients will also include the IP of a relay TURN server.

The challenges with Croc here are largely the same, but with data as the media instead of voice or video. (Although, “VoIP” can also handle data in this way. See WebRTC data channels.)

Re:Croc: Easily and securely send things from one computer t... by joelthelion on Saturday September 23, 2023 @09:02AM (#37622883)
> Sometimes

I suppose you could try that, and fall back on full data relaying when it doesn't work. Should save a lot of bandwidth.

Of course, that might be a lot of work to implement, not saying it's easy!

Re:Croc: Easily and securely send things from one computer t... by bmgxyz on Saturday September 23, 2023 @09:41AM (#37623128)
This blog post[1] may interest you. As you suggested, the workflow seems to be:

1. Try various techniques that might trick the firewalls on both ends to let the connection through. This requires a relay for the initial negotiation only.

2. If (1) fails, then use a relay for everything.

[1]: https://tailscale.com/blog/how-nat-traversal-works/

Re:Croc: Easily and securely send things from one computer t... by qrv3w on Saturday September 23, 2023 @09:41AM (#37623132)
Thanks! The usage has only gone up - now in 2023 the croc public relay has been using 20 TB of bandwidth every month :| I like to write software that runs forever, but this will get difficult to run in the future if usage keeps climbing.
Re:Croc: Easily and securely send things from one computer t... by account-5 on Saturday September 23, 2023 @07:39AM (#37622346)
Can someone EIL5 this for me. I don't understand how this works. If I have my computer on my home network and the person I was to share a file with is on their home network, how does this work out where it's sending the file/folder? The examples seem to suggest it magically knows based just on a passphrase. I have to be missing something. I'm aware this is a stupid question but I can't, based on what I've read so far, work out how this transfers stuff without more details.
Re:Croc: Easily and securely send things from one computer t... by gitanovic on Saturday September 23, 2023 @07:46AM (#37622389)
The application has a default parameter that points to a relay server, when you want to share something, you tell to the server "hey I want to connect" and the server gives you back a passphrase, now the receiver connects to the same server and has to use the same passphrase to get the files you are sharing

Then the server tries to make your and the receiver clients connect directly to each other, if this doesn't work (mostly because of firewalls) it also Relais the parts of the file, which by the way are encrypted so that only your receiver client can decrypt

That's my understanding of how it works

Re:Croc: Easily and securely send things from one computer t... by account-5 on Saturday September 23, 2023 @08:21AM (#37622639)
Thanks, I thought there had to be some sort of middle man type thing going on. Not obvious, at least to me, from the info in the repo.
Re:Croc: Easily and securely send things from one computer t... by jcynix on Saturday September 23, 2023 @07:53AM (#37622436)
I agree that a secure way to transfer files between systems is a must. If two systems are at the same location, a small USB card reader (nowadays easily OTG capable) and an SD card allow me to transfer data.

For systems connected only by a network: maybe I don't see the advantages of these tools (which I have to install first on any client) as all systems I use already provide ssh and rsync to do secure file transfers. Even my Android devices are capable of using ssh/sshd and rsync via the Termux app, so to transfer files between them and a Linux or Mac laptop is easy.

OK, one user has to be proficient in enabling ssh/sshd if needed, but to install software such as the one discussed here, that's no difference.

Re:Croc: Easily and securely send things from one computer t... by cde-v on Saturday September 23, 2023 @08:02AM (#37622500)
I have to imagine whoever suggested the name “Croc” feels the same way because this is pretty much a crock of shit.
Re:Croc: Easily and securely send things from one computer t... by yard2010 on Saturday September 23, 2023 @08:34AM (#37622710)
Why so toxic
Re:Croc: Easily and securely send things from one computer t... by Bu9818 on Saturday September 23, 2023 @08:52AM (#37622817)
I too use rsync over SSH for devices I own, but I would avoid using SSH to transfer files with someone else. As the receiving side you either allow them way more access to your system than necessary or do some extra configuration to limit their access.
Re:Croc: Easily and securely send things from one computer t... by kortex on Saturday September 23, 2023 @09:40AM (#37623122)
It's much easier to install a single static binary than to correctly set up and configure ssh in a safe way. If you need "one and done" file transfers without worrying about open port 22, key exchange, etc, this (or tools like it) is great.
Re:Croc: Easily and securely send things from one computer t... by minhmeoke on Saturday September 23, 2023 @06:55PM (#37628347)
It would be even better if you didn't have to install any client software at all on the downloading devices, exchange ssh keys, or pass around a password to an account on your system in order to transfer files around your local network.

A useful utility that a friend wrote is https://github.com/akovacs/uploadserver - it's basically a nicer version of:

    python -m http.server 8000
Download prebuilt binaries for Linux, Windows, Mac OS from https://github.com/akovacs/uploadserver/releases/ or install from source if you prefer [1]

Start the file server, and then navigate to it using the web browser of your choice on any device (no need for a client application).

    chmod +x upload_server
    ./upload_server
Navigate to the server's ip address port 8000 in the browser of your choice and upload files using the web UI or directly via curl:

    curl -X POST --data-binary @file_to_upload.txt http://192.168.1.X:8000/uploaded_file.txt
Then download the file to another machine or mobile device either from your web browser or via a commandline tool:

    curl http://192.168.1.X:8000/uploads/uploaded_file.txt --output downloaded_file.txt

[1] Steps for installing from source code:

    # install rust toolchain
    sudo apt install rustc git
    curl https://sh.rustup.rs -sSf | sh
    rustup install nightly
    rustup default nightly
    git clone https://github.com/akovacs/uploadserver
    cd uploadserver
    cargo run --release
Re:Croc: Easily and securely send things from one computer t... by eviks on Sunday September 24, 2023 @02:50AM (#37630744)
Can you replicate this simplicity in your sshrsyncs for 3 iOS/Mac/Windows devices :

Setup: 1) install an app 2) create a folder 3) share secret link with other systems

Use: 1) open an app 2) see all files in that folder autosynced with another system (if it's also running an app)

So transfer is as easy as opening an app and copying files to a shared folder

Re:Croc: Easily and securely send things from one computer t... by wanderingmind on Saturday September 23, 2023 @08:15AM (#37622603)
Sorry what can croc or wormhole do that is not possible with KDEConnect? Is it more secure transfer? or can be automated among headless servers?
Re:Croc: Easily and securely send things from one computer t... by weinzierl on Saturday September 23, 2023 @08:34AM (#37622712)
Last time I checked Croc was flagged by a couple of scanners on VirusTotal. There is the possibility that these are false positives and when we have the attention of HN I wanted to use the opportunity to raise awareness. Maybe someone can have a look into it.
Re:Croc: Easily and securely send things from one computer t... by meindnoch on Saturday September 23, 2023 @09:22AM (#37623012)
From one computer to another? More like from one computer to this guy's server, then from the server to the other computer. Sounds pretty suboptimal if you want to send anything but few kilobyte files.
Re:Croc: Easily and securely send things from one computer t... by qrv3w on Saturday September 23, 2023 @09:46AM (#37623168)
This is actually not uncommon at all for anything on the internet. You can see for yourself actually using this command:

``` > traceroute news.ycombinator.com ```

On my computer, most packets take a route that passes through 10+ computers.

I think its not a solved problem to consistently be able to patch two computers on the internet directly.

Re:Croc: Easily and securely send things from one computer t... by influxmoment on Saturday September 23, 2023 @10:31AM (#37623570)
In what situation do people use these tools? I find I have ssh already when I need to transfer files securely
Re:Croc: Easily and securely send things from one computer t... by lost_tourist on Saturday September 23, 2023 @10:48AM (#37623746)
better than rsync over ssh?
Re:Croc: Easily and securely send things from one computer t... by Faf on Sunday September 24, 2023 @06:42AM (#37631888)
Most people here are referring to transfers of their own data. How do people transfer their confidential information to say, their solicitors, who may be on different operating systems and behind NAT / firewalls?

Specifically if cloud services are banned by the solicitor's company.

You'd have thought by 2023 this would have been solved but I don't believe it has. Particularly as PGP email administration (including key management over time / replacement hardware) is non trivial and unlikely to be successfully achieved by the non tech savvy.

Re:Croc: Easily and securely send things from one computer t... by xnasero on Sunday September 24, 2023 @09:50AM (#37633103)
Onionshare for your non tech friends or mobile works great IMO. Otherwise croc or wormwhole are awesome
Re:Croc: Easily and securely send things from one computer t... by dnoberon on Sunday September 24, 2023 @07:31PM (#37638156)
How does this differ from Globus or Jetstream? Apart from being FOSS of course.