49 Commits
4.2.0 ... 4.3.0

Author SHA1 Message Date
egor-white
046afedd65 update actions 2025-06-14 15:20:40 +03:00
egor-white
d2dcdebe5b update workflow 2025-06-14 15:03:30 +03:00
egor-white
2f9658f7c0 refactoring 2025-06-14 13:53:10 +03:00
egor-white
f452f250ed refactoring 2025-06-14 13:50:13 +03:00
egor-white
063db1c312 refactoring 2025-06-14 13:47:26 +03:00
egor-white
e06921d4e2 refactoring 2025-06-14 13:47:20 +03:00
egor-white
d44922fa5c refactoring 2025-06-14 13:42:11 +03:00
egor-white
54371df71d refactoring 2025-06-14 13:38:54 +03:00
egor-white
f18842fd05 Update workflow.yml 2025-06-14 13:37:00 +03:00
egor-white
f7291945b3 Update workflow.yml 2025-06-14 13:24:37 +03:00
egor-white
218d5a835d Update workflow.yml 2025-06-14 13:23:42 +03:00
egor-white
b08109d91a refactoring 2025-06-14 13:05:46 +03:00
egor-white
7279be91c3 Update workflow.yml 2025-06-14 13:01:34 +03:00
egor-white
f757c20d63 Update workflow.yml 2025-06-14 12:57:23 +03:00
egor-white
1312bd04d6 Update workflow.yml 2025-06-14 12:55:38 +03:00
egor-white
93f1975629 refactoring 2025-06-14 12:51:53 +03:00
egor-white
0558b4b619 restructuring 2025-06-14 12:49:46 +03:00
egor-white
8b137cd210 Update workflow.yml 2025-06-14 12:47:53 +03:00
egor-white
84b2817842 Update workflow.yml 2025-06-14 12:43:59 +03:00
egor-white
79f9c8ab43 Update workflow.yml 2025-06-14 12:43:00 +03:00
egor-white
1116899c74 Update workflow.yml 2025-06-14 12:41:05 +03:00
egor-white
895412e6dd add files 2025-06-14 12:39:42 +03:00
egor-white
152002bb34 Update workflow.yml 2025-06-14 12:38:54 +03:00
egor-white
ed0197ce43 Update workflow.yml 2025-06-14 12:32:03 +03:00
egor-white
9a416e7ba5 Update workflow.yml 2025-06-14 12:31:53 +03:00
egor-white
98f96103bd Update workflow.yml 2025-06-14 12:29:54 +03:00
egor-white
755a5c3862 Update workflow.yml 2025-06-14 12:28:28 +03:00
egor-white
27e57c0b8f Update workflow.yml 2025-06-14 12:25:19 +03:00
egor-white
66f36d7c56 Update workflow.yml 2025-06-14 12:24:39 +03:00
egor-white
5f18c82a93 Update workflow.yml 2025-06-14 12:24:08 +03:00
egor-white
b696e93d19 Update workflow.yml 2025-06-14 12:17:42 +03:00
egor-white
4451d78913 move files 2025-06-14 12:15:56 +03:00
egor-white
0d8148d781 Update workflow.yml 2025-06-14 12:14:01 +03:00
egor-white
1f3fd3b2f6 Update workflow.yml 2025-06-14 12:08:48 +03:00
egor-white
1d59e6ae9a inital 2025-06-14 11:08:41 +03:00
egor-white
aed27e80d0 Update workflow.yml 2025-06-14 10:36:54 +03:00
egor-white
ab4f590358 Update workflow.yml 2025-06-14 10:05:56 +03:00
egor-white
7b80a5881b Update workflow.yml 2025-06-14 09:59:14 +03:00
egor-white
7b87215460 Update workflow.yml 2025-06-14 09:57:11 +03:00
egor-white
bd41635291 Update workflow.yml 2025-06-14 09:50:04 +03:00
CherretGit
8931550f83 Update workflow.yml 2025-06-14 13:33:00 +07:00
CherretGit
a138572257 Update workflow.yml 2025-06-14 13:30:21 +07:00
CherretGit
f27049ec55 Update and rename blank.yml to workflow.yml 2025-06-14 13:27:13 +07:00
CherretGit
e6be2ea05e Create workflow.yml 2025-06-14 13:15:21 +07:00
egor-white
426269a66a Update changelog.md 2025-06-13 20:22:32 +03:00
egor-white
20c01d55f8 Update update_tv.json 2025-06-13 20:22:05 +03:00
egor-white
8244d750a8 Update update_extended.json 2025-06-13 20:21:50 +03:00
egor-white
beb1be3b13 Update update.json 2025-06-13 20:21:30 +03:00
egor-white
d9fe9a25b4 Update update.json 2025-06-13 20:21:22 +03:00
11 changed files with 425 additions and 10 deletions

