mirror of
https://github.com/egor-white/zaprett.git
synced 2025-12-10 13:30:23 +05:00
Compare commits
144 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63c45d8a2a | ||
|
|
26325b79f1 | ||
|
|
2cee0712c3 | ||
|
|
79b63ec5e9 | ||
|
|
c230f4876c | ||
|
|
531c403ce2 | ||
|
|
70d3b3e28d | ||
|
|
cf507f059b | ||
|
|
bf81100acb | ||
|
|
5ac9234ca2 | ||
|
|
156cedb080 | ||
|
|
f59ec45e9f | ||
|
|
45b25dd1ee | ||
|
|
e967dc12d7 | ||
|
|
6e1b3f12d9 | ||
|
|
6f395b1df9 | ||
|
|
638c45b243 | ||
|
|
78af1977fd | ||
|
|
97f495a56a | ||
|
|
63b279114e | ||
|
|
f1d3ec0b5e | ||
|
|
ffb296744b | ||
|
|
7966bbaebf | ||
|
|
f162004b56 | ||
|
|
71a5df5356 | ||
|
|
bcf0aa2b50 | ||
|
|
8248d43f67 | ||
|
|
f3d26d5677 | ||
|
|
2ef9ac91be | ||
|
|
b16b9e4d7a | ||
|
|
aa3dd6cce5 | ||
|
|
092cc65bbe | ||
|
|
6679a9c71a | ||
|
|
ac815f62a0 | ||
|
|
a71baaa98b | ||
|
|
db69426185 | ||
|
|
6f7eb991a7 | ||
|
|
65ff8f0661 | ||
|
|
c843494c8a | ||
|
|
1acb992344 | ||
|
|
ca10ed0a7a | ||
|
|
c4d1724ace | ||
|
|
89a457da84 | ||
|
|
8069ae43fc | ||
|
|
02d3d2fb1c | ||
|
|
0ad93a2c94 | ||
|
|
a1a3db7a94 | ||
|
|
80bea7d472 | ||
|
|
27192c15a3 | ||
|
|
2ccf9e909b | ||
|
|
428392033d | ||
|
|
baf209317d | ||
|
|
114dc16ffd | ||
|
|
57b0b820f7 | ||
|
|
c3117c24e1 | ||
|
|
3ba0b39464 | ||
|
|
08e6f1a588 | ||
|
|
cb4d956929 | ||
|
|
94ae3dfa5c | ||
|
|
044bc08601 | ||
|
|
a9b6beb58b | ||
|
|
df43ad221a | ||
|
|
e547dcb01f | ||
|
|
66e1243c87 | ||
|
|
2dabb61c27 | ||
|
|
43e8da1a6f | ||
|
|
7a31d2d71c | ||
|
|
ba03ad017f | ||
|
|
230241eccc | ||
|
|
b9e2915c11 | ||
|
|
a9433ab7eb | ||
|
|
c98eef39a5 | ||
|
|
b102a95b06 | ||
|
|
1992f0a0d7 | ||
|
|
af95cc36b2 | ||
|
|
703137c3dd | ||
|
|
7788a61a2b | ||
|
|
e2231dafba | ||
|
|
ac9b39c95c | ||
|
|
93ad791dc6 | ||
|
|
7ef462f6e9 | ||
|
|
9d968fcea5 | ||
|
|
046afedd65 | ||
|
|
d2dcdebe5b | ||
|
|
2f9658f7c0 | ||
|
|
f452f250ed | ||
|
|
063db1c312 | ||
|
|
e06921d4e2 | ||
|
|
d44922fa5c | ||
|
|
54371df71d | ||
|
|
f18842fd05 | ||
|
|
f7291945b3 | ||
|
|
218d5a835d | ||
|
|
b08109d91a | ||
|
|
7279be91c3 | ||
|
|
f757c20d63 | ||
|
|
1312bd04d6 | ||
|
|
93f1975629 | ||
|
|
0558b4b619 | ||
|
|
8b137cd210 | ||
|
|
84b2817842 | ||
|
|
79f9c8ab43 | ||
|
|
1116899c74 | ||
|
|
895412e6dd | ||
|
|
152002bb34 | ||
|
|
ed0197ce43 | ||
|
|
9a416e7ba5 | ||
|
|
98f96103bd | ||
|
|
755a5c3862 | ||
|
|
27e57c0b8f | ||
|
|
66f36d7c56 | ||
|
|
5f18c82a93 | ||
|
|
b696e93d19 | ||
|
|
4451d78913 | ||
|
|
0d8148d781 | ||
|
|
1f3fd3b2f6 | ||
|
|
1d59e6ae9a | ||
|
|
aed27e80d0 | ||
|
|
ab4f590358 | ||
|
|
7b80a5881b | ||
|
|
7b87215460 | ||
|
|
bd41635291 | ||
|
|
8931550f83 | ||
|
|
a138572257 | ||
|
|
f27049ec55 | ||
|
|
e6be2ea05e | ||
|
|
426269a66a | ||
|
|
20c01d55f8 | ||
|
|
8244d750a8 | ||
|
|
beb1be3b13 | ||
|
|
d9fe9a25b4 | ||
|
|
f3fd0477cd | ||
|
|
f61679a20e | ||
|
|
1068fa8d98 | ||
|
|
6535922576 | ||
|
|
3fc4e388bc | ||
|
|
64f3ec397c | ||
|
|
ea1b82a483 | ||
|
|
24731284f4 | ||
|
|
52a2287c00 | ||
|
|
fa8b798943 | ||
|
|
f3c918de80 | ||
|
|
e55df9bf31 | ||
|
|
885aa16736 |
188
.github/workflows/workflow.yml
vendored
Normal file
188
.github/workflows/workflow.yml
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
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-hosts/system/bin zaprett-tv/system/bin zaprett/system/etc/zaprett/lists zapret-latest out lists zapret-hosts/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 -a src/* zaprett/
|
||||
|
||||
#copy all files to another distributions
|
||||
cp -r zaprett/* zaprett-hosts/
|
||||
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
|
||||
|
||||
cp lists/list-youtube.txt zaprett/system/etc/zaprett/lists/
|
||||
cp lists/list-youtube.txt zaprett-hosts/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-hosts/system/etc/zaprett/lists/
|
||||
|
||||
cp hosts/hosts zaprett-hosts/system/etc
|
||||
|
||||
- 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-hosts/module.prop <<EOF
|
||||
id=zaprett
|
||||
name=zaprett-hosts
|
||||
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-hosts/ zaprett-tv/
|
||||
- name: Create archives
|
||||
run: |
|
||||
cd zaprett && zip -r ../zaprett.zip ./* && cd ..
|
||||
cd zaprett-hosts && zip -r ../zaprett-hosts.zip ./* && cd ..
|
||||
cd zaprett-tv && zip -r ../zaprett-tv.zip ./* && cd ..
|
||||
|
||||
mv zaprett.zip out/
|
||||
mv zaprett-hosts.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.version_code }},
|
||||
"zipUrl": "https://github.com/${{ github.repository }}/releases/download/${{ inputs.tag }}/zaprett.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/main/changelog.md"
|
||||
}
|
||||
EOF
|
||||
cat > update_hosts.json <<EOF
|
||||
{
|
||||
"version": "${{ inputs.version }}",
|
||||
"versionCode": ${{ inputs.version_code }},
|
||||
"zipUrl": "https://github.com/${{ github.repository }}/releases/download/${{ inputs.tag }}/zaprett-hosts.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/main/changelog.md"
|
||||
}
|
||||
EOF
|
||||
cat > update_tv.json <<EOF
|
||||
{
|
||||
"version": "${{ inputs.version }}",
|
||||
"versionCode": ${{ inputs.version_code }},
|
||||
"zipUrl": "https://github.com/${{ github.repository }}/releases/download/${{ inputs.tag }}/zaprett-tv.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/main/changelog.md"
|
||||
}
|
||||
EOF
|
||||
- name: Commit jsons and changelog
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "Update update's.json and changelog"
|
||||
file_pattern: 'update.json update_hosts.json update_tv.json changelog.md'
|
||||
|
||||
- name: Send bot post
|
||||
env:
|
||||
MESSAGE_TEXT: |
|
||||
🔄 <b>Обновление модуля</b> ${{ inputs.version }}
|
||||
|
||||
📋 Изменения: ${{ inputs.release_changes }}
|
||||
|
||||
⬇️ <a href='https://github.com/egor-white/zaprett/releases/tag/${{ inputs.tag }}'>Скачать</a>
|
||||
|
||||
ℹ️ @zaprett_module<a href='zaprett.xyz'>[web]</a>
|
||||
run: |
|
||||
curl -X POST "https://api.telegram.org/bot${{ secrets.BOT_TOKEN }}/sendMessage" \
|
||||
-d chat_id=-1002531270265 \
|
||||
-d parse_mode=HTML \
|
||||
-d disable_web_page_preview=true \
|
||||
--data-urlencode "text=$MESSAGE_TEXT"
|
||||
|
||||
170
.github/workflows/workflow_without_post.yml
vendored
Normal file
170
.github/workflows/workflow_without_post.yml
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
name: Build module (Without telegram post)
|
||||
|
||||
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-hosts/system/bin zaprett-tv/system/bin zaprett/system/etc/zaprett/lists zapret-latest out lists zapret-hosts/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 -a src/* zaprett/
|
||||
|
||||
#copy all files to another distributions
|
||||
cp -r zaprett/* zaprett-hosts/
|
||||
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
|
||||
|
||||
cp lists/list-youtube.txt zaprett/system/etc/zaprett/lists/
|
||||
cp lists/list-youtube.txt zaprett-hosts/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-hosts/system/etc/zaprett/lists/
|
||||
|
||||
cp hosts/hosts zaprett-hosts/system/etc
|
||||
|
||||
- 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-hosts/module.prop <<EOF
|
||||
id=zaprett
|
||||
name=zaprett-hosts
|
||||
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-hosts/ zaprett-tv/
|
||||
- name: Create archives
|
||||
run: |
|
||||
cd zaprett && zip -r ../zaprett.zip ./* && cd ..
|
||||
cd zaprett-hosts && zip -r ../zaprett-hosts.zip ./* && cd ..
|
||||
cd zaprett-tv && zip -r ../zaprett-tv.zip ./* && cd ..
|
||||
|
||||
mv zaprett.zip out/
|
||||
mv zaprett-hosts.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.version_code }},
|
||||
"zipUrl": "https://github.com/${{ github.repository }}/releases/download/${{ inputs.tag }}/zaprett.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/main/changelog.md"
|
||||
}
|
||||
EOF
|
||||
cat > update_hosts.json <<EOF
|
||||
{
|
||||
"version": "${{ inputs.version }}",
|
||||
"versionCode": ${{ inputs.version_code }},
|
||||
"zipUrl": "https://github.com/${{ github.repository }}/releases/download/${{ inputs.tag }}/zaprett-hosts.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/main/changelog.md"
|
||||
}
|
||||
EOF
|
||||
cat > update_tv.json <<EOF
|
||||
{
|
||||
"version": "${{ inputs.version }}",
|
||||
"versionCode": ${{ inputs.version_code }},
|
||||
"zipUrl": "https://github.com/${{ github.repository }}/releases/download/${{ inputs.tag }}/zaprett-tv.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/main/changelog.md"
|
||||
}
|
||||
EOF
|
||||
- name: Commit jsons and changelog
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "Update update's.json and changelog"
|
||||
file_pattern: 'update.json update_hosts.json update_tv.json changelog.md'
|
||||
@@ -12,4 +12,6 @@
|
||||
На данный момент модуль умеет:
|
||||
+ Включать, выключать и перезапускать nfqws
|
||||
|
||||
Оригинальный автор - [notmalware](https://t.me/notmalware). Отредактировано - [egor-white](https://t.me/cheesedroid), [MT6833](https://t.me/MT6833), [Mineralka](https://t.me/Program_dayn), [Cherret](https://t.me/Cherret).
|
||||
|
||||
|
||||
Создано - [egor-white](https://t.me/cheesedroid), [Cherret](https://t.me/Cherret), [MT6833](https://t.me/MT6833).
|
||||
@@ -1 +1 @@
|
||||
Исправление обновлений
|
||||
Обновление бинарников
|
||||
|
||||
35
hosts/hosts
Normal file
35
hosts/hosts
Normal 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
|
||||
33
src/META-INF/com/google/android/update-binary
Normal file
33
src/META-INF/com/google/android/update-binary
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/sbin/sh
|
||||
|
||||
#################
|
||||
# Initialization
|
||||
#################
|
||||
|
||||
umask 022
|
||||
|
||||
# echo before loading util_functions
|
||||
ui_print() { echo "$1"; }
|
||||
|
||||
require_new_magisk() {
|
||||
ui_print "*******************************"
|
||||
ui_print " Please install Magisk v20.4+! "
|
||||
ui_print "*******************************"
|
||||
exit 1
|
||||
}
|
||||
|
||||
#########################
|
||||
# Load util_functions.sh
|
||||
#########################
|
||||
|
||||
OUTFD=$2
|
||||
ZIPFILE=$3
|
||||
|
||||
mount /data 2>/dev/null
|
||||
|
||||
[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
|
||||
. /data/adb/magisk/util_functions.sh
|
||||
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
|
||||
|
||||
install_module
|
||||
exit 0
|
||||
1
src/META-INF/com/google/android/updater-script
Normal file
1
src/META-INF/com/google/android/updater-script
Normal file
@@ -0,0 +1 @@
|
||||
#MAGISK
|
||||
67
src/customize.sh
Normal file
67
src/customize.sh
Normal file
@@ -0,0 +1,67 @@
|
||||
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, Cherret, Huananzhi X99"
|
||||
ui_print "Apps by: egorwhite, Cherret"
|
||||
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;
|
||||
|
||||
ui_print "Filling configuration file if not exist..."
|
||||
if [ ! -f "/sdcard/zaprett/config" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
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
|
||||
mv $MODPATH/system/bin/$nfqws $MODPATH/system/bin/nfqws
|
||||
rm $MODPATH/system/bin/nfqws_*
|
||||
mkdir $MODPATH/tmp
|
||||
|
||||
ui_print "Setting permissions..."
|
||||
chmod 777 /sdcard/zaprett; chmod 777 $MODPATH/service.sh
|
||||
|
||||
ui_print "Cleaning temp files..."
|
||||
rm -rf $MODPATH/system/etc/zaprett
|
||||
|
||||
ui_print "Installation done. Telegram chat: https://t.me/zaprett_module"
|
||||
11
src/service.sh
Normal file
11
src/service.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/system/bin/sh
|
||||
while [ -z "$(getprop sys.boot_completed)" ]; do sleep 2; done
|
||||
sleep 15
|
||||
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
|
||||
90
src/system/bin/zaprett
Normal file
90
src/system/bin/zaprett
Normal file
@@ -0,0 +1,90 @@
|
||||
#!/system/bin/sh
|
||||
source /sdcard/zaprett/config
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
start_service() {
|
||||
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!"
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
echo "Stopping zaprett..."
|
||||
clear_iptables_rules
|
||||
kill "$(pidof nfqws)" 2>/dev/null
|
||||
rm -f /data/adb/modules/zaprett/tmp/*
|
||||
echo "zaprett service stopped!"
|
||||
}
|
||||
|
||||
if [ "$1" == "start" ]; then
|
||||
start_service
|
||||
fi
|
||||
|
||||
if [ "$1" == "stop" ]; then
|
||||
stop_service
|
||||
fi
|
||||
|
||||
if [ "$1" == "status" ]; then
|
||||
pidof "nfqws" > /dev/null && echo "zaprett is working" || echo "zaprett is stopped"
|
||||
fi
|
||||
|
||||
if [ "$1" == "restart" ]; then
|
||||
stop_service
|
||||
start_service
|
||||
echo "zaprett service restarted!"
|
||||
fi
|
||||
|
||||
if [ "$1" == "help" ]; then
|
||||
echo -e "Помощь по модулю zaprett:\nzaprett start - запуск сервиса\nzaprett stop - остановка сервиса\nzaprett restart - перезапуск сервиса\nzaprett status - статус сервиса\nzaprett module-ver - версия модуля\nzaprett bin-ver - версия бинарных файлов"
|
||||
fi
|
||||
|
||||
if [ "$1" == "module-ver" ]; then
|
||||
grep 'version=' /data/adb/modules/zaprett/module.prop | sed 's/version=//'
|
||||
fi
|
||||
|
||||
if [ "$1" == "bin-ver" ]; then
|
||||
nfqws --version | grep -o 'version v[0-9.]*' | head -n1 | cut -d' ' -f2
|
||||
fi
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo "zaprett installed. Telegram: t.me/zaprett_module"
|
||||
fi
|
||||
BIN
src/system/etc/zaprett/bin/quic_initial_www_google_com.bin
Normal file
BIN
src/system/etc/zaprett/bin/quic_initial_www_google_com.bin
Normal file
Binary file not shown.
BIN
src/system/etc/zaprett/bin/tls_clienthello_www_google_com.bin
Normal file
BIN
src/system/etc/zaprett/bin/tls_clienthello_www_google_com.bin
Normal file
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "3.8",
|
||||
"versionCode": 38,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/3.8.0/zaprett.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
|
||||
"version": "4.8",
|
||||
"versionCode": 48,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.8.0/zaprett.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "3.8",
|
||||
"versionCode": 389,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/3.8.0/zaprett-extended.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
|
||||
"version": "100",
|
||||
"versionCode": 100,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.7.0/zaprett-hosts.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
|
||||
}
|
||||
|
||||
6
update_hosts.json
Normal file
6
update_hosts.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": "4.8",
|
||||
"versionCode": 48,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.8.0/zaprett-hosts.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "3.8",
|
||||
"versionCode": 38,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/3.8.0/zaprett-tv.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
|
||||
"version": "4.8",
|
||||
"versionCode": 48,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.8.0/zaprett-tv.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user