Fileway is a real-time file transfer service that works through a web browser or command line. It lets two users exchange files through an intermediary server without storing data or requiring direct access to each other’s systems - like a live-streaming version of WeTransfer™[1].
You can jump in following the tutorial or read on for an architectural overview.
fileway
is a client/server application that transfer single files (well, technically…). It accepts an upload and blocks it until a download is initiated, then processes the upload and sends the data to the downloading client.
It can be used to relay files from a server to another, if the two servers can’t easily "see" each other but can see a third server, where fileway
is installed.
The transfer is secure: a unique link is generated, and you should only take care to serve it via HTTPS (discussed below).
Uploads can be done with a web interface - works on mobile, too - or via a python3 script, for shells. Downloads can be done via a browser or using the commandline, e.g. curl
. The uploading script or web session must be kept online until the transfer is done. Of course, multiple concurrent transfers are possible, and it transfers one file at a time.
fileway
doesn’t store anything on the server, it just keeps a buffer to make transfers smooth. It doesn’t have any dependency other than go
. It’s distributed as a docker image, but you can easily build it yourself. Also provided, a docker image that includes caddy
for simple HTTPS provisioning.
For a quick test, you can run it locally. Prerequisites are docker
, a file to upload, nothing else.
Run the server:
docker run --rm -p 8080:8080 -e FILEWAY_SECRET_HASHES='$2a$10$I.NhoT1acD9XkXmXn1IMSOp0qhZDd63iSw1RfHZP7nzyg/ItX5eVa' ghcr.io/proofrock/fileway:latest
Tip
|
Please note the single quotes around the secret. It contains some |
Then open http://localhost:8080 to access the upload web page. Put mysecret
as the secret, and choose a file. Press the Upload button.
In the two boxes that will be displayed, you’ll find an URL to be open directly in a browser; and a curl
commandline to download the file.
Note
|
You can use anything to download that URL, as long as it supports taking the filename from the |
-
About the server and how to configure it, build it and add a reverse proxy;
-
About the upload methods, which one to choose and how to use them best;
-
About the download links and all the design choices.
Let me know if you need more info!