News for hackers. Stuff that matters.
Re:Ask HN: What is your favorite method of sending large files? by kvn_95 on Wednesday September 02, 2020 @04:24AM (#24351153)
Magic Wormhole (https://magic-wormhole.readthedocs.io/en/latest/) if it's between OSes.

Between OSX, AirDrop works very well. I have sent >10GB files between Macs, quite quick as well.

I have never send a 10TB file so I wouldn't know. None of my drives are that large yet :)

Re:Ask HN: What is your favorite method of sending large files? by theobeers on Wednesday September 02, 2020 @04:38PM (#24357852)
Magic Wormhole is good. These days I use croc,[0] which I find even better.

[0]: https://github.com/schollz/croc

Re:Ask HN: What is your favorite method of sending large files? by psanford on Wednesday September 02, 2020 @06:43PM (#24359064)
I never understood why croc chose to copy the features of Magic Wormhole but implement them in an incompatible way.

Partially out of my annoyance with this I implemented a port of Magic Wormhole in Go that fully interoperates with the official python version: https://github.com/psanford/wormhole-william

Re:Ask HN: What is your favorite method of sending large files? by qrv3w on Wednesday September 02, 2020 @06:57PM (#24359174)
I initiated the croc project. Others have asked me the same thing, so I'll bite:

I chose not to copy the features of magic wormhole because it seemed to me (at the time) to be very complicated and lacking in features crucial to myself (namely restarting transfers [1], sending folders without zipping them).

This has been to my benefit, I think, because I can iterate on croc quickly without having to conform to the wormhole spec and I've since added features still not available in wormhole (like restarting transfers [1], and ipv6 support [2]).

That being said, I really like magic wormhole and consider it my inspiration. And I'm glad that you ported it to Go!

[1]: https://github.com/warner/magic-wormhole/issues/88

[2]: https://github.com/warner/magic-wormhole/issues/354

Re:Ask HN: What is your favorite method of sending large files? by BusTrainBus on Thursday September 03, 2020 @04:10AM (#24361840)
Thank you. Croc is fantastic because it solves a problem that no other tool does. Magic Wormhole stumbles at the first hurdle (installability).
Re:Ask HN: What is your favorite method of sending large files? by spurgu on Thursday September 03, 2020 @07:10AM (#24362817)
I'm sorry but I don't understand the hurdle?

As I mentioned in another thread installing Magic Wormhole is _easy_, just "brew install magic-wormhole" or "sudo apt-get install magic-wormhole" (or distro equivalent). Windows might be tricky but don't see how croc does it much better. I hadn't heard of Scoop but seems like you'd need to install _that_ first (which has its own dependencies). That said I haven't used Windows in many many years, maybe Scoop is the standard nowadays like Homebrew is for Mac? In which case I'd give a point to croc.

Also, with a Go app you could just share/distribute the binary, but then you also need to know where to put it. And you could do that with Magic Wormhole as well.

Or a step better like using something like PyInstaller (wonder why author hasn't done that?)..

Re:Ask HN: What is your favorite method of sending large files? by qrv3w on Thursday September 03, 2020 @08:24AM (#24363291)
As BusTrainBus says, "installability" is useful, and it was one of my motivations.

I agree installation for magic wormhole is easy for Mac/Linux, but I think its not easy on Windows. Windows is very common (77% of the market share for desktops [1]) so I wanted to keep croc easy to install for Windows.

In fact, if you are just receiving a file on Windows, all you have to do is download the binary from releases [2], unzip it, and double click on the binary - no terminal experience required. (Sending a file does require using a terminal, but all CLI apps have that hurdle...).

[1]: https://gs.statcounter.com/os-market-share/desktop/worldwide

[2]: https://github.com/schollz/croc/releases

Re:Ask HN: What is your favorite method of sending large files? by acqq on Thursday September 03, 2020 @03:09AM (#24361511)
Can you write what is that hadcoded relay in croc? Who maintains it, how does it handle the increase in demand or outages etc?
Re:Ask HN: What is your favorite method of sending large files? by qrv3w on Thursday September 03, 2020 @08:12AM (#24363196)
I maintain it. Its been up for about 2 years with pretty minimal downtime.

In any case, I encourage everyone to setup their own relay. Its easy. Make sure ports 9009-9014 are open and then run `croc relay`.

Connecting to your relay is as easy as `croc --relay ADDRESS:9009 send X`. And if you add the `--remember` flag you only have to tell it which relay to use once.

Re:Ask HN: What is your favorite method of sending large files? by clankyclanker on Wednesday September 02, 2020 @08:54PM (#24359849)
Would it be possible to sniff the protocol on the wire and provide some sort of cross-compatible magic wormcroc service?
Re:Ask HN: What is your favorite method of sending large files? by qrv3w on Thursday September 03, 2020 @08:14AM (#24363207)
Definitely possible. I'll happily take any PR that does this.
Re:Ask HN: What is your favorite method of sending large files? by mettamage on Thursday September 03, 2020 @04:10AM (#24361839)
> so I'll bite

Just curious: pun intended?

Re:Ask HN: What is your favorite method of sending large files? by qrv3w on Thursday September 03, 2020 @08:13AM (#24363200)
I didn't see this one until now :)
Re:Ask HN: What is your favorite method of sending large files? by spurgu on Wednesday September 02, 2020 @07:12PM (#24359275)
I don't see an option to send text (browsed through README and Issues), is this not possible with croc? With Magic Wormhole it's the default to get a message prompt when running "wormhole send". Or you can do it as a oneliner with "wormhole send --text 'something'". Wormhole William can do this as well IIRC.

I use MWH often for sending stuff like URL's, passwords, API keys... having to create a file for that is quite annoying (and remembering to delete it afterwards).

"brew install magic-wormhole" or "sudo apt-get install magic-wormhole" is easy enough and I don't hang around with people who use Windows. ;)

Resumable file transfers sound like a great feature though. Not sure it's implementable with MWH the way it now works.

Re:Ask HN: What is your favorite method of sending large files? by qrv3w on Wednesday September 02, 2020 @08:41PM (#24359790)
Just added it now. Send with croc send --text "hello, world" [1]

[1]: https://github.com/schollz/croc/releases/tag/v8.2.0

Re:Ask HN: What is your favorite method of sending large files? by spurgu on Friday September 04, 2020 @06:07PM (#24379369)
Nice! I just tried it out now. I also like the fact that "croc" defaults to receive, where with MWH you need to type "wormhole receive". Saves a lot of keystrokes.

Tab completion is something I'll miss from MWH (I'm already converted!) but I can live with it, and my non-technical friends aren't even aware of the concept.

Re:Ask HN: What is your favorite method of sending large files? by spurgu on Thursday September 03, 2020 @07:00AM (#24362767)
Haha wow, thanks! I'll give it a spin today!
Re:Ask HN: What is your favorite method of sending large files? by a1371 on Wednesday September 02, 2020 @09:28PM (#24360045)
Haha, quick turnaround.
Re:Ask HN: What is your favorite method of sending large files? by qrv3w on Wednesday September 02, 2020 @07:51PM (#24359525)
Not possible right now. This is a good idea, I can add it in :)
Re:Ask HN: What is your favorite method of sending large files? by kvn_95 on Wednesday September 02, 2020 @06:40PM (#24359043)
Oh this looks great! Thanks for this, checking it out.
Re:Ask HN: What is your favorite method of sending large files? by mettamage on Wednesday September 02, 2020 @05:07AM (#24351362)
I use the magic of AirDrop as well :) Unfortunately, sometimes I'm on my Linux machine (in which case python3 -m http.server works just fine), or need to send a file to someone else and then I'd like to have at least some form of monitoring/progress.

Edit: magic wormhole is awesome! Thanks! :D

Re:Ask HN: What is your favorite method of sending large files? by dijit on Wednesday September 02, 2020 @04:15PM (#24357597)
OpenDrop works very well on linux for airdrop between linux+macos.

Provided of course that you have a wifi card that supports active monitor mode.. and you are root on your machine.

https://github.com/seemoo-lab/opendrop

Re:Ask HN: What is your favorite method of sending large files? by ramses0 on Wednesday September 02, 2020 @07:25PM (#24359359)
There's a moderately useful one I've used quite a few times: https://snapdrop.net/

It _imitates_ the AirDrop UI, but is not compatible.

Use case is you open up snapdrop.net on both devices (nearby? same wifi?) and you can send files between, but I believe it all goes through a central server. Great for sending a few photos from phone to laptop or linux device when AirDrop isn't an option.

Re:Ask HN: What is your favorite method of sending large files? by spieglt on Wednesday September 02, 2020 @10:19PM (#24360273)
I wrote github.com/spieglt/flyingcarpet because I needed AirDrop on my Linux and Windows machines, pretty much does the same thing as running a Python server but over ad hoc wifi.
Re:Ask HN: What is your favorite method of sending large files? by kilroy123 on Wednesday September 02, 2020 @05:33PM (#24358414)
I once sent a huge file over airdrop and was shocked how much faster it was then sending through the local LAN.
Re:Ask HN: What is your favorite method of sending large files? by mistrial9 on Wednesday September 02, 2020 @06:46PM (#24359089)
some copy methods verify and check during the transfer operation, others do not, so the final speeds are very different between them
Re:Ask HN: What is your favorite method of sending large files? by icebraining on Wednesday September 02, 2020 @08:31PM (#24359730)
The major difference is that Airdrop establishes a direct WiFi connection, bypassing the router completely.
Re:Ask HN: What is your favorite method of sending large files? by emit_time on Thursday September 03, 2020 @12:31AM (#24360813)
Just had a 41GB set of files sent to me in one transfer using magic-wormhole. Worked first try without a hitch. Pretty awesome from the receiving end.
Re:Ask HN: What is your favorite method of sending large files? by Zenbit_UX on Thursday September 03, 2020 @07:41AM (#24362985)
This is local lan only right? Or are you port forwarding to expose it?