180
.github/workflows/workflow.yml vendored Normal file
View File

@@ -0,0 +1,180 @@
name: Build module
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag for the release (x.x.x)'
required: true
type: string
version:
description: 'Module version (x.x)'
required: true
type: string
version_code:
description: 'Module version code (xx)'
required: true
type: string
release_name:
description: 'Release Name'
required: true
type: string
release_changes:
description: 'Release Changes'
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Make build dirs
run: mkdir -p zaprett/system/bin zaprett-extended/system/bin zaprett-tv/system/bin zaprett/system/etc/zaprett/lists zapret-latest out lists zapret-extended/system/etc/zaprett/lists zapret-tv/system/etc/zaprett/lists
- name: Download latest zapret binaries
run: |
LATEST_RELEASE=$(curl -s https://api.github.com/repos/bol-van/zapret/releases/latest)
DOWNLOAD_URL=$(echo "$LATEST_RELEASE" | grep -o 'browser_download_url.*zapret-v.*\.zip"' | cut -d'"' -f3)
wget $DOWNLOAD_URL -O zapret-latest.zip
- name: Unzip zapret binaries
run: |
unzip -o zapret-latest.zip
ZAPRET_DIR=$(find . -maxdepth 1 -type d -name 'zapret-v*' | head -n 1)
if [ "$(ls -A "$ZAPRET_DIR")" ]; then
mv "$ZAPRET_DIR"/* zapret-latest/
else
echo "Warning: $ZAPRET_DIR is empty"
fi
rm -rf "${ZAPRET_DIR}"
rm zapret-latest.zip
- name: Copy files to dirs
run: |
#copy nfqws and zaprett
cp zapret-latest/binaries/android-arm/nfqws zaprett/system/bin/nfqws_arm32
cp zapret-latest/binaries/android-arm64/nfqws zaprett/system/bin/nfqws_arm64
cp zapret-latest/binaries/android-x86/nfqws zaprett/system/bin/nfqws_x86
cp zapret-latest/binaries/android-x86_64/nfqws zaprett/system/bin/nfqws_x86_64
cp zapret-latest/binaries/linux-mips/nfqws zaprett/system/bin/nfqws_mips
cp zapret-latest/binaries/linux-mipsel/nfqws zaprett/system/bin/nfqws_mipsel
#cp src/bin/zaprett zaprett/system/bin/
cp -r src/* zaprett/
#copy all files to another distributions
cp -r zaprett/* zaprett-extended/
cp -r zaprett/* zaprett-tv/
- name: Download and copy actual lists
run: |
wget https://raw.githubusercontent.com/CherretGit/zaprett-hosts-repo/refs/heads/main/lists/list-youtube.txt -O lists/list-youtube.txt
wget https://raw.githubusercontent.com/CherretGit/zaprett-hosts-repo/refs/heads/main/lists/list-discord.txt -O lists/list-discord.txt
wget https://raw.githubusercontent.com/CherretGit/zaprett-hosts-repo/refs/heads/main/lists/list-extended.txt -O lists/list-extended.txt
cp lists/list-youtube.txt zaprett/system/etc/zaprett/lists/
cp lists/list-youtube.txt zaprett-extended/system/etc/zaprett/lists/
cp lists/list-youtube.txt zaprett-tv/system/etc/zaprett/lists/
cp lists/list-discord.txt zaprett/system/etc/zaprett/lists/
cp lists/list-discord.txt zaprett-extended/system/etc/zaprett/lists/
cp lists/list-extended.txt zaprett-extended/system/etc/zaprett/lists/
- name: Create module.prop
run: |
cat > zaprett/module.prop <<EOF
id=zaprett
name=zaprett
version=${{ inputs.version }}
versionCode=${{ inputs.version_code }}
author=egor-white, Huananzhi X99, Cherret
description=Ускорение CDN серверов Google. ТГК: https://t.me/zaprett_module
updateJson=https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/update.json
EOF
cat > zaprett-extended/module.prop <<EOF
id=zaprett
name=zaprett-extended
version=${{ inputs.version }}
versionCode=${{ inputs.version_code }}
author=egor-white, Huananzhi X99, Cherret
description=Ускорение CDN серверов Google. ТГК: https://t.me/zaprett_module
updateJson=https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/update-extended.json
EOF
cat > zaprett-tv/module.prop <<EOF
id=zaprett
name=zaprett-tv
version=${{ inputs.version }}
versionCode=${{ inputs.version_code }}
author=egor-white, Huananzhi X99, Cherret
description=Ускорение CDN серверов Google. ТГК: https://t.me/zaprett_module
updateJson=https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/update-tv.json
EOF
- name: Tree files
run: |
tree zaprett/ zaprett-extended/ zaprett-tv/
- name: Create archives
run: |
zip zaprett.zip zaprett/* -r
zip zaprett-extended.zip zaprett-extended/* -r
zip zaprett-tv.zip zaprett-tv/* -r
mv zaprett.zip out/
mv zaprett-extended.zip out/
mv zaprett-tv.zip out/
- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag }}
name: ${{ inputs.release_name }}
body: ${{ inputs.release_changes }}
files: out/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update changelog
run: |
echo ${{ inputs.release_changes}} > changelog.md
- name: Update update.json
run: |
cat > update.json <<EOF
{
"version": "${{ inputs.version }}",
"versionCode": ${{ inputs.versionCode }},
"zipUrl": "https://github.com/${{ github.repository }}/releases/download/${{ inputs.release_tag }}/zaprett.zip",
"changelog": "https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/main/changelog.md"
}
EOF
cat > update_extended.json <<EOF
{
"version": "${{ inputs.version }}",
"versionCode": ${{ inputs.versionCode }},
"zipUrl": "https://github.com/${{ github.repository }}/releases/download/${{ inputs.release_tag }}/zaprett-extended.zip",
"changelog": "https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/main/changelog.md"
}
EOF
cat > update_tv.json <<EOF
{
"version": "${{ inputs.version }}",
"versionCode": ${{ inputs.versionCode }},
"zipUrl": "https://github.com/${{ github.repository }}/releases/download/${{ inputs.release_tag }}/zaprett-tv.zip",
"changelog": "https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/main/changelog.md"
}
EOF
- name: Настроить git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Закоммитить изменения
run: |
git add update.json update_extended.json update_tv.json changelog.md
git commit -m "update update.json and changelog" || echo "Нет изменений для коммита"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1 +1 @@
Исправление нерабочего хотспота (точки доступа)
Исправление ошибок необъявленной функции clear_iptables_rules

61
src/customize.sh Normal file
View File

@@ -0,0 +1,61 @@
ui_print " _ _ "
ui_print " | | | | "
ui_print " ______ _ _ __ _ __ ___| |_| |_ "
ui_print " |_ / _' | '_ \| '__/ _ \ __| __|"
ui_print " / / (_| | |_) | | | __/ |_| |_ "
ui_print " /___\__,_| .__/|_| \\___|\__|\__|"
ui_print " | | "
ui_print " |_| "
ui_print "(!) To download app, use Telegram chat"
ui_print "Module by: egorwhite, Huananzhi X99, not_malware"
ui_print "App by: egorwhite"
ui_print "####################"
ui_print "Unpacking archive..."
unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2
ui_print "Creating zaprett directory..."
mkdir /sdcard/zaprett; mkdir /sdcard/zaprett/lists; mkdir /sdcard/zaprett/bin; mkdir /sdcard/zaprett/strategies; touch /sdcard/zaprett/config
ui_print "Filling configuration file..."
echo autorestart=true > /sdcard/zaprett/config; echo activelists=/storage/emulated/0/zaprett/lists/list-youtube.txt >> /sdcard/zaprett/config; echo zaprettdir=/sdcard/zaprett >> /sdcard/zaprett/config; echo strategy="" >> /sdcard/zaprett/config
ui_print "Copying lists and binaries to /sdcard/zaprett..."
cp -r $MODPATH/system/etc/zaprett/. /sdcard/zaprett/
ui_print "Copying files to /bin"
arch=$(uname -m)
case "$arch" in
"x86_64")
nfqws="nfqws_x86_64"
;;
"i386"|"i686")
nfqws="nfqws_x86"
;;
"armv7l"|"arm")
nfqws="nfqws_arm32"
;;
"aarch64"|"armv8l")
nfqws="nfqws_arm64"
;;
"mips")
nfqws="nfqws_mips"
;;
"mipsel")
nfqws="nfqws_mipsel"
;;
*)
ui_print "Unknown arch: $arch"
abort
;;
esac
cp $nfqws /bin/nfqws
ui_print "Setting permissions..."
chmod 777 /sdcard/zaprett; chmod 777 $MODPATH/service.sh
ui_print "Cleaning temp files..."
rm -rf $MODPATH/system/etc/zaprett
rm -rf $MODPATH/system/bin
ui_print "Installation done. Telegram chat: https://t.me/zaprett_module"

11
src/service.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/system/bin/sh
while [ -z "$(getprop sys.boot_completed)" ]; do sleep 2; done
sleep 1
source /storage/emulated/0/zaprett/config
if [ "$autorestart" = "true" ]; then
su -c "zaprett start"
while true; do
sleep 3600
su -c "zaprett restart"
done
fi

128
src/system/bin/zaprett Normal file
View File

@@ -0,0 +1,128 @@
#!/system/bin/sh
source /sdcard/zaprett/config
arch=$(uname -m)
clear_iptables_rules() {
iptables -t mangle -D POSTROUTING -j NFQUEUE --queue-num 200 --queue-bypass 2>/dev/null
iptables -t mangle -D PREROUTING -j NFQUEUE --queue-num 200 --queue-bypass 2>/dev/null
iptables -t filter -D FORWARD -j NFQUEUE --queue-num 200 --queue-bypass 2>/dev/null
}
case "$arch" in
"x86_64")
nfqws="nfqws_x86_64"
;;
"i386"|"i686")
nfqws="nfqws_x86"
;;
"armv7l"|"arm")
nfqws="nfqws_arm32"
;;
"aarch64"|"armv8l")
nfqws="nfqws_arm64"
;;
"mips")
nfqws="nfqws_mips"
;;
"mipsel")
nfqws="nfqws_mipsel"
;;
*)
echo "Unknown arch: $arch"
exit 1
;;
esac
if [ "$1" == "start" ]; then
rm -f /data/adb/modules/zaprett/tmp/*
echo "Starting zaprett...";
hostlist=""
for itm in $(echo "$activelists" | tr ',' ' ' | sort -u); do
if [ -f "$itm" ]; then
dst="/data/adb/modules/zaprett/tmp/$(basename "$itm")"
cp "$itm" "$dst"
case "$hostlist" in
*"--hostlist=$dst"*) ;;
*) hostlist="$hostlist --hostlist=$dst" ;;
esac
fi
done
config=""
if [[ -n "$strategy" && -f "$strategy" ]]; then
config="$(eval "echo \"$(<"$strategy")\"")"
fi
if [[ -z "$config" ]]; then
config="--filter-tcp=80 --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig,badsum $hostlist --new"
config="$config --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"
config="$config --filter-tcp=80,443 --dpi-desync=fake,disorder2 --dpi-desync-repeats=6 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig,badsum $hostlist --new"
config="$config --filter-udp=50000-50100 --dpi-desync=fake --dpi-desync-any-protocol --dpi-desync-fake-quic=0xC30000000108 --new"
config="$config --filter-udp=443 $hostlist --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic=${zaprettdir}/bin/quic_initial_www_google_com.bin --new"
config="$config --filter-udp=443 --dpi-desync=fake --dpi-desync-repeats=6 $hostlist"
fi
sysctl net.netfilter.nf_conntrack_tcp_be_liberal=1 > /dev/null
iptables -t mangle -I POSTROUTING -j NFQUEUE --queue-num 200 --queue-bypass
iptables -t mangle -I PREROUTING -j NFQUEUE --queue-num 200 --queue-bypass
iptables -t filter -A FORWARD -j NFQUEUE --queue-num 200 --queue-bypass
$nfqws --uid=0:0 --qnum=200 $config > /dev/null &
echo "zaprett service started!"; return 0;
fi
if [ "$1" == "stop" ]; then
clear_iptables_rules
kill $(pidof $nfqws);
rm -f /data/adb/modules/zaprett/tmp/*
echo "zaprett service stopped!"; return 0; fi;
if [ "$1" == "status" ]; then
pidof "$nfqws" > /dev/null && echo "zaprett is working" || echo "zaprett is stopped"
fi
if [ "$1" == "restart" ]; then
echo "Stopping zaprett..."
clear_iptables_rules
kill "$(pidof $nfqws)" 2>/dev/null
rm -f /data/adb/modules/zaprett/tmp/*
echo "Starting zaprett..."
hostlist=""
for itm in $(echo "$activelists" | tr ',' ' ' | sort -u); do
if [ -f "$itm" ]; then
dst="/data/adb/modules/zaprett/tmp/$(basename "$itm")"
cp "$itm" "$dst"
case "$hostlist" in
*"--hostlist=$dst"*) ;;
*) hostlist="$hostlist --hostlist=$dst" ;;
esac
fi
done
config=""
if [[ -n "$strategy" && -f "$strategy" ]]; then
config="$(eval "echo \"$(<"$strategy")\"")"
fi
if [[ -z "$config" ]]; then
config="--filter-tcp=80 --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig,badsum $hostlist --new"
config="$config --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"
config="$config --filter-tcp=80,443 --dpi-desync=fake,disorder2 --dpi-desync-repeats=6 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig,badsum $hostlist --new"
config="$config --filter-udp=50000-50100 --dpi-desync=fake --dpi-desync-any-protocol --dpi-desync-fake-quic=0xC30000000108 --new"
config="$config --filter-udp=443 $hostlist --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic=${zaprettdir}/bin/quic_initial_www_google_com.bin --new"
config="$config --filter-udp=443 --dpi-desync=fake --dpi-desync-repeats=6 $hostlist"
fi
sysctl net.netfilter.nf_conntrack_tcp_be_liberal=1 > /dev/null
iptables -t mangle -I POSTROUTING -j NFQUEUE --queue-num 200 --queue-bypass
iptables -t mangle -I PREROUTING -j NFQUEUE --queue-num 200 --queue-bypass
iptables -t filter -A FORWARD -j NFQUEUE --queue-num 200 --queue-bypass
$nfqws --uid=0:0 --qnum=200 $config > /dev/null &
echo "zaprett service restarted!"
fi
if [[ -z $1 ]]; then
echo "zaprett installed. Telegram: t.me/zaprett_module"
fi

35
src/system/etc/hosts Normal file
View File

@@ -0,0 +1,35 @@
127.0.0.1 localhost
::1 ip6-localhost
89.108.98.20 chatgpt.com
134.0.118.88 ab.chatgpt.com
89.108.98.20 auth.openai.com
89.108.98.20 auth0.openai.com
89.108.98.20 platform.openai.com
89.108.98.20 cdn.oaistatic.com
89.108.98.20 files.oaiusercontent.com
89.108.98.20 cdn.auth0.com
89.108.98.20 tcr9i.chat.openai.com
89.108.98.20 webrtc.chatgpt.com
89.108.98.20 android.chat.openai.com
89.108.98.20 gemini.google.com
89.108.98.20 aistudio.google.com
89.108.98.20 ai.google
89.108.98.20 assistant-s3-pa.googleapis.com
89.108.98.20 generativelanguage.googleapis.com
89.108.98.20 alkalimakersuite-pa.clients6.google.com
64.233.162.188 mtalk.google.com
89.108.98.20 copilot.microsoft.com
89.108.98.20 sydney.bing.com
89.108.98.20 edgeservices.bing.com
89.108.98.20 claude.ai
89.108.98.20 aitestkitchen.withgoogle.com
89.108.98.20 aisandbox-pa.googleapis.com
89.108.98.20 o.pki.goog
89.108.98.20 labs.google
89.108.98.20 notebooklm.google
89.108.98.20 notebooklm.google.com
89.108.98.20 www.notion.so
89.108.98.20 www.googleapis.com
89.108.98.20 proactivebackend-pa.googleapis.com
89.108.98.20 grok.com
89.108.98.20 assets.grok.com

View File

@@ -1,6 +1,6 @@
{
"version": "4.1",
"versionCode": 41,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.1.0/zaprett.zip",
"version": "4.2",
"versionCode": 42,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.2.0/zaprett.zip",
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
}

View File

@@ -1,6 +1,6 @@
{
"version": "4.1",
"versionCode": 41,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.1.0/zaprett-extended.zip",
"version": "4.2",
"versionCode": 42,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.2.0/zaprett-extended.zip",
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
}

View File

@@ -1,6 +1,6 @@
{
"version": "4.1",
"versionCode": 41,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.1.0/zaprett-tv.zip",
"version": "4.2",
"versionCode": 42,
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.2.0/zaprett-tv.zip",
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
}