From 0f6b61f106f69e181c190646d9ad2c27fc5e0d8a Mon Sep 17 00:00:00 2001 From: M Alghazwi Date: Mon, 27 Oct 2025 11:01:05 +0300 Subject: [PATCH] init --- .gitignore | 7 +++++++ Cargo.toml | 6 ++++++ README.md | 12 ++++++++++++ src/lib.rs | 14 ++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 README.md create mode 100644 src/lib.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c72ed21 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +tmp +/target +Cargo.lock +/crates/*/target/ +/crates/*/Cargo.lock +.idea \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..edbcc53 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "tor-experiments" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/README.md b/README.md new file mode 100644 index 0000000..6c08026 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# Tor Experimentation + +In this repository, we experiment with Tor. With these experiments we try to: +- First, validate our understanding of the Tor protocol since sometimes what is in code is not in the specs and variations of implementation can exist. +- Set up a small test case to see the feasibility of distributing and serving data using the Tor client and onion services. We can reuse this test case for evaluating other protocols e.g. Tribler or Mixnets. +- Benchmark the Tor client. We can benchmark each component separately or run the test case and report the findings. +- Understand the limitations that this Tor client has and can we extend the implementation to avoid them? If not, then document these limitations to assess later if we are willing to accept them or go for another protocol. +- Finally, assess if the Tor implementation is suitable for inclusion in the new design. + + +**The Tor client codebase:** +The stable Tor client codebase is [written in C](https://gitlab.torproject.org/tpo/core/tor), however, there is a [re-implementation in Rust](https://gitlab.torproject.org/tpo/core/arti/-/tree/main?ref_type=heads) which claims to be (1) faster, (2) modular. We will try to experiment with both, starting with the rust implementation. \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +}