mirror of
https://github.com/egor-white/zaprett.git
synced 2025-12-10 05:19:42 +05:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c92b3a1b19 | ||
|
|
afed7b1122 | ||
|
|
1fa0e306ac | ||
|
|
fece7149e3 | ||
|
|
751788feb8 | ||
|
|
cc3500635f | ||
|
|
b01c5dc95f | ||
|
|
bf69249e12 | ||
|
|
63c45d8a2a | ||
|
|
26325b79f1 | ||
|
|
2cee0712c3 | ||
|
|
79b63ec5e9 | ||
|
|
c230f4876c |
2
.github/workflows/workflow.yml
vendored
2
.github/workflows/workflow.yml
vendored
@@ -178,7 +178,7 @@ jobs:
|
||||
|
||||
⬇️ <a href='https://github.com/egor-white/zaprett/releases/tag/${{ inputs.tag }}'>Скачать</a>
|
||||
|
||||
ℹ️ @zaprett_module
|
||||
ℹ️ @zaprett_module <a href='mailru.pro'>[web]</a>
|
||||
run: |
|
||||
curl -X POST "https://api.telegram.org/bot${{ secrets.BOT_TOKEN }}/sendMessage" \
|
||||
-d chat_id=-1002531270265 \
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
Требования:
|
||||
* Magisk 24.1+
|
||||
* Прямые руки
|
||||
* Termux или другой эмулятор терминала **И/ИЛИ** [приложение zaprett](https://github.com/egor-white/zaprett-app) **ИЛИ** [ремейк приложения zaprett от cherret](https://github.com/CherretGit/zaprett-app)
|
||||
* Termux или другой эмулятор терминала **И/ИЛИ** [приложение zaprett](https://github.com/egor-white/zaprett-app) (не обновляется) **ИЛИ** [ремейк приложения zaprett от cherret](https://github.com/CherretGit/zaprett-app)
|
||||
|
||||
На данный момент модуль умеет:
|
||||
+ Включать, выключать и перезапускать nfqws
|
||||
+ Работать с листами и стратегиями
|
||||
+ Предлагать обновления через Magisk/KSU/KSU Next/APatch
|
||||
|
||||
|
||||
|
||||
Создано - [egor-white](https://t.me/cheesedroid), [Cherret](https://t.me/Cherret), [MT6833](https://t.me/MT6833).
|
||||
Создано - [egor-white](https://t.me/cheesedroid), [Cherret](https://t.me/Cherret), [MT6833](https://t.me/MT6833).
|
||||
|
||||
@@ -1 +1 @@
|
||||
extended-версия была заменена версией с hosts-файлом. Из остальных версий он убран.
|
||||
Небольшие изменения в customize.sh
|
||||
|
||||
@@ -15,10 +15,20 @@ 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
|
||||
mkdir /sdcard/zaprett; mkdir /sdcard/zaprett/lists; mkdir /sdcard/zaprett/bin; mkdir /sdcard/zaprett/strategies;
|
||||
|
||||
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 "Removing old config (config structure changed)..."
|
||||
rm -f /sdcard/zaprett/config
|
||||
|
||||
ui_print "Filling configuration file if not exist..."
|
||||
if [ ! -f "/sdcard/zaprett/config" ]; then
|
||||
echo start_on_boot=true > /sdcard/zaprett/config
|
||||
echo active_lists=/storage/emulated/0/zaprett/lists/list-youtube.txt >> /sdcard/zaprett/config
|
||||
echo active_exclude_lists= >> /sdcard/zaprett/config
|
||||
echo list_type=whitelist
|
||||
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/
|
||||
@@ -50,7 +60,7 @@ case "$arch" in
|
||||
;;
|
||||
esac
|
||||
mv $MODPATH/system/bin/$nfqws $MODPATH/system/bin/nfqws
|
||||
rm nfqws_*
|
||||
rm $MODPATH/system/bin/nfqws_*
|
||||
mkdir $MODPATH/tmp
|
||||
|
||||
ui_print "Setting permissions..."
|
||||
|
||||
@@ -12,16 +12,34 @@ start_service() {
|
||||
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
|
||||
case "$list_type" in
|
||||
whitelist)
|
||||
lists="$active_lists"
|
||||
opt="--hostlist"
|
||||
;;
|
||||
blacklist)
|
||||
lists="$active_exclude_lists"
|
||||
opt="--hostlist-exclude"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown list-type: $list_type" >&2
|
||||
lists=""
|
||||
opt=""
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$lists" ] && [ -n "$opt" ]; then
|
||||
for itm in $(echo "$lists" | tr ',' ' ' | sort -u); do
|
||||
if [ -f "$itm" ]; then
|
||||
dst="/data/adb/modules/zaprett/tmp/$(basename "$itm")"
|
||||
cp "$itm" "$dst"
|
||||
case "$hostlist" in
|
||||
*"$opt=$dst"*) ;;
|
||||
*) hostlist="$hostlist $opt=$dst" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
config=""
|
||||
if [[ -n "$strategy" && -f "$strategy" ]]; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "4.7",
|
||||
"versionCode": 4.7,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.7.0/zaprett.zip",
|
||||
"version": "4.9",
|
||||
"versionCode": 49,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.9.0/zaprett.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "4.7",
|
||||
"versionCode": 4.7,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.7.0/zaprett-hosts.zip",
|
||||
"version": "4.9",
|
||||
"versionCode": 49,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.9.0/zaprett-hosts.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "4.7",
|
||||
"versionCode": 4.7,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.7.0/zaprett-tv.zip",
|
||||
"version": "4.9",
|
||||
"versionCode": 49,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/4.9.0/zaprett-tv.zip",
|
||||
"changelog": "https://raw.githubusercontent.com/egor-white/zaprett/refs/heads/main/changelog.md"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user