| Crates.io | harddrive-party |
| lib.rs | harddrive-party |
| version | 0.0.1 |
| created_at | 2025-05-23 17:44:45.282302+00 |
| updated_at | 2025-05-23 17:44:45.282302+00 |
| description | Share files peer-to-peer |
| homepage | https://gitlab.com/pegpeg/harddrive-party |
| repository | https://gitlab.com/pegpeg/harddrive-party |
| max_upload_size | |
| id | 1686561 |
| size | 2,016,413 |

Allows two or more peers to share files. Peers can choose directories to share, and connect to each other by exchanging codes containing their connection details.
cargo install --locked harddrive-party
harddrive-party start --share-dir ~/my-dir-to-share
Open http://localhost:3030 in your browser.
Send your 'announce address' to someone you want to connect to (using some external messaging system).
Enter the 'announce address' of the peer you sent yours to.
Once this is done you should be able to see their shared files in the 'Peers' tab.
You will automatically also connect to anyone else they are connected to - that is, peer details are 'gossiped'.
Download a file or directory by clicking the download button next to it. You can see the status of downloads and view downloaded files in the 'Transfers' tab.
There are 3 methods of peer discovery:
UDP hole-punching is used to connect peers who are behind a NAT or firewall.
Peers connect to each other using Quic, with client authentication using ed25519. A Quic stream is opened for each RPC request to a peer. There are three types of wire message:
Ls - for querying the shared file index (with a sub-path, or search term).Read - for downloading a file, or portion of a file.AnnoucePeer - for passing on connection details of another peer.These wire messages are serialized with bincode.
To speed up file index queries, shared directory is indexed using a key-value store (sled). The only metadata stored is the filenames and their size.
A 'wishlist' of requested files is also stored in the database so that if a connection is lost, the files will be re-requested next time you connect to that peer.
There are no usernames - peers are represented by an adjective and type of animal which is derived from their public authentication key. For example: 'PersianChinchilla'.
You can switch on logging by setting the environment variable RUST_LOG=harddrive_party=debug or by starting with the --verbose command line option.
There is a work-in-progress web-based front end build with Leptos, served by default to http://localhost:3030. Source code in ./web-ui
The source code is hosted on both github and gitlab. I generally use gitlab for PRs and issues, but feel free to use github if you don't have a gitlab account.
Currently pre-alpha - expect bugs and breaking changes.
This is based on a previous NodeJS project - pegpeg/hdp - but has many protocol-level changes.