https://github.com/naryand/bittorrent
BitTorrent client from scratch in Rust
https://github.com/naryand/bittorrent
bittorrent bittorrent-client bittorrent-network bittorrent-protocol p2p peer-to-peer rust torrent torrent-client
Last synced: 3 months ago
JSON representation
BitTorrent client from scratch in Rust
- Host: GitHub
- URL: https://github.com/naryand/bittorrent
- Owner: naryand
- License: mit
- Created: 2021-02-27T09:18:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-15T02:18:53.000Z (over 3 years ago)
- Last Synced: 2024-11-25T03:32:46.619Z (11 months ago)
- Topics: bittorrent, bittorrent-client, bittorrent-network, bittorrent-protocol, p2p, peer-to-peer, rust, torrent, torrent-client
- Language: Rust
- Homepage: https://naryand.github.io/bittorrent/
- Size: 102 KB
- Stars: 26
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## BitTorrent
[](https://github.com/naryand/bittorrent/actions/workflows/rust.yml)
---Client for the peer to peer BitTorrent protocol from scratch in Rust.
## Features
- Bencode encoding + decoding
- Parsing `.torrent` files for their metadata
- Discovering peers with HTTP and UDP tracker protocols
- TCP peer wire message parsing
- Concurrently downloading pieces from many peers
- Multithreaded SHA1 hash checking for verifying pieces
- Downloading single and multi-file torrents
- Resuming partially complete torrents
- Seeding requested pieces
- Pipelining piece requests for higher throughput### To do
- Asynchronous IO on a multithreaded runtime
- DHT, PEX, NAT traversal for more peers
- Rarest first/Choking/Super seeding algorithms
- Graphical/Web interface
- uTorrent transport protocol
- Piece paging/caching## Usage
To run, clone the repo and run
```
cargo run --release [torrent]
```
where `[torrent]` is the path to the .torrent file. The client will proceed to download the torrent into the working directory.Progress is given in completed pieces out of the total.