19 Commits

Author SHA1 Message Date
egor-white
32b1bc9de9 Merge branch 'main' into hybrid 2026-01-19 16:27:18 +03:00
egor-white
0dabe2f4e7 migrate tv version to default package 2026-01-19 16:15:10 +03:00
egor-white
634f9245b2 Revert "migrate tv version to default package"
This reverts commit 4526c6d313.
2026-01-19 16:13:03 +03:00
egor-white
4526c6d313 migrate tv version to default package 2026-01-19 16:08:59 +03:00
egor-white
cceed3a1d7 add luajit 2026-01-19 16:04:01 +03:00
egor-white
60f112656a add zapret2 as submodule, configure zapret2 crate compiling 2026-01-19 16:01:51 +03:00
CherretGit
389e350746 Update update's.json and changelog 2026-01-18 18:46:36 +00:00
CherretGit
5d714e3591 Update workflow_without_post.yml 2026-01-19 01:41:25 +07:00
CherretGit
8e399bc791 Update workflow to include new directories for lists 2026-01-19 01:41:22 +07:00
CherretGit
c38dff2ada Fix paths for copying lists in workflow 2026-01-19 01:33:05 +07:00
CherretGit
d6ec35d1e2 Update workflow.yml 2026-01-19 01:33:01 +07:00
CherretGit
f873420b6a fix workflow again 2026-01-19 01:26:06 +07:00
CherretGit
e04c349383 fix workflow 2026-01-19 01:15:48 +07:00
CherretGit
b3828babe7 fix workflow 2026-01-19 01:09:10 +07:00
CherretGit
dabdd9adb1 add -q to unzip 2026-01-19 01:01:35 +07:00
CherretGit
4230027933 remove system from src and add .bin 2026-01-19 00:54:49 +07:00
CherretGit
48672aa0c3 temporarily remove version command 2026-01-18 23:38:59 +07:00
CherretGit
91a2990eb6 update zapret 2025-12-21 20:57:24 +07:00
CherretGit
b12b6e1bb2 Update update's.json and changelog 2025-12-08 16:41:32 +00:00
21 changed files with 152 additions and 37 deletions

View File

