Update readme
This commit is contained in:
parent
d14d29b688
commit
f739c99dc0
2 changed files with 25 additions and 9 deletions
24
README.md
24
README.md
|
|
@ -74,8 +74,8 @@ Use a regex here to select files by their names.
|
|||
Below points are all easily fixable, PRs welcome.
|
||||
|
||||
- The CLI support only one mode of operation: download one torrent to a given folder.
|
||||
- If you try to run multiple instances, there's some port conflicts (already listening on port). This happens because DHT stores persistence information on disk, and that includes the port it last listened on. So all instances try to listen on the same port. Which means we need to add support for managing multiple torrents rather than trying to run the client multiple times. Or at least add a switch like --disable-dht-persistence.
|
||||
- HTTP API is rudimentary, mostly for looking at stats. E.g. you can't add a torrent through it.
|
||||
- If you try to run multiple instances, there's some port conflicts (already listening on port). This happens because DHT stores persistence information on disk, and that includes the port it last listened on.
|
||||
To work around this either use ```--disable-dht-persistence``` flag on the second (3rd, etc) instance of rqbit, or add the other torrent with HTTP API like this ```curl -d 'magnet:?...' http://127.0.0.1:3030/torrents```
|
||||
- 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.
|
||||
- Doesn't survive switching networks, i.e. doesn't reconnect to a peer once the TCP connection is closed.
|
||||
|
|
@ -105,6 +105,22 @@ By default it listens on http://127.0.0.1:3030.
|
|||
"GET /torrents": "List torrents (default torrent is 0)",
|
||||
"GET /torrents/{index}": "Torrent details",
|
||||
"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."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
### Add torrent through HTTP API
|
||||
|
||||
```curl -d 'magnet:?...' http://127.0.0.1:3030/torrents```
|
||||
|
||||
OR
|
||||
|
||||
```curl -d 'http://.../file.torrent' http://127.0.0.1:3030/torrents```
|
||||
|
||||
OR
|
||||
|
||||
```curl -d '/some/local/file.torrent' http://127.0.0.1:3030/torrents```
|
||||
|
||||
Supported query parameters:
|
||||
- overwrite=true|false
|
||||
|
|
@ -383,7 +383,7 @@ where
|
|||
MSGID_HAVE => {
|
||||
let expected_len = 4;
|
||||
match rest.get(..expected_len as usize) {
|
||||
Some(h) => Ok((Message::Have(BE::read_u32(&h)), PREAMBLE_LEN + expected_len)),
|
||||
Some(h) => Ok((Message::Have(BE::read_u32(h)), PREAMBLE_LEN + expected_len)),
|
||||
None => {
|
||||
let missing = expected_len - rest.len();
|
||||
Err(MessageDeserializeError::NotEnoughData(missing, "have"))
|
||||
|
|
@ -414,7 +414,7 @@ where
|
|||
let expected_len = 12;
|
||||
match rest.get(..expected_len as usize) {
|
||||
Some(b) => {
|
||||
let request = decoder_config.deserialize::<Request>(&b).unwrap();
|
||||
let request = decoder_config.deserialize::<Request>(b).unwrap();
|
||||
Ok((Message::Request(request), PREAMBLE_LEN + expected_len))
|
||||
}
|
||||
None => {
|
||||
|
|
@ -435,7 +435,7 @@ where
|
|||
let expected_len = len_prefix as usize - 9 + 8;
|
||||
match rest.get(..expected_len) {
|
||||
Some(b) => Ok((
|
||||
Message::Piece(Piece::deserialize(&b)),
|
||||
Message::Piece(Piece::deserialize(b)),
|
||||
PREAMBLE_LEN + expected_len,
|
||||
)),
|
||||
None => Err(MessageDeserializeError::NotEnoughData(
|
||||
|
|
@ -456,7 +456,7 @@ where
|
|||
let expected_len = len_prefix as usize - 1;
|
||||
match rest.get(..expected_len) {
|
||||
Some(b) => Ok((
|
||||
Message::Extended(ExtendedMessage::deserialize(&b)?),
|
||||
Message::Extended(ExtendedMessage::deserialize(b)?),
|
||||
PREAMBLE_LEN + expected_len,
|
||||
)),
|
||||
None => Err(MessageDeserializeError::NotEnoughData(
|
||||
|
|
@ -520,7 +520,7 @@ impl<'a> Handshake<'a> {
|
|||
))?;
|
||||
Ok((
|
||||
Self::bopts()
|
||||
.deserialize(&hbuf)
|
||||
.deserialize(hbuf)
|
||||
.map_err(|e| MessageDeserializeError::Other(e.into()))?,
|
||||
expected_len,
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue