summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamilskyy <alive6863@gmail.com>2025-12-03 12:19:37 +0300
committerNamilskyy <alive6863@gmail.com>2025-12-03 12:19:37 +0300
commit1542713fef2e7a2241c74203873b822a17f6165e (patch)
treeb0e88d18bb2a952afbad1b83ee37a45b7dc83e6b
parent28f2822aa43096c4c6dfc675bfa20a3291730a87 (diff)
Starget rewritting i2p features of package manager and writing documentation
-rw-r--r--.gitignore2
-rw-r--r--Cargo.lock224
-rw-r--r--Cargo.toml1
-rw-r--r--README.md15
-rw-r--r--mypalette.pngbin0 -> 11171 bytes
-rw-r--r--src/net/emissary_i2p.rs60
-rw-r--r--src/net/mod.rs4
7 files changed, 306 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 88b3800..df16ab8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -81,3 +81,5 @@ dkms.conf
*.db
*.tar.gz
*.mesk
+# because not full-implemented
+doc/ \ No newline at end of file
diff --git a/Cargo.lock b/Cargo.lock
index bcfa62f..4622638 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -95,6 +95,15 @@ dependencies = [
]
[[package]]
+name = "arbitrary"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"
+dependencies = [
+ "derive_arbitrary",
+]
+
+[[package]]
name = "assert-json-diff"
version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -190,6 +199,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3"
[[package]]
+name = "bzip2"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c"
+dependencies = [
+ "libbz2-rs-sys",
+]
+
+[[package]]
name = "cbc"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -205,6 +223,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c481bdbf0ed3b892f6f806287d72acd515b352a4ec27a208489b8c1bc839633a"
dependencies = [
"find-msvc-tools",
+ "jobserver",
+ "libc",
"shlex",
]
@@ -324,6 +344,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
[[package]]
+name = "constant_time_eq"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"
+
+[[package]]
name = "core-foundation"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -349,6 +375,21 @@ dependencies = [
]
[[package]]
+name = "crc"
+version = "3.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d"
+dependencies = [
+ "crc-catalog",
+]
+
+[[package]]
+name = "crc-catalog"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
+
+[[package]]
name = "crc32fast"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -434,6 +475,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476"
[[package]]
+name = "deflate64"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26bf8fc351c5ed29b5c2f0cbbac1b209b74f60ecd62e675a998df72c49af5204"
+
+[[package]]
name = "der"
version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -444,6 +491,26 @@ dependencies = [
]
[[package]]
+name = "deranged"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
+dependencies = [
+ "powerfmt",
+]
+
+[[package]]
+name = "derive_arbitrary"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -692,6 +759,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb"
dependencies = [
"crc32fast",
+ "libz-rs-sys",
"miniz_oxide",
]
@@ -1235,6 +1303,16 @@ dependencies = [
]
[[package]]
+name = "jobserver"
+version = "0.1.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
+dependencies = [
+ "getrandom 0.3.4",
+ "libc",
+]
+
+[[package]]
name = "js-sys"
version = "0.3.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1251,6 +1329,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
+name = "libbz2-rs-sys"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7"
+
+[[package]]
name = "libc"
version = "0.2.177"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1268,6 +1352,15 @@ dependencies = [
]
[[package]]
+name = "libz-rs-sys"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "840db8cf39d9ec4dd794376f38acc40d0fc65eec2a8f484f7fd375b84602becd"
+dependencies = [
+ "zlib-rs",
+]
+
+[[package]]
name = "linux-raw-sys"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1295,6 +1388,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
[[package]]
+name = "lzma-rust2"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c60a23ffb90d527e23192f1246b14746e2f7f071cb84476dd879071696c18a4a"
+dependencies = [
+ "crc",
+ "sha2",
+]
+
+[[package]]
name = "memchr"
version = "2.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1323,6 +1426,7 @@ dependencies = [
"toml",
"url",
"yosemite",
+ "zip",
]
[[package]]
@@ -1421,6 +1525,12 @@ dependencies = [
]
[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
+[[package]]
name = "num-integer"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1536,6 +1646,16 @@ dependencies = [
]
[[package]]
+name = "pbkdf2"
+version = "0.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
+dependencies = [
+ "digest",
+ "hmac",
+]
+
+[[package]]
name = "percent-encoding"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1625,6 +1745,18 @@ dependencies = [
]
[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
+[[package]]
+name = "ppmd-rust"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d558c559f0450f16f2a27a1f017ef38468c1090c9ce63c8e51366232d53717b4"
+
+[[package]]
name = "ppv-lite86"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2265,6 +2397,25 @@ dependencies = [
]
[[package]]
+name = "time"
+version = "0.3.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d"
+dependencies = [
+ "deranged",
+ "num-conv",
+ "powerfmt",
+ "serde",
+ "time-core",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b"
+
+[[package]]
name = "tiny-keccak"
version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3052,3 +3203,76 @@ dependencies = [
"quote",
"syn",
]
+
+[[package]]
+name = "zip"
+version = "6.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b"
+dependencies = [
+ "aes",
+ "arbitrary",
+ "bzip2",
+ "constant_time_eq",
+ "crc32fast",
+ "deflate64",
+ "flate2",
+ "getrandom 0.3.4",
+ "hmac",
+ "indexmap",
+ "lzma-rust2",
+ "memchr",
+ "pbkdf2",
+ "ppmd-rust",
+ "sha1",
+ "time",
+ "zeroize",
+ "zopfli",
+ "zstd",
+]
+
+[[package]]
+name = "zlib-rs"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f06ae92f42f5e5c42443fd094f245eb656abf56dd7cce9b8b263236565e00f2"
+
+[[package]]
+name = "zopfli"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249"
+dependencies = [
+ "bumpalo",
+ "crc32fast",
+ "log",
+ "simd-adler32",
+]
+
+[[package]]
+name = "zstd"
+version = "0.13.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
+dependencies = [
+ "zstd-safe",
+]
+
+[[package]]
+name = "zstd-safe"
+version = "7.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
+dependencies = [
+ "zstd-sys",
+]
+
+[[package]]
+name = "zstd-sys"
+version = "2.0.16+zstd.1.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
+dependencies = [
+ "cc",
+ "pkg-config",
+]
diff --git a/Cargo.toml b/Cargo.toml
index 0422956..8faa8f4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,6 +25,7 @@ cc = "1.2.48"
url = "2.5.7"
indicatif = "0.18.3"
futures-util = "0.3.31"
+zip = "6.0.0"
[dev-dependencies]
env_logger = "0.11.8"
diff --git a/README.md b/README.md
index 1cf5bc9..2b70d04 100644
--- a/README.md
+++ b/README.md
@@ -82,3 +82,18 @@ _By the way, I will mention that the official examples of i2p-rs have a complete
<h1 id="support"> Support us </h1>
**This project cannot be implemented without some support. The most valuable thing you can do for us is to create a Pull Request or spread information about us in any circle. We are a team of enthusiasts who do not have all the means to do this initially. All big projects absolutely always start small.**
+
+# Development checklist
+
+- [x] - Basic functionality (http, installation/removal of packages.)
+ - Implemented (some functions related to deletion and some actions with packages have not been tested properly)
+- [ ] - i2p funtions
+ - WIP (As mentioned above, there are problems with the library part of the client i2p, everything that uses yosemite is likely to be rewritten because it is a SAMv3 library, SAM is not intended for downloading files)
+
+# Anouncements and plans
+
+- Initially, the distribution is inspired by the spirit of QubesOS and we plan to implement an **alternative to qubes HVM**.
+
+- **The I2PUtils**. For i2p, you can use standard utilities like WGET/CURL, etc., but for convenience and support of all standards, we plan to create alternatives tailored specifically for this network.
+
+- Additional documentation and eepsites for our utilities, well, where without it? \ No newline at end of file
diff --git a/mypalette.png b/mypalette.png
new file mode 100644
index 0000000..030abfe
--- /dev/null
+++ b/mypalette.png
Binary files differ
diff --git a/src/net/emissary_i2p.rs b/src/net/emissary_i2p.rs
new file mode 100644
index 0000000..b9e5967
--- /dev/null
+++ b/src/net/emissary_i2p.rs
@@ -0,0 +1,60 @@
+use emissary_core::{
+ I2cpConfig,
+ Ntcp2Config
+};
+
+
+use crate::pkgtoolkit::pkgtools::Package;
+use crate::Config;
+
+use indicatif::{ProgressBar, ProgressStyle};
+use std::{collections::HashMap, path::Path};
+use tokio::io::{AsyncReadExt, AsyncWriteExt, BufReader};
+
+pub struct I2PPackage {
+ pub config: Config,
+ pub i2p_config: emissary_core::Config,
+ pub index_packages: Option<HashMap<String, Package>>,
+}
+
+impl I2PPackage {
+ pub fn new(cfg: Config, i2p_cfg: emissary_core::Config) -> Self {
+ I2PPackage {
+ config: cfg,
+ i2p_config: i2p_cfg,
+ index_packages: None,
+ }
+ }
+
+ pub async fn fetch_index(&mut self) -> Result<(), Box<dyn std::error::Error>> {
+ let cfg = Config::parse()?;
+
+ let repo_url = &self.config.repo.repo_url;
+ let cache_dir = &self.config.paths.cache_dir;
+
+ let utl = url::Url::parse(repo_url).unwrap();
+ let host = utl.host_str().ok_or("No host in URL")?;
+
+ let request_path = utl.path();
+ let request_path = if request_path.ends_with(".tar.gz") {
+ request_path.to_string()
+ } else {
+ format!("{}/INDEX.tar.gz", request_path.trim_end_matches('/'))
+ };
+
+
+ let StorageBundle {
+ ntcp2_iv,
+ ntcp2_key,
+ profiles,
+ router_info,
+ routers,
+ signing_key,
+ static_key,
+ ssu2_intro_key,
+ ssu2_static_key,
+ } = storage.load().await;
+
+ Ok(())
+ }
+} \ No newline at end of file
diff --git a/src/net/mod.rs b/src/net/mod.rs
index 1a04189..20a050e 100644
--- a/src/net/mod.rs
+++ b/src/net/mod.rs
@@ -1,2 +1,6 @@
pub mod http_package;
pub mod i2p_package;
+// unimplemented
+// now i rewritting with emissary, SAMv3 not for download files btw
+// but yosemite one of docemented lib for i2p (SAMv3 only), it-s better i try to use it
+// pub mod emissary_i2p; \ No newline at end of file