@@ -42,7 +42,7 @@ jobs:
- name: Setup Git submodules
run: git submodule update --init --recursive
- name: Install dependencies
run: sudo apt install build-essential pkg-config just unzip
@@ -50,7 +50,16 @@ jobs:
run: just -f rust/justfile build-android --release
- name: Make build dirs
run: mkdir -p zaprett/system/bin zaprett-hosts/system/bin zaprett/system/etc/zaprett/lists out lists zapret-hosts/system/etc/zaprett/lists
run: |
mkdir -p zaprett/system/bin
mkdir -p zaprett/zaprett/bin
mkdir -p zaprett/zaprett/lists/include
mkdir -p zaprett-hosts/system/bin
mkdir -p zaprett-hosts/zaprett/bin
mkdir -p zaprett-hosts/zaprett/lists/include
mkdir -p out lists
- name: Copy files to dirs
run: |
@@ -60,17 +69,15 @@ jobs:
cp -a src/* zaprett/
cp -r zaprett/* zaprett-hosts/
- name: Download and copy actual lists
run: |
wget https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/lists/include/list-youtube.txt -O lists/list-youtube.txt
wget https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/lists/include/list-discord.txt -O lists/list-discord.txt
cp lists/list-youtube.txt zaprett/system/etc/zaprett/lists/
cp lists/list-youtube.txt zaprett-hosts/system/etc/zaprett/lists/
cp lists/* zaprett/zaprett/lists/include
cp lists/list-discord.txt zaprett/system/etc/zaprett/lists/
cp lists/list-discord.txt zaprett-hosts/system/etc/zaprett/lists/
cp lists/* zaprett-hosts/zaprett/lists/include
cp hosts/hosts zaprett-hosts/system/etc
@@ -103,7 +110,7 @@ jobs:
mv zaprett.zip out/
mv zaprett-hosts.zip out/
- name: Create release
if: ${{ inputs.create_release == 'true' }}
uses: softprops/action-gh-release@v2

View File

@@ -42,7 +42,7 @@ jobs:
- name: Setup Git submodules
run: git submodule update --init --recursive
- name: Install dependencies
run: sudo apt install build-essential pkg-config just unzip
@@ -50,7 +50,16 @@ jobs:
run: just -f rust/justfile build-android --release
- name: Make build dirs
run: mkdir -p zaprett/system/bin zaprett-hosts/system/bin zaprett/system/etc/zaprett/lists out lists zapret-hosts/system/etc/zaprett/lists
run: |
mkdir -p zaprett/system/bin
mkdir -p zaprett/zaprett/bin
mkdir -p zaprett/zaprett/lists/include
mkdir -p zaprett-hosts/system/bin
mkdir -p zaprett-hosts/zaprett/bin
mkdir -p zaprett-hosts/zaprett/lists/include
mkdir -p out lists
- name: Copy files to dirs
run: |
@@ -61,20 +70,19 @@ jobs:
cp -a src/* zaprett/
cp -r zaprett/* zaprett-hosts/
- name: Download and copy actual lists
run: |
wget https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/lists/include/list-youtube.txt -O lists/list-youtube.txt
wget https://raw.githubusercontent.com/CherretGit/zaprett-repo/refs/heads/main/lists/include/list-discord.txt -O lists/list-discord.txt
cp lists/list-youtube.txt zaprett/system/etc/zaprett/lists/
cp lists/list-youtube.txt zaprett-hosts/system/etc/zaprett/lists/
cp lists/* zaprett/zaprett/lists/include/
cp lists/list-discord.txt zaprett/system/etc/zaprett/lists/
cp lists/list-discord.txt zaprett-hosts/system/etc/zaprett/lists/
cp lists/* zaprett-hosts/zaprett/lists/include/
cp hosts/hosts zaprett-hosts/system/etc
- name: Create module.prop
run: |
cat > zaprett/module.prop <<EOF
@@ -104,7 +112,7 @@ jobs:
mv zaprett.zip out/
mv zaprett-hosts.zip out/
- name: Create release
if: ${{ inputs.create_release == 'true' }}
uses: softprops/action-gh-release@v2
@@ -146,11 +154,10 @@ jobs:
"changelog": "https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/main/changelog.md"
}
EOF
- name: Commit jsons and changelog
if: ${{ inputs.create_release == 'true' }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update update's.json and changelog"
file_pattern: "update.json update_hosts.json changelog.md"

3
.gitmodules vendored
View File

@@ -1,3 +1,6 @@
[submodule "rust/crates/libnfqws/zapret"]
path = rust/crates/libnfqws/zapret
url = https://github.com/bol-van/zapret.git
[submodule "rust/crates/libnfqws2/zapret2"]
path = rust/crates/libnfqws2/zapret2
url = https://github.com/bol-van/zapret2

View File

@@ -1,3 +1 @@
Исправлен автозапуск
Добавлена возможность прямого обращения к zapret
Обновлен hosts-файл
Список изменений: Обновление zapret Добавление файлов для стратегий alt 10 и alt 11

20
rust/Cargo.lock generated
View File

@@ -385,6 +385,16 @@ dependencies = [
"once_cell",
]
[[package]]
name = "libnfqws2"
version = "0.0.1"
dependencies = [
"bindgen",
"cc",
"glob",
"once_cell",
]
[[package]]
name = "lock_api"
version = "0.4.14"
@@ -400,6 +410,15 @@ version = "0.4.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
[[package]]
name = "luajit"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "216ed8eb8f7edfb5bfc1163cce9747517ed2ea7656a884640791a2be86b86e54"
dependencies = [
"libc",
]
[[package]]
name = "memchr"
version = "2.7.6"
@@ -1114,6 +1133,7 @@ dependencies = [
"libc",
"libnfqws",
"log",
"luajit",
"nix",
"pretty_env_logger",
"regex",

View File

@@ -0,0 +1,11 @@
[package]
name = "libnfqws2"
version.workspace = true
edition.workspace = true
repository.workspace = true
[build-dependencies]
cc = "1.2.43"
once_cell = "1.21.3"
glob = "0.3.3"
bindgen = "0.72.1"

View File

@@ -0,0 +1,68 @@
use once_cell::sync::Lazy;
use std::env;
use std::path::{Path, PathBuf};
macro_rules! rel_manifest_path {
($name:ident, $path:expr) => {
static $name: Lazy<PathBuf> = Lazy::new(|| {
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
Path::new(&manifest_dir).join($path)
});
};
}
rel_manifest_path!(NFQ, "zapret2/nfq2");
rel_manifest_path!(NFQ_CRYPTO, "zapret2/nfq2/crypto");
fn main() {
cc::Build::new()
.files(
glob::glob(&format!("{}/*.c", NFQ.display()))
.unwrap()
.filter_map(Result::ok),
)
.files(
glob::glob(&format!("{}/*.c", NFQ_CRYPTO.display()))
.unwrap()
.filter_map(Result::ok),
)
.include(&*NFQ)
.include(&*NFQ_CRYPTO)
.flag("-w")
.define("main", "nfqws2_main")
.compile("libnfqws2.a");
println!("cargo:rustc-link-lib=z");
println!("cargo:rustc-link-lib=netfilter_queue");
println!("cargo:rustc-link-lib=nfnetlink");
println!("cargo:rustc-link-lib=mnl");
let _ = env::var("NETFILTER_LIBS")
.map(|libs| println!("cargo:rustc-link-search=native={libs}/lib"));
println!("cargo:rustc-link-lib=static=nfqws2");
println!("cargo:rerun-if-changed={}", NFQ.display());
println!("cargo:rerun-if-changed={}", NFQ_CRYPTO.display());
println!("cargo:rerun-if-changed=build.rs");
let mut builder = bindgen::Builder::default();
for header in glob::glob(&format!("{}/*.h", NFQ.display()))
.unwrap()
.filter_map(Result::ok)
{
builder = builder.header(header.to_string_lossy());
}
builder = builder.clang_arg("-Dmain=nfqws2_main");
let bindings = builder
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
.generate()
.expect("Unable to generate libnfqws2");
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
bindings
.write_to_file(out_path.join("libnfqws2.rs"))
.expect("Couldn't write libnfqws2");
}

View File

@@ -0,0 +1,2 @@
#![allow(warnings)]
include!(concat!(env!("OUT_DIR"), "/libnfqws2.rs"));

View File

@@ -21,3 +21,4 @@ log = { workspace = true }
nix = { workspace = true, features = ["user"] }
getset = { workspace = true }
sysinfo = { workspace = true }
luajit = "0.1.1"

View File

@@ -5,7 +5,7 @@ use commands::Command;
use getset::Getters;
#[derive(Parser, Getters)]
#[command(version)]
// #[command(version)]
#[getset(get = "pub")]
pub struct CliApp {
#[command(subcommand)]

View File

@@ -20,7 +20,7 @@ _download_android_ndk:
curl -L -C - -o "$TMPFILE" "https://dl.google.com/android/repository/android-ndk-{{ANDROID_NDK_VERSION}}.zip"
unzip "$TMPFILE" -d "$TMPDIR"
unzip -q "$TMPFILE" -d "$TMPDIR"
inner_folder=$(find "$TMPDIR" -mindepth 1 -maxdepth 1 -type d | head -n 1)
mv -T "$inner_folder" "$NDK_HOME"

View File

@@ -15,7 +15,7 @@ ui_print "Creating zaprett directory..."
mkdir /sdcard/zaprett; mkdir /sdcard/zaprett/lists; mkdir /sdcard/zaprett/bin; mkdir /sdcard/zaprett/strategies;
ui_print "Copying lists and binaries to /sdcard/zaprett..."
cp -r $MODPATH/system/etc/zaprett/. /sdcard/zaprett/
cp -r $MODPATH/zaprett/. /sdcard/zaprett/
ui_print "Copying files to /bin"
arch=$(uname -m)
@@ -38,7 +38,4 @@ mv $MODPATH/system/bin/$zaprett_bin $MODPATH/system/bin/zaprett
rm $MODPATH/system/bin/zaprett-*
mkdir $MODPATH/tmp
ui_print "Cleaning temp files..."
rm -rf $MODPATH/system/etc/zaprett
ui_print "Installation done. Join us in Telegram: https://t.me/zaprett_module"

Binary file not shown.

Binary file not shown.

View File

@@ -1,6 +1,6 @@
{
"version": "6.2",
"versionCode": 62,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/6.2.0/zaprett-hosts.zip",
"version": "6.4",
"versionCode": 64,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/6.4.0/zaprett-hosts.zip",
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
}

View File

@@ -1,6 +1,6 @@
{
"version": "6.0",
"versionCode": 60,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/6.0.0/zaprett.zip",
"version": "6.4",
"versionCode": 100,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/6.4.0/zaprett.zip",
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
}

View File

@@ -1,6 +1,6 @@
{
"version": "6.2",
"versionCode": 62,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/6.2.0/zaprett.zip",
"version": "6.4",
"versionCode": 64,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/6.4.0/zaprett.zip",
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
}