Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# Working docs
resume.md
5 changes: 3 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ rbitt (Tauri app)
├── oxidebt-tracker # HTTP and UDP tracker clients
├── oxidebt-dht # Kademlia DHT implementation
├── oxidebt-disk # Disk I/O, file storage, piece verification
│ └── oxidebt-cache # Block/piece caching layer
├── oxidebt-net # PEX, LSD, UPnP, bandwidth limiting
└── oxidebt-constants # Shared protocol constants and tuning parameters
```
Expand Down Expand Up @@ -73,12 +74,12 @@ Key background tasks started by `TorrentEngine::start_background_tasks()`:

### Frontend (`src/`)

Minimal React + TypeScript frontend using Tauri's IPC for communication with the Rust backend. Tauri commands are defined in `src-tauri/src/lib.rs`.
React + TypeScript frontend using Tauri's IPC for communication with the Rust backend. Tauri commands are defined in `src-tauri/src/lib.rs`.

## Key Constants

Protocol tuning parameters are centralized in `oxidebt-constants/src/lib.rs`. Important ones:
- `MAX_PEERS_PER_TORRENT`: 100
- `MAX_PEERS_PER_TORRENT`: 200
- `MAX_REQUESTS_PER_PEER`: 500 (request pipelining)
- `BLOCK_SIZE`: 16384 (16KB)
- `MAX_UNCHOKED_PEERS`: 4
141 changes: 141 additions & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ hex = "0.4"
url = "2.5"
rand = "0.8"
tracing = "0.1"
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls",
] }
serde = { version = "1.0", features = ["derive"] }
parking_lot = "0.12"
futures = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/crates/oxidebt-dht/src/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl RoutingTable {
}
}

nodes.sort_by(|a, b| a.1.cmp(&b.1));
nodes.sort_by_key(|a| a.1);
nodes.truncate(count);
nodes.into_iter().map(|(n, _)| n).collect()
}
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2460,7 +2460,7 @@ impl TorrentEngine {
})
.collect();

interested_peers.sort_by(|a, b| b.1.cmp(&a.1));
interested_peers.sort_by_key(|a| std::cmp::Reverse(a.1));

let mut new_unchoked = HashSet::new();
for (addr, _) in interested_peers.iter().take(MAX_UNCHOKED_PEERS - 1) {
Expand Down
Loading