Live data from Hacker News

Croc: Easily and securely send things from one computer to another

github.com

91–100 of 146 posts

Re: Croc: Easily and securely send things from one computer to another

#91

Earlier quoted context omitted.

Isn't it possible to use the relay to initiate a direct connection between the two clients, instead of transferring the data itself?

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 candidate…

> 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 to another

#92

Earlier quoted context omitted.

Isn't it possible to use the relay to initiate a direct connection between the two clients, instead of transferring the data itself?

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

CGNAT

Re: Croc: Easily and securely send things from one computer to another

#94
post #64

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.

Security is always the reason we can't have nice things

Re: Croc: Easily and securely send things from one computer to another

#95
Most commentards 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 to another

#96
post #23

https://drop.lol Github: https://github.com/mat-sz/filedrop

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 to another

#97
post #81

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 transfer…

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 to another

#98

Earlier quoted context omitted.

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 candidate…

> 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!

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 to another

#99
post #72

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 transf…

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 to another

#100

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.

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.

Post reply on HN