TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Best modern file transfer/synchronization protocol?

70 pointsby daveidolover 1 year ago
Hi HN,<p>I&#x27;m looking to build something to transfer files between two devices on a network (one client and one server, both of which are under my control).<p>Obviously I could write something bespoke with raw TCP sockets, but rather than reinventing the wheel I&#x27;m curious about what existing options people recommend. I assume there are some better technologies than FTP nowadays?<p>Ideally some kind of built-in fault tolerance would be great, because my plan is to use this on a phone&#x2F;in an environment where the connection could be interrupted.<p>Edit: just to clarify - this is something I want to build into an application I am writing, ideally with support across iOS (client), Windows, and mac (server).<p>One way transfer is all I need, and I mostly plan on photos&#x2F;videos (so multiple files ~3-20MB in size).<p>Thanks!

20 comments

orbzover 1 year ago
No need to get fancy, scp or rsync are the tried and true options here.
评论 #38737517 未加载
ryukopostingover 1 year ago
I use syncthing for this. It&#x27;s a little fiddly to set up, and transfer speeds aren&#x27;t great. However, it&#x27;s very reliable once configured, and it barely uses any resources after an initial scan of the folder you want to sync.
评论 #38738743 未加载
2colorover 1 year ago
<a href="https:&#x2F;&#x2F;iroh.computer&#x2F;sendme" rel="nofollow noreferrer">https:&#x2F;&#x2F;iroh.computer&#x2F;sendme</a><p><a href="https:&#x2F;&#x2F;iroh.computer&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;iroh.computer&#x2F;</a><p>Iroh is what you’re looking for. You can embed into your code, and it handled wire encryption, verification, and NAT hole punching. All over QUIC.
评论 #38739863 未加载
pvtmertover 1 year ago
I highly recommend Unison (<a href="https:&#x2F;&#x2F;github.com&#x2F;bcpierce00&#x2F;unison">https:&#x2F;&#x2F;github.com&#x2F;bcpierce00&#x2F;unison</a>)<p>It allows you to sync between 2 machines (bi-directional) over TCP or SSH.<p>Note that TCP way is not encrypted, you may use wireguard as transport layer encryption for that purpose...<p>You can use an external application to copy if file size is larger than an arbitrary number. (Eg: use rsync for files &gt; 1gb)
评论 #38738538 未加载
whalesaladover 1 year ago
seconding rsync and syncthing.<p>the server could expose an smb or nfs share, the client could mount it, and then sync to that mount.<p>rsync over ssh also works, if you do not want to run smb&#x2F;nfs.<p>this is also a cool tool <a href="https:&#x2F;&#x2F;rclone.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;rclone.org&#x2F;</a>
rmoreyover 1 year ago
I cannot recommend rclone enough. Been using it to transfer petabyte-scale datasets flawlessly. Available as librclone as well
评论 #38737427 未加载
评论 #38737154 未加载
评论 #38737191 未加载
arun-mani-jover 1 year ago
On a similar note, can someone tell me what&#x27;s the fastest (wireless) way to transfer files between two laptops on same network (i.e. hotspot)?<p>scp, rsync, wormhole give me only 2-3 mb&#x2F;s.<p>For the context, I&#x27;m trying to transfer about 50-70 GB files.<p>What&#x27;s causing the bottleneck here and what am I missing? Thanks in advance!<p><a href="https:&#x2F;&#x2F;github.com&#x2F;magic-wormhole&#x2F;magic-wormhole">https:&#x2F;&#x2F;github.com&#x2F;magic-wormhole&#x2F;magic-wormhole</a>
评论 #38741894 未加载
评论 #38746054 未加载
oschrenkover 1 year ago
If it’s one way (that wasn’t quite clear from the requirements to me).<p>take a look at <a href="https:&#x2F;&#x2F;tus.io&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;tus.io&#x2F;</a>
评论 #38737376 未加载
bhaneyover 1 year ago
Yeah I usually just use rsync for this. In a loop if the network is unreliable.
rrix2over 1 year ago
I built something on top of the Syncthing API this week after using it on its own for years.<p>A local instance of Syncthing can behave as a robust sync tool + inotify API for applications consuming the files: <a href="https:&#x2F;&#x2F;docs.syncthing.net&#x2F;rest&#x2F;events-get.html#get-rest-events-disk" rel="nofollow noreferrer">https:&#x2F;&#x2F;docs.syncthing.net&#x2F;rest&#x2F;events-get.html#get-rest-eve...</a><p>i believe there&#x27;s an embeddable golang library, but if you want something easy to use on android check in on syncthing-fork which lets you define more granular sync conditions including &quot;just turn on 5 minutes every hour&quot; <a href="https:&#x2F;&#x2F;github.com&#x2F;Catfriend1&#x2F;syncthing-android">https:&#x2F;&#x2F;github.com&#x2F;Catfriend1&#x2F;syncthing-android</a>
mynegationover 1 year ago
What are your latency and bandwidth requirements? How big are the files? If you are already looking past obvious TCP-based choices like HTTP and FTP, you might be interested in FASP&#x2F;Aspera <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Fast_and_Secure_Protocol" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Fast_and_Secure_Protocol</a><p>Edit: I’ll leave it here just in case it is useful for others but it may or may not be embeddable into your app, especially on the phone.
jayknightover 1 year ago
I would probably start with rsync.
评论 #38736755 未加载
sneakover 1 year ago
rsync over ssh for one-shots.<p>syncthing for continuous use.
评论 #38736714 未加载
smackeyackyover 1 year ago
Grab an S3 bucket on amazon.<p>Do a 3 way sync with the s3 command line tool.<p>That way, you have a neat cloud backup as well. Wouldn&#x27;t take any more than 20 minutes total to set up.
评论 #38739700 未加载
eternityforestover 1 year ago
What about Jami? It runs almost everywhere and having an embeddable Jami library would be absolutely amazing, although a fair amount of work.
tripleo1over 1 year ago
1. warpinator, syncthing 2. rclone??<p>--<p>3. self hosted ipfs in tailscale or something? (that would be cool)
pluto_modadicover 1 year ago
continuous sync - mutagen.io (maybe you could extract some of the libraries)<p>depends on if it&#x27;s large or small files.
Helmut10001over 1 year ago
rsync. If you are looking for a long term solution: zfs on both sides with zfs send.
yetanother12345over 1 year ago
eh... wget or curl ? or not modern enough for you?
toomimover 1 year ago
Use HTTP. For fault tolerance, use resumeable downloads or resumeable uploads. There is work at the IETF on resumeable uploads right now: <a href="https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;draft-ietf-httpbis-resumable-upload&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;draft-ietf-httpbis-resumabl...</a>
评论 #38737004 未加载