Aft – a fast file transferring program

3 points by dd-dreams 2 days ago

Hey everyone! I have shown this program before, but it has changed ALOT since then.

I would really love to hear your feedback, suggestions and questions.

Source code: https://github.com/dd-dreams/aft

P.S. Here is a quick config file: ```

verbose=3

identifier=coolhnuser

```

sandreas 2 days ago

How about adding a feature list here?

What's the difference to croc, sfk or rclone? What makes it the Vetter choice?

Did you consider DNS multicast to auto select a host in the local network?

  • dd-dreams 2 days ago

    Well aft features:

    - Encryption. Currently the only algorithm in use is AES-128/256 GCM and for exchanging keys is x25519 Diffie-Hellman, but in the future there could be other algorithms such as XChaCha.

    - Parallel Encryption (with an option to choose the amount of threads) which makes the transfer much faster.

    - Peer-to-Peer and Relay Modes: Individuals who prefer not to open a port can utilize a relay service. Currently, there is no hosted relay available; however, if there is sufficient demand, I may consider establishing one. The relay does not get any information about the file.

    - Blocking senders. Blocking senders is only supported in relay mode which allows for basically...blocking senders. It relies on an IP address (it's not shared with the receiver, only a hashed one).

    - DNS lookups.

    - More info in the GitHub page...

    # Comparisons with other tools

    I didn't look too much into the protocols of the tools you mentioned, but here some differences:

    - croc and magic wormhole - (always?) uses a relay. Good for most cases, but it has some problems such as: transferring on local networks is not accounted for and relying on a relay. They might try to connect the receiver and the sender first but I'm not sure.

    - rclone - not really the same purpose. rclone wants to sync files for cloud storage with popular providers or your own. aft wants to transfer files between any two devices but not syncing.

    - sfk - if I found the correct one, sfk main concern is not file transfer but multiple utilities. aft is only for transferring files.

    ## Executables size

    Last time I installed magic-wormhole, I was required to install 340MB of dependencies on a new VPS. aft was only a quick `sh` run away. croc on the same system is 13MB, but aft is 2.6MB.

    ## Speed

    Currently aft matches almost the same download speed with croc and magic-wormhole (they're the only ones I tested of some quick runs) (might be even faster if you configure the amount of threads). But I do believe aft still has potential for making the transfer even faster. One of the reasons for this potential is because I'm using Rust, and Rust allows for low-level programming which might be useful here.

    Regarding mDNS, I didn't look into it, but if there is demand I might.

    edit: formatting and clarify

    • sandreas 2 days ago

      Great and detailed response, thank you. Well, I asked, because a longer while ago I wrote a cross platform tool named `graft` [1] to solve a similar issue: Having to transfer files without needing too much boilerplate on windows, linux and macOS.

      `graft` is a "risk your files for convenience" tool with pretty bad performance - so I would not recommend using it for something else than `graft serve` and `graft receive`, but these two are pretty handy.

      `graft serve ".zip"` will scan the current directory for `.zip` recursively, start a password authenticated sftp server and providing all findings (and only them) via `mdns`.

      While you COULD use any sftp client, you also can use any other host in the same network supporting mdns to just `graft receive` (without hostname) and `graft` will find the running instances in the network. If it is only one, it will connect, otherwise you can choose.

      This is indeed pretty convenient :-) - as I said, I wouldn't rely on this for important files.

      1: https://github.com/sandreas/graft

      • dd-dreams a day ago

        So with aft you probably could use it for the same purpose you have, but currently aft doesn't support multi transfers, but rerun each time. In the future it will probably be added, or provide an easier way to multi-transfer.

        About mDNS I'm not sure since if you're already running a receiver and a sender, might as well get the local IP. aft aims to be minimalistic.