Merge pull request #376 from ikatson/prepare-8.1.0
Prepare for releasing 8.1.0
This commit is contained in:
commit
559fca8552
27 changed files with 2113 additions and 1624 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust_version: ["1.78", "1.83"]
|
rust_version: ["1.85", "1.87"]
|
||||||
steps:
|
steps:
|
||||||
- name: rustup toolchain install ${{ matrix.rust_version }}
|
- name: rustup toolchain install ${{ matrix.rust_version }}
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
2304
Cargo.lock
generated
2304
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librqbit-bencode"
|
name = "librqbit-bencode"
|
||||||
version = "3.0.2"
|
version = "3.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Bencode serialization and deserialization using Serde"
|
description = "Bencode serialization and deserialization using Serde"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librqbit-clone-to-owned"
|
name = "librqbit-clone-to-owned"
|
||||||
version = "3.0.0"
|
version = "3.0.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Util traits to represent something that can be made owned and change type at the same time."
|
description = "Util traits to represent something that can be made owned and change type at the same time."
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
@ -10,4 +10,4 @@ readme = "README.md"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "1.7.1"
|
bytes = "1.10"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librqbit-dht"
|
name = "librqbit-dht"
|
||||||
version = "5.2.0"
|
version = "5.3.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "DHT implementation, used in rqbit torrent client."
|
description = "DHT implementation, used in rqbit torrent client."
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
@ -28,13 +28,13 @@ serde = { version = "1", features = ["derive"] }
|
||||||
leaky-bucket = "1.1"
|
leaky-bucket = "1.1"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
bencode = { path = "../bencode", default-features = false, package = "librqbit-bencode", version = "3" }
|
bencode = { path = "../bencode", default-features = false, package = "librqbit-bencode", version = "3.1" }
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
parking_lot = "0.12"
|
parking_lot = "0.12"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
backoff = "0.4.0"
|
backoff = "0.4.0"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
rand = "0.8"
|
rand = "0.9"
|
||||||
indexmap = "2"
|
indexmap = "2"
|
||||||
dashmap = { version = "6", features = ["serde"] }
|
dashmap = { version = "6", features = ["serde"] }
|
||||||
clone_to_owned = { path = "../clone_to_owned", package = "librqbit-clone-to-owned", version = "3" }
|
clone_to_owned = { path = "../clone_to_owned", package = "librqbit-clone-to-owned", version = "3" }
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ impl PeerStore {
|
||||||
|
|
||||||
pub fn gen_token_for(&self, node_id: Id20, addr: SocketAddr) -> [u8; 4] {
|
pub fn gen_token_for(&self, node_id: Id20, addr: SocketAddr) -> [u8; 4] {
|
||||||
let mut token = [0u8; 4];
|
let mut token = [0u8; 4];
|
||||||
rand::thread_rng().fill_bytes(&mut token);
|
rand::rng().fill_bytes(&mut token);
|
||||||
let mut tokens = self.tokens.write();
|
let mut tokens = self.tokens.write();
|
||||||
tokens.push_back(StoredToken {
|
tokens.push_back(StoredToken {
|
||||||
token,
|
token,
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ impl<'a> Iterator for BucketTreeIterator<'a> {
|
||||||
|
|
||||||
pub fn generate_random_id(start: &Id20, bits: u8) -> Id20 {
|
pub fn generate_random_id(start: &Id20, bits: u8) -> Id20 {
|
||||||
let mut data = [0u8; 20];
|
let mut data = [0u8; 20];
|
||||||
rand::thread_rng().fill_bytes(&mut data);
|
rand::rng().fill_bytes(&mut data);
|
||||||
let mut data = Id20::new(data);
|
let mut data = Id20::new(data);
|
||||||
let remaining_bits = 160 - bits;
|
let remaining_bits = 160 - bits;
|
||||||
for bit in 0..remaining_bits {
|
for bit in 0..remaining_bits {
|
||||||
|
|
@ -649,13 +649,13 @@ mod tests {
|
||||||
|
|
||||||
fn random_id_20() -> Id20 {
|
fn random_id_20() -> Id20 {
|
||||||
let mut id20 = [0u8; 20];
|
let mut id20 = [0u8; 20];
|
||||||
rand::thread_rng().fill(&mut id20);
|
rand::rng().fill(&mut id20);
|
||||||
Id20::new(id20)
|
Id20::new(id20)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate_socket_addr() -> SocketAddr {
|
fn generate_socket_addr() -> SocketAddr {
|
||||||
let mut ipv4_addr = [0u8; 6];
|
let mut ipv4_addr = [0u8; 6];
|
||||||
rand::thread_rng().fill(&mut ipv4_addr);
|
rand::rng().fill(&mut ipv4_addr);
|
||||||
let ip = Ipv4Addr::new(ipv4_addr[0], ipv4_addr[1], ipv4_addr[2], ipv4_addr[3]);
|
let ip = Ipv4Addr::new(ipv4_addr[0], ipv4_addr[1], ipv4_addr[2], ipv4_addr[3]);
|
||||||
let port = ((ipv4_addr[4] as u16) << 8) + (ipv4_addr[5] as u16);
|
let port = ((ipv4_addr[4] as u16) << 8) + (ipv4_addr[5] as u16);
|
||||||
SocketAddrV4::new(ip, port).into()
|
SocketAddrV4::new(ip, port).into()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librqbit"
|
name = "librqbit"
|
||||||
version = "8.0.0"
|
version = "8.1.0"
|
||||||
authors = ["Igor Katson <igor.katson@gmail.com>"]
|
authors = ["Igor Katson <igor.katson@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "The main library used by rqbit torrent client. The binary is just a small wrapper on top of it."
|
description = "The main library used by rqbit torrent client. The binary is just a small wrapper on top of it."
|
||||||
|
|
@ -42,21 +42,21 @@ disable-upload = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# sqlx and home are pinned so that we can compile on older Rusts
|
# sqlx and home are pinned so that we can compile on older Rusts
|
||||||
sqlx = { version = "=0.8.2", features = [
|
sqlx = { version = "0.8", features = [
|
||||||
"runtime-tokio",
|
"runtime-tokio",
|
||||||
"macros",
|
"macros",
|
||||||
"postgres",
|
"postgres",
|
||||||
], default-features = false, optional = true }
|
], default-features = false, optional = true }
|
||||||
home = { version = "=0.5.5", optional = true }
|
home = { version = "0.5", optional = true }
|
||||||
|
|
||||||
bencode = { path = "../bencode", default-features = false, package = "librqbit-bencode", version = "3" }
|
bencode = { path = "../bencode", default-features = false, package = "librqbit-bencode", version = "3.1" }
|
||||||
tracker_comms = { path = "../tracker_comms", default-features = false, package = "librqbit-tracker-comms", version = "2.1" }
|
tracker_comms = { path = "../tracker_comms", default-features = false, package = "librqbit-tracker-comms", version = "3" }
|
||||||
buffers = { path = "../buffers", package = "librqbit-buffers", version = "4.2" }
|
buffers = { path = "../buffers", package = "librqbit-buffers", version = "4.2" }
|
||||||
librqbit-core = { path = "../librqbit_core", default-features = false, version = "5" }
|
librqbit-core = { path = "../librqbit_core", default-features = false, version = "5" }
|
||||||
clone_to_owned = { path = "../clone_to_owned", package = "librqbit-clone-to-owned", version = "3" }
|
clone_to_owned = { path = "../clone_to_owned", package = "librqbit-clone-to-owned", version = "3" }
|
||||||
peer_binary_protocol = { path = "../peer_binary_protocol", default-features = false, package = "librqbit-peer-protocol", version = "4.2" }
|
peer_binary_protocol = { path = "../peer_binary_protocol", default-features = false, package = "librqbit-peer-protocol", version = "4.3" }
|
||||||
sha1w = { path = "../sha1w", default-features = false, package = "librqbit-sha1-wrapper", version = "4.1" }
|
sha1w = { path = "../sha1w", default-features = false, package = "librqbit-sha1-wrapper", version = "4.1" }
|
||||||
dht = { path = "../dht", package = "librqbit-dht", default-features = false, version = "5.2.0" }
|
dht = { path = "../dht", package = "librqbit-dht", default-features = false, version = "5.3.0" }
|
||||||
librqbit-upnp = { path = "../upnp", version = "1" }
|
librqbit-upnp = { path = "../upnp", version = "1" }
|
||||||
upnp-serve = { path = "../upnp-serve", package = "librqbit-upnp-serve", default-features = false, version = "1", optional = true }
|
upnp-serve = { path = "../upnp-serve", package = "librqbit-upnp-serve", default-features = false, version = "1", optional = true }
|
||||||
|
|
||||||
|
|
@ -66,7 +66,7 @@ tokio = { version = "1", features = [
|
||||||
"fs",
|
"fs",
|
||||||
"io-util",
|
"io-util",
|
||||||
] }
|
] }
|
||||||
governor = "0.8"
|
governor = "0.10"
|
||||||
console-subscriber = { version = "0.4", optional = true }
|
console-subscriber = { version = "0.4", optional = true }
|
||||||
axum = { version = "0.8", optional = true }
|
axum = { version = "0.8", optional = true }
|
||||||
tower-http = { version = "0.6", features = ["cors", "trace"], optional = true }
|
tower-http = { version = "0.6", features = ["cors", "trace"], optional = true }
|
||||||
|
|
@ -85,12 +85,12 @@ reqwest = { version = "0.12", default-features = false, features = [
|
||||||
] }
|
] }
|
||||||
urlencoding = "2"
|
urlencoding = "2"
|
||||||
byteorder = "1"
|
byteorder = "1"
|
||||||
bincode = "1"
|
bincode = "2"
|
||||||
bitvec = "1"
|
bitvec = "1"
|
||||||
parking_lot = "0.12"
|
parking_lot = "0.12"
|
||||||
tracing = "0.1.40"
|
tracing = "0.1.40"
|
||||||
size_format = "1"
|
size_format = "1"
|
||||||
rand = "0.8"
|
rand = "0.9"
|
||||||
tracing-subscriber = { version = "0.3", default-features = false, features = [
|
tracing-subscriber = { version = "0.3", default-features = false, features = [
|
||||||
"json",
|
"json",
|
||||||
"fmt",
|
"fmt",
|
||||||
|
|
@ -112,12 +112,12 @@ bytes = "1.5.0"
|
||||||
rlimit = "0.10.1"
|
rlimit = "0.10.1"
|
||||||
async-stream = "0.3.5"
|
async-stream = "0.3.5"
|
||||||
memmap2 = { version = "0.9.4" }
|
memmap2 = { version = "0.9.4" }
|
||||||
lru = { version = "0.12.3", optional = true }
|
lru = { version = "0.14", optional = true }
|
||||||
mime_guess = { version = "2.0.5", default-features = false }
|
mime_guess = { version = "2.0.5", default-features = false }
|
||||||
tokio-socks = "0.5.2"
|
tokio-socks = "0.5.2"
|
||||||
async-trait = "0.1.81"
|
async-trait = "0.1.81"
|
||||||
async-backtrace = { version = "0.2", optional = true }
|
async-backtrace = { version = "0.2", optional = true }
|
||||||
notify = { version = "7", optional = true }
|
notify = { version = "8", optional = true }
|
||||||
walkdir = "2.5.0"
|
walkdir = "2.5.0"
|
||||||
arc-swap = "1.7.1"
|
arc-swap = "1.7.1"
|
||||||
intervaltree = "0.2.7"
|
intervaltree = "0.2.7"
|
||||||
|
|
@ -127,8 +127,6 @@ async-compression = { version = "0.4.18", features = ["tokio", "gzip"] }
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
futures = { version = "0.3" }
|
|
||||||
tracing-subscriber = "0.3"
|
tracing-subscriber = "0.3"
|
||||||
tokio-test = "0.4"
|
tokio-test = "0.4"
|
||||||
tempfile = "3"
|
tempfile = "3"
|
||||||
rand = { version = "0.8", features = ["small_rng"] }
|
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,7 @@ impl Blocklist {
|
||||||
anyhow::bail!("Failed to fetch blocklist: HTTP {}", response.status());
|
anyhow::bail!("Failed to fetch blocklist: HTTP {}", response.status());
|
||||||
}
|
}
|
||||||
|
|
||||||
let reader = StreamReader::new(
|
let reader = StreamReader::new(response.bytes_stream().map_err(std::io::Error::other));
|
||||||
response
|
|
||||||
.bytes_stream()
|
|
||||||
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e)),
|
|
||||||
);
|
|
||||||
Self::create_from_stream(reader).await
|
Self::create_from_stream(reader).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ use crate::{
|
||||||
use librqbit_core::hash_id::Id20;
|
use librqbit_core::hash_id::Id20;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
#[allow(clippy::large_enum_variant)]
|
||||||
pub enum ReadMetainfoResult<Rx> {
|
pub enum ReadMetainfoResult<Rx> {
|
||||||
Found {
|
Found {
|
||||||
info: TorrentMetaV1Info<ByteBufOwned>,
|
info: TorrentMetaV1Info<ByteBufOwned>,
|
||||||
|
|
|
||||||
|
|
@ -358,17 +358,17 @@ impl<H: PeerConnectionHandler> PeerConnection<H> {
|
||||||
use crate::tests::test_util::TestPeerMetadata;
|
use crate::tests::test_util::TestPeerMetadata;
|
||||||
let tpm = TestPeerMetadata::from_peer_id(self.peer_id);
|
let tpm = TestPeerMetadata::from_peer_id(self.peer_id);
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
if rand::thread_rng().gen_bool(tpm.disconnect_probability()) {
|
if rand::rng().random_bool(tpm.disconnect_probability()) {
|
||||||
bail!("disconnecting, to simulate failure in tests");
|
bail!("disconnecting, to simulate failure in tests");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::cast_possible_truncation)]
|
#[allow(clippy::cast_possible_truncation)]
|
||||||
let sleep_ms = (rand::thread_rng().gen::<f64>()
|
let sleep_ms = (rand::rng().random::<f64>()
|
||||||
* (tpm.max_random_sleep_ms as f64))
|
* (tpm.max_random_sleep_ms as f64))
|
||||||
as u64;
|
as u64;
|
||||||
tokio::time::sleep(Duration::from_millis(sleep_ms)).await;
|
tokio::time::sleep(Duration::from_millis(sleep_ms)).await;
|
||||||
|
|
||||||
if rand::thread_rng().gen_bool(tpm.bad_data_probability()) {
|
if rand::rng().random_bool(tpm.bad_data_probability()) {
|
||||||
warn!("will NOT actually read the data to simulate a malicious peer that sends garbage");
|
warn!("will NOT actually read the data to simulate a malicious peer that sends garbage");
|
||||||
write_buf.fill(0);
|
write_buf.fill(0);
|
||||||
skip_reading_for_e2e_tests = true;
|
skip_reading_for_e2e_tests = true;
|
||||||
|
|
|
||||||
|
|
@ -998,11 +998,8 @@ impl Session {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_valid(pb: &PathBuf) -> anyhow::Result<()> {
|
fn check_valid(pb: &Path) -> anyhow::Result<()> {
|
||||||
if pb.components().into_iter().any(|x| match x {
|
if pb.components().any(|x| !matches!(x, Component::Normal(_))) {
|
||||||
Component::Normal(_) => false,
|
|
||||||
_ => true,
|
|
||||||
}) {
|
|
||||||
bail!("path traversal in torrent name detected")
|
bail!("path traversal in torrent name detected")
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ async fn _test_e2e_download(drop_checks: &DropChecks) {
|
||||||
async move {
|
async move {
|
||||||
let peer_id = TestPeerMetadata {
|
let peer_id = TestPeerMetadata {
|
||||||
server_id: i,
|
server_id: i,
|
||||||
max_random_sleep_ms: rand::thread_rng().gen_range(0u8..16),
|
max_random_sleep_ms: rand::rng().random_range(0u8..16),
|
||||||
}
|
}
|
||||||
.as_peer_id();
|
.as_peer_id();
|
||||||
let listen_range_start = 15100u16 + i as u16;
|
let listen_range_start = 15100u16 + i as u16;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ use std::{
|
||||||
use anyhow::bail;
|
use anyhow::bail;
|
||||||
use librqbit_core::Id20;
|
use librqbit_core::Id20;
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use rand::{thread_rng, Rng, RngCore, SeedableRng};
|
use rand::{rng, Rng, RngCore, SeedableRng};
|
||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
use tracing::{info, trace};
|
use tracing::{info, trace};
|
||||||
|
|
||||||
|
|
@ -29,7 +29,7 @@ pub fn create_new_file_with_random_content(path: &Path, mut size: usize) {
|
||||||
trace!(?path, "creating temp file");
|
trace!(?path, "creating temp file");
|
||||||
|
|
||||||
const BUF_SIZE: usize = 8192 * 16;
|
const BUF_SIZE: usize = 8192 * 16;
|
||||||
let mut rng = rand::rngs::SmallRng::from_entropy();
|
let mut rng = rand::rngs::SmallRng::from_os_rng();
|
||||||
let mut write_buf = [0; BUF_SIZE];
|
let mut write_buf = [0; BUF_SIZE];
|
||||||
while size > 0 {
|
while size > 0 {
|
||||||
rng.fill_bytes(&mut write_buf[..]);
|
rng.fill_bytes(&mut write_buf[..]);
|
||||||
|
|
@ -67,7 +67,7 @@ impl TestPeerMetadata {
|
||||||
|
|
||||||
pub fn as_peer_id(&self) -> Id20 {
|
pub fn as_peer_id(&self) -> Id20 {
|
||||||
let mut peer_id = Id20::default();
|
let mut peer_id = Id20::default();
|
||||||
thread_rng().fill(&mut peer_id.0);
|
rng().fill(&mut peer_id.0);
|
||||||
peer_id.0[0] = self.server_id;
|
peer_id.0[0] = self.server_id;
|
||||||
peer_id.0[1] = self.max_random_sleep_ms;
|
peer_id.0[1] = self.max_random_sleep_ms;
|
||||||
peer_id
|
peer_id
|
||||||
|
|
|
||||||
|
|
@ -127,10 +127,10 @@ impl TorrentStateInitializing {
|
||||||
|
|
||||||
// For all the remaining pieces we claim we have, validate them with decreasing probability.
|
// For all the remaining pieces we claim we have, validate them with decreasing probability.
|
||||||
let mut queue = queue.iter_ones().collect_vec();
|
let mut queue = queue.iter_ones().collect_vec();
|
||||||
queue.shuffle(&mut rand::thread_rng());
|
queue.shuffle(&mut rand::rng());
|
||||||
for (tmp_id, piece_id) in queue.into_iter().enumerate() {
|
for (tmp_id, piece_id) in queue.into_iter().enumerate() {
|
||||||
let denom: u32 = (tmp_id + 1).min(50).try_into().unwrap();
|
let denom: u32 = (tmp_id + 1).min(50).try_into().unwrap();
|
||||||
if rand::thread_rng().gen_ratio(1, denom) {
|
if rand::rng().random_ratio(1, denom) {
|
||||||
to_validate.set(piece_id, true);
|
to_validate.set(piece_id, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ impl TorrentStreams {
|
||||||
|
|
||||||
// Shuffle to decrease determinism and make queueing fairer.
|
// Shuffle to decrease determinism and make queueing fairer.
|
||||||
use rand::seq::SliceRandom;
|
use rand::seq::SliceRandom;
|
||||||
all.shuffle(&mut rand::thread_rng());
|
all.shuffle(&mut rand::rng());
|
||||||
|
|
||||||
Interleave { all: all.into() }
|
Interleave { all: all.into() }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,14 @@ tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
url = { version = "2", default-features = false }
|
url = { version = "2", default-features = false }
|
||||||
rand = "0.8"
|
rand = "0.9"
|
||||||
parking_lot = "0.12"
|
parking_lot = "0.12"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
buffers = { path = "../buffers", package = "librqbit-buffers", version = "4.2" }
|
buffers = { path = "../buffers", package = "librqbit-buffers", version = "4.2" }
|
||||||
bencode = { path = "../bencode", default-features = false, package = "librqbit-bencode", version = "3.0.1" }
|
bencode = { path = "../bencode", default-features = false, package = "librqbit-bencode", version = "3.1" }
|
||||||
clone_to_owned = { path = "../clone_to_owned", package = "librqbit-clone-to-owned", version = "3" }
|
clone_to_owned = { path = "../clone_to_owned", package = "librqbit-clone-to-owned", version = "3" }
|
||||||
itertools = "0.14"
|
itertools = "0.14"
|
||||||
directories = "5"
|
directories = "6"
|
||||||
tokio-util = "0.7.10"
|
tokio-util = "0.7.10"
|
||||||
data-encoding = "2.6.0"
|
data-encoding = "2.6.0"
|
||||||
bytes = "1.7.1"
|
bytes = "1.7.1"
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ pub fn generate_peer_id(fingerprint: &[u8]) -> Id20 {
|
||||||
let mut peer_id = [0u8; 20];
|
let mut peer_id = [0u8; 20];
|
||||||
|
|
||||||
peer_id[..8].copy_from_slice(fingerprint);
|
peer_id[..8].copy_from_slice(fingerprint);
|
||||||
rand::thread_rng().fill_bytes(&mut peer_id[8..]);
|
rand::rng().fill_bytes(&mut peer_id[8..]);
|
||||||
|
|
||||||
Id20::new(peer_id)
|
Id20::new(peer_id)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librqbit-peer-protocol"
|
name = "librqbit-peer-protocol"
|
||||||
version = "4.2.0"
|
version = "4.3.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Protocol for working with torrent peers. Used in rqbit torrent client."
|
description = "Protocol for working with torrent peers. Used in rqbit torrent client."
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
@ -22,7 +22,7 @@ serde = { version = "1", features = ["derive"] }
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
byteorder = "1"
|
byteorder = "1"
|
||||||
buffers = { path = "../buffers", package = "librqbit-buffers", version = "4.2" }
|
buffers = { path = "../buffers", package = "librqbit-buffers", version = "4.2" }
|
||||||
bencode = { path = "../bencode", default-features = false, package = "librqbit-bencode", version = "3" }
|
bencode = { path = "../bencode", default-features = false, package = "librqbit-bencode", version = "3.1" }
|
||||||
clone_to_owned = { path = "../clone_to_owned", package = "librqbit-clone-to-owned", version = "3" }
|
clone_to_owned = { path = "../clone_to_owned", package = "librqbit-clone-to-owned", version = "3" }
|
||||||
librqbit-core = { path = "../librqbit_core", default-features = false, version = "5" }
|
librqbit-core = { path = "../librqbit_core", default-features = false, version = "5" }
|
||||||
bitvec = "1"
|
bitvec = "1"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "rqbit"
|
name = "rqbit"
|
||||||
version = "8.0.0"
|
version = "8.1.0"
|
||||||
authors = ["Igor Katson <igor.katson@gmail.com>"]
|
authors = ["Igor Katson <igor.katson@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "A bittorrent command line client and server."
|
description = "A bittorrent command line client and server."
|
||||||
|
|
@ -51,7 +51,7 @@ upnp-serve = { path = "../upnp-serve", default-features = false, version = "1",
|
||||||
libc = "0.2.158"
|
libc = "0.2.158"
|
||||||
signal-hook = "0.3.17"
|
signal-hook = "0.3.17"
|
||||||
tokio-util = "0.7.11"
|
tokio-util = "0.7.11"
|
||||||
gethostname = "0.5.0"
|
gethostname = "1"
|
||||||
url = "2"
|
url = "2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librqbit-tracker-comms"
|
name = "librqbit-tracker-comms"
|
||||||
version = "2.1.0"
|
version = "3.0.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Common interface around various sha1 implementations used in rqbit torrent client."
|
description = "Common interface around various sha1 implementations used in rqbit torrent client."
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
@ -27,10 +27,10 @@ librqbit-core = { path = "../librqbit_core", default-features = false, version =
|
||||||
byteorder = "1.5"
|
byteorder = "1.5"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
urlencoding = "2"
|
urlencoding = "2"
|
||||||
rand = "0.8"
|
rand = "0.9"
|
||||||
tracing = "0.1.40"
|
tracing = "0.1.40"
|
||||||
reqwest = { version = "0.12", default-features = false, features = ["json"] }
|
reqwest = { version = "0.12", default-features = false, features = ["json"] }
|
||||||
bencode = { path = "../bencode", default-features = false, package = "librqbit-bencode", version = "3" }
|
bencode = { path = "../bencode", default-features = false, package = "librqbit-bencode", version = "3.1" }
|
||||||
url = { version = "2", default-features = false }
|
url = { version = "2", default-features = false }
|
||||||
parking_lot = "0.12.3"
|
parking_lot = "0.12.3"
|
||||||
tokio-util = "0.7.13"
|
tokio-util = "0.7.13"
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ const CONNECTION_ID_MAGIC: ConnectionId = 0x41727101980;
|
||||||
pub type TransactionId = u32;
|
pub type TransactionId = u32;
|
||||||
|
|
||||||
pub fn new_transaction_id() -> TransactionId {
|
pub fn new_transaction_id() -> TransactionId {
|
||||||
rand::thread_rng().gen()
|
rand::rng().random()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librqbit-upnp-serve"
|
name = "librqbit-upnp-serve"
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Simple UPnP MediaServer implementation"
|
description = "Simple UPnP MediaServer implementation"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
@ -19,7 +19,7 @@ sha1-ring = ["librqbit-sha1-wrapper/sha1-ring", "librqbit-core/sha1-ring"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.86"
|
anyhow = "1.0.86"
|
||||||
axum = { version = "0.8", features = ["tokio"] }
|
axum = { version = "0.8", features = ["tokio"] }
|
||||||
tokio = { version = "1.39.3", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
tracing = "0.1.40"
|
tracing = "0.1.40"
|
||||||
bstr = "1.10.0"
|
bstr = "1.10.0"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
|
@ -27,7 +27,7 @@ http = "1.1.0"
|
||||||
httparse = "1.9.4"
|
httparse = "1.9.4"
|
||||||
uuid = { version = "1.10.0", features = ["v4"] }
|
uuid = { version = "1.10.0", features = ["v4"] }
|
||||||
librqbit-upnp = { version = "1", path = "../upnp", default-features = false }
|
librqbit-upnp = { version = "1", path = "../upnp", default-features = false }
|
||||||
gethostname = "0.5.0"
|
gethostname = "1"
|
||||||
librqbit-sha1-wrapper = { path = "../sha1w", version = "4", default-features = false }
|
librqbit-sha1-wrapper = { path = "../sha1w", version = "4", default-features = false }
|
||||||
librqbit-core = { version = "5", path = "../librqbit_core", default-features = false }
|
librqbit-core = { version = "5", path = "../librqbit_core", default-features = false }
|
||||||
mime_guess = "2.0.5"
|
mime_guess = "2.0.5"
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,7 @@ impl SubscribeRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SubscribeRequest {
|
impl SubscribeRequest {
|
||||||
|
#[allow(clippy::result_large_err)]
|
||||||
pub fn parse(
|
pub fn parse(
|
||||||
request: axum::extract::Request,
|
request: axum::extract::Request,
|
||||||
) -> Result<SubscribeRequest, axum::response::Response> {
|
) -> Result<SubscribeRequest, axum::response::Response> {
|
||||||
|
|
|
||||||
1286
desktop/package-lock.json
generated
1286
desktop/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -9,25 +9,25 @@
|
||||||
"tauri": "tauri"
|
"tauri": "tauri"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.0.1",
|
"@tauri-apps/api": "^2.5.0",
|
||||||
"@tauri-apps/plugin-shell": "^2.0.0",
|
"@tauri-apps/plugin-shell": "^2.2.1",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
"react": "^18.2.0",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.3.1",
|
||||||
"react-icons": "^5.3.0",
|
"react-icons": "^5.5.0",
|
||||||
"rqbit-webui": "file:../crates/librqbit/webui"
|
"rqbit-webui": "file:../crates/librqbit/webui"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tauri-apps/cli": "2.0.0",
|
"@tauri-apps/cli": "2.0.0",
|
||||||
"@types/lodash.debounce": "^4.0.9",
|
"@types/lodash.debounce": "^4.0.9",
|
||||||
"@types/react": "^18.2.15",
|
"@types/react": "^18.3.23",
|
||||||
"@types/react-dom": "^18.2.7",
|
"@types/react-dom": "^18.3.7",
|
||||||
"@vitejs/plugin-react": "^4.0.3",
|
"@vitejs/plugin-react": "^4.5.1",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.21",
|
||||||
"postcss": "^8.4.32",
|
"postcss": "^8.5.4",
|
||||||
"tailwindcss": "^3.3.6",
|
"tailwindcss": "^3.4.17",
|
||||||
"typescript": "^5.0.2",
|
"typescript": "^5.8.3",
|
||||||
"vite": "^5.4.8",
|
"vite": "^6.3.5",
|
||||||
"vite-plugin-svgr": "^4.2.0"
|
"vite-plugin-svgr": "^4.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "rqbit-desktop"
|
name = "rqbit-desktop"
|
||||||
version = "8.0.0"
|
version = "8.1.0"
|
||||||
description = "rqbit torrent client"
|
description = "rqbit torrent client"
|
||||||
authors = ["you"]
|
authors = ["you"]
|
||||||
license = ""
|
license = ""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue