Restructured readme
This commit is contained in:
parent
6a0e08aba3
commit
01ee96853e
2 changed files with 30 additions and 34 deletions
56
README.md
56
README.md
|
|
@ -1,19 +1,11 @@
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
# rqbit - bittorrent client in Rust
|
# rqbit - bittorrent client in Rust
|
||||||
|
|
||||||
**rqbit** is a bittorrent client written in Rust.
|
**rqbit** is a bittorrent client written in Rust.
|
||||||
|
|
||||||
## Motivation
|
|
||||||
|
|
||||||
First of all, I love Rust. The project was created purely for the fun of the process of writing code in Rust.
|
|
||||||
|
|
||||||
I was not satisfied with my regular bittorrent client, and was wondering how much work would it be to create a new one from scratch.
|
|
||||||
|
|
||||||
Got it to the point where it downloads torrents reliably and pretty fast, and I was using for a few months myself. It works good enough for me, and at the moment of writing this I'm not planning to extend it further.
|
|
||||||
|
|
||||||
So in short, it's not "feature complete", but rather "good enough for my use-cases".
|
|
||||||
|
|
||||||
Open sourced it just in case anyone might find it useful and/or wants to contribute.
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
There are pre-built binaries in [releases](https://github.com/ikatson/rqbit/releases).
|
There are pre-built binaries in [releases](https://github.com/ikatson/rqbit/releases).
|
||||||
|
|
@ -71,6 +63,7 @@ Use a regex here to select files by their names.
|
||||||
- Selective downloading using a regular expression for filename
|
- Selective downloading using a regular expression for filename
|
||||||
- DHT support. Allows magnet links to work, and makes more peers available.
|
- DHT support. Allows magnet links to work, and makes more peers available.
|
||||||
- HTTP API
|
- HTTP API
|
||||||
|
- Web UI
|
||||||
|
|
||||||
### Code features
|
### Code features
|
||||||
- Serde-based bencode serializer/deserializer
|
- Serde-based bencode serializer/deserializer
|
||||||
|
|
@ -80,23 +73,11 @@ Use a regex here to select files by their names.
|
||||||
- No unsafe
|
- No unsafe
|
||||||
|
|
||||||
### Bugs, missing features and other caveats
|
### Bugs, missing features and other caveats
|
||||||
Below points are all easily fixable, PRs welcome.
|
PRs are very welcome.
|
||||||
|
|
||||||
- Doesn't survive switching networks, i.e. doesn't reconnect to a peer once the TCP connection is closed.
|
|
||||||
- Only supports BitTorrent V1 over TCP
|
- Only supports BitTorrent V1 over TCP
|
||||||
- As this was created for personal needs, and for educational purposes, documentation, commit message quality etc. leave a lot to be desired.
|
- As this was created for personal needs, and for educational purposes, documentation, commit message quality etc. leave a lot to be desired.
|
||||||
|
|
||||||
## Code organization
|
|
||||||
- crates/rqbit - main binary
|
|
||||||
- crates/librqbit - main library
|
|
||||||
- crates/librqbit-core - torrent utils
|
|
||||||
- crates/bencode - bencode serializing/deserializing
|
|
||||||
- crates/buffers - wrappers around binary buffers
|
|
||||||
- crates/clone_to_owned - a trait to make something owned
|
|
||||||
- crates/sha1w - wrappers around sha1 libraries
|
|
||||||
- crates/peer_binary_protocol - the protocol to talk to peers
|
|
||||||
- crates/dht - Distributed Hash Table implementation
|
|
||||||
|
|
||||||
## HTTP API
|
## HTTP API
|
||||||
|
|
||||||
By default it listens on http://127.0.0.1:3030.
|
By default it listens on http://127.0.0.1:3030.
|
||||||
|
|
@ -112,7 +93,8 @@ By default it listens on http://127.0.0.1:3030.
|
||||||
"GET /torrents/{index}": "Torrent details",
|
"GET /torrents/{index}": "Torrent details",
|
||||||
"GET /torrents/{index}/haves": "The bitfield of have pieces",
|
"GET /torrents/{index}/haves": "The bitfield of have pieces",
|
||||||
"GET /torrents/{index}/stats": "Torrent stats",
|
"GET /torrents/{index}/stats": "Torrent stats",
|
||||||
"POST /torrents/": "Add a torrent here. magnet: or http:// or a local file."
|
"POST /torrents/": "Add a torrent here. magnet: or http:// or a local file.",
|
||||||
|
"GET /web/": "Web UI"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -133,3 +115,25 @@ Supported query parameters, all optional:
|
||||||
- only_files_regex - the regular expression string to match filenames
|
- only_files_regex - the regular expression string to match filenames
|
||||||
- output_folder - the folder to download to. If not specified, defaults to the one that rqbit server started with
|
- output_folder - the folder to download to. If not specified, defaults to the one that rqbit server started with
|
||||||
- list_only=true|false - if you want to just list the files in the torrent instead of downloading
|
- list_only=true|false - if you want to just list the files in the torrent instead of downloading
|
||||||
|
|
||||||
|
## Web UI
|
||||||
|
Access with http://localhost:3030/web/
|
||||||
|
|
||||||
|
<img width="1165" alt="Web UI" src="https://github.com/ikatson/rqbit/assets/221386/3854c1d6-94ee-4416-8af5-7ede6cd2047a">
|
||||||
|
|
||||||
|
## Code organization
|
||||||
|
- crates/rqbit - main binary
|
||||||
|
- crates/librqbit - main library
|
||||||
|
- crates/librqbit-core - torrent utils
|
||||||
|
- crates/bencode - bencode serializing/deserializing
|
||||||
|
- crates/buffers - wrappers around binary buffers
|
||||||
|
- crates/clone_to_owned - a trait to make something owned
|
||||||
|
- crates/sha1w - wrappers around sha1 libraries
|
||||||
|
- crates/peer_binary_protocol - the protocol to talk to peers
|
||||||
|
- crates/dht - Distributed Hash Table implementation
|
||||||
|
|
||||||
|
## Motivation
|
||||||
|
|
||||||
|
First of all, I love Rust. The project was created purely for the fun of the process of writing code in Rust.
|
||||||
|
|
||||||
|
I was not satisfied with my regular bittorrent client, and was wondering how much work would it be to create a new one from scratch, and it got where it is, starting from bencode protocol implemenation, then peer protocol, etc, etc.
|
||||||
|
|
@ -394,14 +394,6 @@ const Buttons = () => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const LastErrors = (props: { lastErrors: Array<ErrorType> }) => {
|
|
||||||
return <div>
|
|
||||||
{props.lastErrors.map((e: ErrorType) => (
|
|
||||||
<div className="alert alert-primary" role="alert"></div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
const RootContent = (props: { closeableError: ErrorType, otherError: ErrorType, torrents: Array<TorrentId>, torrentsLoading: boolean }) => {
|
const RootContent = (props: { closeableError: ErrorType, otherError: ErrorType, torrents: Array<TorrentId>, torrentsLoading: boolean }) => {
|
||||||
let ctx = useContext(AppContext);
|
let ctx = useContext(AppContext);
|
||||||
return <>
|
return <>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue