From a00c5efdc8f2ee25db4d8dd08854f2c1a1629500 Mon Sep 17 00:00:00 2001 From: CherretGit Date: Sat, 14 Feb 2026 15:00:12 +0700 Subject: [PATCH] another paths on linux target --- rust/crates/zaprett/src/lib.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/rust/crates/zaprett/src/lib.rs b/rust/crates/zaprett/src/lib.rs index 90e1510..e915e58 100644 --- a/rust/crates/zaprett/src/lib.rs +++ b/rust/crates/zaprett/src/lib.rs @@ -18,15 +18,28 @@ use tokio::fs::File; use tokio::io::{copy, AsyncWriteExt}; use tokio::task::spawn_blocking; +#[cfg(target_os = "android")] pub static MODULE_PATH: LazyLock<&Path> = LazyLock::new(|| Path::new("/data/adb/modules/zaprett")); - +#[cfg(target_os = "android")] pub static ZAPRETT_DIR_PATH: LazyLock<&Path> = LazyLock::new(|| Path::new("/storage/emulated/0/zaprett")); - +#[cfg(target_os = "android")] pub static ZAPRETT_LIBS_PATH: LazyLock<&Path> = LazyLock::new(|| Path::new("/storage/emulated/0/zaprett/strategies/nfwqs2/libs")); +// Only for testing +#[cfg(target_os = "linux")] +pub static MODULE_PATH: LazyLock<&Path> = + LazyLock::new(|| Path::new("zaprett_module")); +#[cfg(target_os = "linux")] +pub static ZAPRETT_DIR_PATH: LazyLock<&Path> = + LazyLock::new(|| Path::new("zaprett")); +#[cfg(target_os = "linux")] +pub static ZAPRETT_LIBS_PATH: LazyLock<&Path> = + LazyLock::new(|| Path::new("zaprett/strategies/nfwqs2/libs")); + + pub static DEFAULT_STRATEGY_NFQWS: &str = " --filter-tcp=80 --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig,badsum $hostlist --new --filter-tcp=443 $hostlist --dpi-desync=fake,split2 --dpi-desync-repeats=6 --dpi-desync-fooling=md5sig,badsum --dpi-desync-fake-tls=${zaprettdir}/bin/tls_clienthello_www_google_com.bin --new