mirror of
https://github.com/egor-white/zaprett.git
synced 2026-01-20 09:39:44 +05:00
Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32b1bc9de9 | ||
|
|
0dabe2f4e7 | ||
|
|
634f9245b2 | ||
|
|
4526c6d313 | ||
|
|
cceed3a1d7 | ||
|
|
60f112656a | ||
|
|
389e350746 | ||
|
|
5d714e3591 | ||
|
|
8e399bc791 | ||
|
|
c38dff2ada | ||
|
|
d6ec35d1e2 | ||
|
|
f873420b6a | ||
|
|
e04c349383 | ||
|
|
b3828babe7 | ||
|
|
dabdd9adb1 | ||
|
|
4230027933 | ||
|
|
48672aa0c3 | ||
|
|
91a2990eb6 | ||
|
|
b12b6e1bb2 | ||
|
|
4cbda8bc52 | ||
|
|
5ddea2675f | ||
|
|
6b35a0673a | ||
|
|
59e7970bf2 | ||
|
|
18e1ad9ebd | ||
|
|
85a3f9321c | ||
|
|
f29ed9de63 | ||
|
|
d58792fbfc | ||
|
|
860dc21272 | ||
|
|
277f6756bd | ||
|
|
ac35be8e57 | ||
|
|
82de796d25 | ||
|
|
4e5c3e3847 | ||
|
|
c500997d74 | ||
|
|
f94acaa830 | ||
|
|
b5fa8e0abf | ||
|
|
85e3c5ce0f |
23
.github/workflows/workflow.yml
vendored
23
.github/workflows/workflow.yml
vendored
@@ -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
|
||||
|
||||
27
.github/workflows/workflow_without_post.yml
vendored
27
.github/workflows/workflow_without_post.yml
vendored
@@ -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
3
.gitmodules
vendored
@@ -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
|
||||
|
||||
13
README.md
13
README.md
@@ -22,18 +22,9 @@
|
||||
|
||||
## Какую версию модуля выбрать?
|
||||
|
||||
В актуальных релизах есть 3 версии модуля, а именно:
|
||||
В актуальных релизах есть 2 версии модуля, а именно:
|
||||
- zaprett.zip
|
||||
- zaprett-hosts.zip
|
||||
- zaprett-tv.zip
|
||||
|
||||
Основные их отличия представленны в таблице ниже.
|
||||
Для устройств на Android TV **рекомендуется использовать именно TV версию** из-за некоторых особенностей работы этой ОС.
|
||||
|Версия|Списки|/etc/hosts|
|
||||
|------|------|----------|
|
||||
|zaprett|list-youtube.txt, list-discord.txt|:x: Нет|
|
||||
|zaprett-tv|list-youtube.txt|:x: Нет|
|
||||
|zaprett-hosts|list-youtube.txt,list-discord.txt|:white_check_mark: Есть|
|
||||
- zaprett-hosts.zip (с /etc/hosts)
|
||||
|
||||
## Что такое /etc/hosts?
|
||||
Говоря грубо, это файл, который влияет на работу нейросетей и других недоступных сервисов, перенаправляя ваш траффик на сторонние сервера.
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
Обновление бинарников zapret до версии 72.2
|
||||
Обновление hosts файла в zaprett hosts
|
||||
|
||||
Список изменений: Обновление zapret Добавление файлов для стратегий alt 10 и alt 11
|
||||
|
||||
562
hosts/hosts
562
hosts/hosts
@@ -1,225 +1,376 @@
|
||||
### dns.malw.link: hosts file
|
||||
# Последнее обновление: 17 октября 2025
|
||||
# Дополнение к zapret:
|
||||
### dns.geohide.ru: hosts file
|
||||
# На базе hosts от dns.malw.link
|
||||
# Последнее обновление: 21 ноября 2025
|
||||
# Дополнение к zapret
|
||||
157.240.245.174 instagram.com
|
||||
157.240.245.174 www.instagram.com
|
||||
157.240.245.174 b.i.instagram.com
|
||||
157.240.245.174 z-p42-chat-e2ee-ig.facebook.com
|
||||
157.240.245.174 help.instagram.com
|
||||
3.66.189.153 protonmail.com
|
||||
3.66.189.153 mail.proton.me
|
||||
64.233.164.198 yt3.ggpht.com
|
||||
64.233.164.132 yt4.ggpht.com
|
||||
185.70.42.45 protonmail.com
|
||||
185.70.42.45 mail.proton.me
|
||||
52.223.13.41 tracker.openbittorrent.com
|
||||
130.255.77.28 ntc.party
|
||||
172.64.33.155 rutor.info
|
||||
173.245.59.155 rutor.is
|
||||
185.87.51.182 controlplane.tailscale.com
|
||||
172.64.32.155 rutor.info
|
||||
172.64.33.219 rutor.info
|
||||
173.245.58.155 rutor.info
|
||||
173.245.59.219 rutor.info
|
||||
172.64.32.155 rutor.is
|
||||
172.64.33.219 rutor.is
|
||||
173.245.58.155 rutor.is
|
||||
173.245.59.219 rutor.is
|
||||
172.64.33.155 d.rutor.info
|
||||
172.64.33.155 d.rutor.is
|
||||
|
||||
# ChatGPT, OpenAI:
|
||||
185.246.223.127 chatgpt.com
|
||||
185.246.223.127 ab.chatgpt.com
|
||||
185.246.223.127 auth.openai.com
|
||||
185.246.223.127 auth0.openai.com
|
||||
185.246.223.127 platform.openai.com
|
||||
185.246.223.127 cdn.oaistatic.com
|
||||
185.246.223.127 files.oaiusercontent.com
|
||||
185.246.223.127 cdn.auth0.com
|
||||
185.246.223.127 tcr9i.chat.openai.com
|
||||
185.246.223.127 webrtc.chatgpt.com
|
||||
185.246.223.127 android.chat.openai.com
|
||||
185.246.223.127 api.openai.com
|
||||
45.95.233.23 operator.chatgpt.com
|
||||
185.246.223.127 sora.chatgpt.com
|
||||
185.246.223.127 sora.com
|
||||
185.246.223.127 videos.openai.com
|
||||
|
||||
# Сервисы Google:
|
||||
185.246.223.127 gemini.google.com
|
||||
134.0.118.88 aistudio.google.com
|
||||
134.0.118.88 generativelanguage.googleapis.com
|
||||
185.246.223.127 aitestkitchen.withgoogle.com
|
||||
134.0.118.88 aisandbox-pa.googleapis.com
|
||||
134.0.118.88 webchannel-alkalimakersuite-pa.clients6.google.com
|
||||
134.0.118.88 alkalimakersuite-pa.clients6.google.com
|
||||
134.0.118.88 assistant-s3-pa.googleapis.com
|
||||
134.0.118.88 proactivebackend-pa.googleapis.com
|
||||
185.246.223.127 o.pki.goog
|
||||
185.246.223.127 labs.google
|
||||
185.246.223.127 notebooklm.google
|
||||
185.246.223.127 notebooklm.google.com
|
||||
185.246.223.127 jules.google.com
|
||||
185.246.223.127 stitch.withgoogle.com
|
||||
|
||||
# Microsoft Copilot, Microsoft Rewards, Xbox, Xbox Cloud Gaming:
|
||||
185.246.223.127 copilot.microsoft.com
|
||||
185.246.223.127 sydney.bing.com
|
||||
185.246.223.127 edgeservices.bing.com
|
||||
45.95.233.23 rewards.bing.com
|
||||
185.246.223.127 xsts.auth.xboxlive.com
|
||||
185.246.223.127 xgpuwebf2p.gssv-play-prod.xboxlive.com
|
||||
185.246.223.127 xgpuweb.gssv-play-prod.xboxlive.com
|
||||
|
||||
# Spotify:
|
||||
185.246.223.127 api.spotify.com
|
||||
185.246.223.127 xpui.app.spotify.com
|
||||
185.246.223.127 appresolve.spotify.com
|
||||
185.246.223.127 login5.spotify.com
|
||||
185.246.223.127 login.app.spotify.com
|
||||
185.246.223.127 encore.scdn.co
|
||||
185.246.223.127 ap-gew1.spotify.com
|
||||
185.246.223.127 gew1-spclient.spotify.com
|
||||
185.246.223.127 spclient.wg.spotify.com
|
||||
185.246.223.127 api-partner.spotify.com
|
||||
185.246.223.127 aet.spotify.com
|
||||
185.246.223.127 www.spotify.com
|
||||
185.246.223.127 accounts.spotify.com
|
||||
45.95.233.23 open.spotify.com
|
||||
|
||||
# GitHub Copilot:
|
||||
50.7.87.84 api.github.com
|
||||
185.246.223.127 api.individual.githubcopilot.com
|
||||
185.246.223.127 proxy.individual.githubcopilot.com
|
||||
|
||||
# JetBrains:
|
||||
50.7.85.221 datalore.jetbrains.com
|
||||
107.150.34.100 plugins.jetbrains.com
|
||||
185.246.223.127 download.jetbrains.com
|
||||
185.246.223.127 api.jetbrains.ai
|
||||
185.246.223.127 account.jetbrains.com
|
||||
|
||||
# ElevenLabs:
|
||||
185.246.223.127 elevenlabs.io
|
||||
185.246.223.127 api.us.elevenlabs.io
|
||||
185.246.223.127 elevenreader.io
|
||||
185.246.223.127 api.elevenlabs.io
|
||||
185.246.223.127 help.elevenlabs.io
|
||||
|
||||
# Truth Social
|
||||
204.12.192.219 truthsocial.com
|
||||
204.12.192.219 static-assets-1.truthsocial.com
|
||||
|
||||
# Grok
|
||||
185.246.223.127 grok.com
|
||||
185.246.223.127 accounts.x.ai
|
||||
185.246.223.127 assets.grok.com
|
||||
|
||||
# Tidal
|
||||
185.246.223.127 api.tidal.com
|
||||
185.246.223.127 listen.tidal.com
|
||||
185.246.223.127 login.tidal.com
|
||||
185.246.223.127 auth.tidal.com
|
||||
185.246.223.127 link.tidal.com
|
||||
185.246.223.127 dd.tidal.com
|
||||
185.246.223.127 resources.tidal.com
|
||||
45.95.233.23 images.tidal.com
|
||||
185.246.223.127 fsu.fa.tidal.com
|
||||
185.246.223.127 geolocation.onetrust.com
|
||||
185.246.223.127 api.squareup.com
|
||||
185.246.223.127 api-global.squareup.com
|
||||
|
||||
# Supercell
|
||||
185.246.223.127 cdn.id.supercell.com
|
||||
185.246.223.127 security.id.supercell.com
|
||||
45.95.233.23 accounts.supercell.com
|
||||
185.246.223.127 game-assets.clashroyaleapp.com
|
||||
185.246.223.127 game-assets.clashofclans.com
|
||||
185.246.223.127 clashofclans.inbox.supercell.com
|
||||
185.246.223.127 game-assets.brawlstarsgame.com
|
||||
185.246.223.127 store.supercell.com
|
||||
45.95.233.23 game.clashroyaleapp.com
|
||||
64.188.98.242 gamea.clashofclans.com
|
||||
185.246.223.127 game.brawlstarsgame.com
|
||||
108.61.167.26 game.squadbustersgame.com
|
||||
45.95.233.23 game.mocogame.com
|
||||
|
||||
# DeepL
|
||||
185.246.223.127 deepl.com
|
||||
185.246.223.127 www.deepl.com
|
||||
185.246.223.127 www2.deepl.com
|
||||
185.246.223.127 login-wall.deepl.com
|
||||
185.246.223.127 w.deepl.com
|
||||
185.246.223.127 s.deepl.com
|
||||
185.246.223.127 dict.deepl.com
|
||||
185.246.223.127 ita-free.www.deepl.com
|
||||
185.246.223.127 write-free.www.deepl.com
|
||||
185.246.223.127 experimentation.deepl.com
|
||||
185.246.223.127 experimentation-grpc.deepl.com
|
||||
185.246.223.127 ita-free.app.deepl.com
|
||||
185.246.223.127 shield.deepl.com
|
||||
185.246.223.127 ott.deepl.com
|
||||
185.246.223.127 api-free.deepl.com
|
||||
185.246.223.127 backend.deepl.com
|
||||
185.246.223.127 clearance.deepl.com
|
||||
185.246.223.127 errortracking.deepl.com
|
||||
185.246.223.127 auth.deepl.com
|
||||
185.246.223.127 oneshot-free.www.deepl.com
|
||||
|
||||
# Deezer
|
||||
185.246.223.127 deezer.com
|
||||
185.246.223.127 www.deezer.com
|
||||
185.246.223.127 dzcdn.net
|
||||
185.246.223.127 payment.deezer.com
|
||||
|
||||
# Weather.com
|
||||
185.246.223.127 weather.com
|
||||
185.246.223.127 upsx.weather.com
|
||||
|
||||
# Guilded
|
||||
204.12.192.219 guilded.gg
|
||||
204.12.192.219 www.guilded.gg
|
||||
|
||||
# Fitbit
|
||||
185.246.223.127 api.fitbit.com
|
||||
185.246.223.127 fitbit-pa.googleapis.com
|
||||
185.246.223.127 fitbitvestibuleshim-pa.googleapis.com
|
||||
185.246.223.127 fitbit.google.com
|
||||
# ChatGPT & Sora (OpenAI)
|
||||
95.182.120.241 ab.chatgpt.com
|
||||
185.87.51.182 ab.chatgpt.com
|
||||
95.182.120.241 android.chat.openai.com
|
||||
185.87.51.182 android.chat.openai.com
|
||||
95.182.120.241 api.openai.com
|
||||
185.87.51.182 api.openai.com
|
||||
95.182.120.241 auth.openai.com
|
||||
185.87.51.182 auth.openai.com
|
||||
95.182.120.241 auth0.openai.com
|
||||
185.87.51.182 auth0.openai.com
|
||||
95.182.120.241 cdn.auth0.com
|
||||
185.87.51.182 cdn.auth0.com
|
||||
95.182.120.241 cdn.oaistatic.com
|
||||
185.87.51.182 cdn.oaistatic.com
|
||||
95.182.120.241 chatgpt.com
|
||||
185.87.51.182 chatgpt.com
|
||||
95.182.120.241 files.oaiusercontent.com
|
||||
185.87.51.182 files.oaiusercontent.com
|
||||
95.182.120.241 ios.chat.openai.com
|
||||
185.87.51.182 ios.chat.openai.com
|
||||
95.182.120.241 operator.chatgpt.com
|
||||
185.87.51.182 operator.chatgpt.com
|
||||
95.182.120.241 platform.openai.com
|
||||
185.87.51.182 platform.openai.com
|
||||
95.182.120.241 sora.chatgpt.com
|
||||
185.87.51.182 sora.chatgpt.com
|
||||
95.182.120.241 sora.com
|
||||
185.87.51.182 sora.com
|
||||
95.182.120.241 tcr9i.chat.openai.com
|
||||
185.87.51.182 tcr9i.chat.openai.com
|
||||
95.182.120.241 videos.openai.com
|
||||
185.87.51.182 videos.openai.com
|
||||
95.182.120.241 webrtc.chatgpt.com
|
||||
185.87.51.182 webrtc.chatgpt.com
|
||||
|
||||
# Claude
|
||||
185.246.223.127 claude.ai
|
||||
185.246.223.127 console.anthropic.com
|
||||
185.246.223.127 auth.anthropic.com
|
||||
185.246.223.127 api.anthropic.com
|
||||
95.182.120.241 api.anthropic.com
|
||||
185.87.51.182 api.anthropic.com
|
||||
95.182.120.241 auth.anthropic.com
|
||||
185.87.51.182 auth.anthropic.com
|
||||
95.182.120.241 claude.ai
|
||||
185.87.51.182 claude.ai
|
||||
95.182.120.241 console.anthropic.com
|
||||
185.87.51.182 console.anthropic.com
|
||||
|
||||
#4PDA
|
||||
185.246.223.127 4pda.to
|
||||
185.246.223.127 app.4pda.to
|
||||
185.246.223.127 s.4pda.to
|
||||
185.246.223.127 appbk.4pda.to
|
||||
# DeepL
|
||||
95.182.120.241 api-free.deepl.com
|
||||
185.87.51.182 api-free.deepl.com
|
||||
95.182.120.241 auth.deepl.com
|
||||
185.87.51.182 auth.deepl.com
|
||||
95.182.120.241 backend.deepl.com
|
||||
185.87.51.182 backend.deepl.com
|
||||
95.182.120.241 clearance.deepl.com
|
||||
185.87.51.182 clearance.deepl.com
|
||||
95.182.120.241 deepl.com
|
||||
185.87.51.182 deepl.com
|
||||
95.182.120.241 dict.deepl.com
|
||||
185.87.51.182 dict.deepl.com
|
||||
95.182.120.241 errortracking.deepl.com
|
||||
185.87.51.182 errortracking.deepl.com
|
||||
95.182.120.241 experimentation-grpc.deepl.com
|
||||
185.87.51.182 experimentation-grpc.deepl.com
|
||||
95.182.120.241 experimentation.deepl.com
|
||||
185.87.51.182 experimentation.deepl.com
|
||||
95.182.120.241 ita-free.app.deepl.com
|
||||
185.87.51.182 ita-free.app.deepl.com
|
||||
95.182.120.241 ita-free.www.deepl.com
|
||||
185.87.51.182 ita-free.www.deepl.com
|
||||
95.182.120.241 login-wall.deepl.com
|
||||
185.87.51.182 login-wall.deepl.com
|
||||
95.182.120.241 oneshot-free.www.deepl.com
|
||||
185.87.51.182 oneshot-free.www.deepl.com
|
||||
95.182.120.241 ott.deepl.com
|
||||
185.87.51.182 ott.deepl.com
|
||||
95.182.120.241 s.deepl.com
|
||||
185.87.51.182 s.deepl.com
|
||||
95.182.120.241 shield.deepl.com
|
||||
185.87.51.182 shield.deepl.com
|
||||
95.182.120.241 w.deepl.com
|
||||
185.87.51.182 w.deepl.com
|
||||
95.182.120.241 write-free.www.deepl.com
|
||||
185.87.51.182 write-free.www.deepl.com
|
||||
95.182.120.241 www.deepl.com
|
||||
185.87.51.182 www.deepl.com
|
||||
95.182.120.241 www2.deepl.com
|
||||
185.87.51.182 www2.deepl.com
|
||||
|
||||
# Deezer
|
||||
95.182.120.241 deezer.com
|
||||
185.87.51.182 deezer.com
|
||||
95.182.120.241 dzcdn.net
|
||||
185.87.51.182 dzcdn.net
|
||||
95.182.120.241 payment.deezer.com
|
||||
185.87.51.182 payment.deezer.com
|
||||
95.182.120.241 www.deezer.com
|
||||
185.87.51.182 www.deezer.com
|
||||
|
||||
# ElevenLabs
|
||||
95.182.120.241 api.elevenlabs.io
|
||||
185.87.51.182 api.elevenlabs.io
|
||||
95.182.120.241 api.us.elevenlabs.io
|
||||
185.87.51.182 api.us.elevenlabs.io
|
||||
95.182.120.241 elevenlabs.io
|
||||
185.87.51.182 elevenlabs.io
|
||||
95.182.120.241 elevenreader.io
|
||||
185.87.51.182 elevenreader.io
|
||||
95.182.120.241 help.elevenlabs.io
|
||||
185.87.51.182 help.elevenlabs.io
|
||||
|
||||
# Fitbit
|
||||
95.182.120.241 api.fitbit.com
|
||||
185.87.51.182 api.fitbit.com
|
||||
95.182.120.241 fitbit-pa.googleapis.com
|
||||
185.87.51.182 fitbit-pa.googleapis.com
|
||||
95.182.120.241 fitbit.google.com
|
||||
185.87.51.182 fitbit.google.com
|
||||
95.182.120.241 fitbitvestibuleshim-pa.googleapis.com
|
||||
185.87.51.182 fitbitvestibuleshim-pa.googleapis.com
|
||||
|
||||
# Google AI
|
||||
95.182.120.241 aisandbox-pa.googleapis.com
|
||||
185.87.51.182 aisandbox-pa.googleapis.com
|
||||
95.182.120.241 aistudio.google.com
|
||||
185.87.51.182 aistudio.google.com
|
||||
95.182.120.241 aitestkitchen.withgoogle.com
|
||||
185.87.51.182 aitestkitchen.withgoogle.com
|
||||
95.182.120.241 alkalimakersuite-pa.clients6.google.com
|
||||
185.87.51.182 alkalimakersuite-pa.clients6.google.com
|
||||
95.182.120.241 assistant-s3-pa.googleapis.com
|
||||
185.87.51.182 assistant-s3-pa.googleapis.com
|
||||
95.182.120.241 gemini.google.com
|
||||
185.87.51.182 gemini.google.com
|
||||
95.182.120.241 generativelanguage.googleapis.com
|
||||
185.87.51.182 generativelanguage.googleapis.com
|
||||
95.182.120.241 jules.google.com
|
||||
185.87.51.182 jules.google.com
|
||||
95.182.120.241 labs.google
|
||||
185.87.51.182 labs.google
|
||||
95.182.120.241 notebooklm.google
|
||||
185.87.51.182 notebooklm.google
|
||||
95.182.120.241 notebooklm.google.com
|
||||
185.87.51.182 notebooklm.google.com
|
||||
95.182.120.241 o.pki.goog
|
||||
185.87.51.182 o.pki.goog
|
||||
95.182.120.241 proactivebackend-pa.googleapis.com
|
||||
185.87.51.182 proactivebackend-pa.googleapis.com
|
||||
95.182.120.241 robinfrontend-pa.googleapis.com
|
||||
185.87.51.182 robinfrontend-pa.googleapis.com
|
||||
95.182.120.241 stitch.withgoogle.com
|
||||
185.87.51.182 stitch.withgoogle.com
|
||||
95.182.120.241 webchannel-alkalimakersuite-pa.clients6.google.com
|
||||
185.87.51.182 webchannel-alkalimakersuite-pa.clients6.google.com
|
||||
|
||||
# Grok
|
||||
95.182.120.241 accounts.x.ai
|
||||
185.87.51.182 accounts.x.ai
|
||||
95.182.120.241 assets.grok.com
|
||||
185.87.51.182 assets.grok.com
|
||||
95.182.120.241 grok.com
|
||||
185.87.51.182 grok.com
|
||||
|
||||
# JetBrains
|
||||
95.182.120.241 account.jetbrains.com
|
||||
185.87.51.182 account.jetbrains.com
|
||||
95.182.120.241 api.jetbrains.ai
|
||||
185.87.51.182 api.jetbrains.ai
|
||||
95.182.120.241 datalore.jetbrains.com
|
||||
185.87.51.182 datalore.jetbrains.com
|
||||
95.182.120.241 download.jetbrains.com
|
||||
185.87.51.182 download.jetbrains.com
|
||||
95.182.120.241 plugins.jetbrains.com
|
||||
185.87.51.182 plugins.jetbrains.com
|
||||
|
||||
# Linear.app
|
||||
95.182.120.241 client-api.linear.app
|
||||
185.87.51.182 client-api.linear.app
|
||||
95.182.120.241 constellation.linear.app
|
||||
185.87.51.182 constellation.linear.app
|
||||
95.182.120.241 linear.app
|
||||
185.87.51.182 linear.app
|
||||
95.182.120.241 public.linear.app
|
||||
185.87.51.182 public.linear.app
|
||||
95.182.120.241 s.linear.app
|
||||
185.87.51.182 s.linear.app
|
||||
95.182.120.241 static.linear.app
|
||||
185.87.51.182 static.linear.app
|
||||
95.182.120.241 uploads.linear.app
|
||||
185.87.51.182 uploads.linear.app
|
||||
|
||||
# Microsoft Copilot & Xbox
|
||||
95.182.120.241 copilot.microsoft.com
|
||||
185.87.51.182 copilot.microsoft.com
|
||||
95.182.120.241 edgeservices.bing.com
|
||||
185.87.51.182 edgeservices.bing.com
|
||||
95.182.120.241 rewards.bing.com
|
||||
185.87.51.182 rewards.bing.com
|
||||
95.182.120.241 sydney.bing.com
|
||||
185.87.51.182 sydney.bing.com
|
||||
95.182.120.241 xboxdesignlab.xbox.com
|
||||
185.87.51.182 xboxdesignlab.xbox.com
|
||||
95.182.120.241 xgpuweb.gssv-play-prod.xboxlive.com
|
||||
185.87.51.182 xgpuweb.gssv-play-prod.xboxlive.com
|
||||
95.182.120.241 xgpuwebf2p.gssv-play-prod.xboxlive.com
|
||||
185.87.51.182 xgpuwebf2p.gssv-play-prod.xboxlive.com
|
||||
95.182.120.241 xsts.auth.xboxlive.com
|
||||
185.87.51.182 xsts.auth.xboxlive.com
|
||||
|
||||
# Spotify
|
||||
95.182.120.241 accounts.spotify.com
|
||||
185.87.51.182 accounts.spotify.com
|
||||
95.182.120.241 aet.spotify.com
|
||||
185.87.51.182 aet.spotify.com
|
||||
95.182.120.241 ap-gew1.spotify.com
|
||||
185.87.51.182 ap-gew1.spotify.com
|
||||
95.182.120.241 api-partner.spotify.com
|
||||
185.87.51.182 api-partner.spotify.com
|
||||
95.182.120.241 api.spotify.com
|
||||
185.87.51.182 api.spotify.com
|
||||
95.182.120.241 appresolve.spotify.com
|
||||
185.87.51.182 appresolve.spotify.com
|
||||
95.182.120.241 encore.scdn.co
|
||||
185.87.51.182 encore.scdn.co
|
||||
95.182.120.241 gew1-spclient.spotify.com
|
||||
185.87.51.182 gew1-spclient.spotify.com
|
||||
95.182.120.241 login.app.spotify.com
|
||||
185.87.51.182 login.app.spotify.com
|
||||
95.182.120.241 login5.spotify.com
|
||||
185.87.51.182 login5.spotify.com
|
||||
95.182.120.241 open.spotify.com
|
||||
185.87.51.182 open.spotify.com
|
||||
95.182.120.241 spclient.wg.spotify.com
|
||||
185.87.51.182 spclient.wg.spotify.com
|
||||
95.182.120.241 www.spotify.com
|
||||
185.87.51.182 www.spotify.com
|
||||
95.182.120.241 xpui.app.spotify.com
|
||||
185.87.51.182 xpui.app.spotify.com
|
||||
|
||||
# Supercell
|
||||
45.95.233.23 accounts.supercell.com
|
||||
185.246.223.127 cdn.id.supercell.com
|
||||
185.246.223.127 clashofclans.inbox.supercell.com
|
||||
141.95.97.120 game.brawlstarsgame.com
|
||||
45.95.233.23 game.clashroyaleapp.com
|
||||
45.95.233.23 game.mocogame.com
|
||||
108.61.167.26 game.squadbustersgame.com
|
||||
141.95.97.120 game-assets.brawlstarsgame.com
|
||||
185.246.223.127 game-assets.clashofclans.com
|
||||
185.246.223.127 game-assets.clashroyaleapp.com
|
||||
64.188.98.242 gamea.clashofclans.com
|
||||
185.246.223.127 security.id.supercell.com
|
||||
185.246.223.127 store.supercell.com
|
||||
|
||||
# Trae.ai
|
||||
185.246.223.127 trae-api-sg.mchost.guru
|
||||
185.246.223.127 api.trae.ai
|
||||
185.246.223.127 api-sg-central.trae.ai
|
||||
185.246.223.127 api16-normal-alisg.mchost.guru
|
||||
95.182.120.241 api-sg-central.trae.ai
|
||||
185.87.51.182 api-sg-central.trae.ai
|
||||
95.182.120.241 api.trae.ai
|
||||
185.87.51.182 api.trae.ai
|
||||
95.182.120.241 api16-normal-alisg.mchost.guru
|
||||
185.87.51.182 api16-normal-alisg.mchost.guru
|
||||
95.182.120.241 trae-api-sg.mchost.guru
|
||||
185.87.51.182 trae-api-sg.mchost.guru
|
||||
|
||||
# Другое:
|
||||
185.246.223.127 www.notion.so
|
||||
50.7.85.222 www.canva.com
|
||||
185.246.223.127 www.intel.com
|
||||
185.246.223.127 www.dell.com
|
||||
50.7.85.219 www.tiktok.com # Только на сайте. Приложение определяет регион по оператору, а не по IP. Поэтому есть моды.
|
||||
142.54.189.106 web.archive.org # Блокирует от российских IP некоторые сайты
|
||||
185.246.223.127 developer.nvidia.com
|
||||
107.150.34.99 builds.parsec.app
|
||||
185.246.223.127 tria.ge
|
||||
185.246.223.127 api.imgur.com
|
||||
45.95.233.23 www.dyson.com
|
||||
45.95.233.23 www.dyson.fr
|
||||
45.95.233.23 usher.ttvnw.net
|
||||
64.188.98.242 api.manus.im
|
||||
185.246.223.127 profile.broadcom.com
|
||||
45.95.233.23 test.dns.malw.link
|
||||
45.95.233.23 eu.posthog.com
|
||||
185.246.223.127 www.qwant.com
|
||||
185.246.223.127 guidedhacking.com
|
||||
# Twitch
|
||||
95.182.120.241 gql.twitch.tv
|
||||
185.87.51.182 gql.twitch.tv
|
||||
95.182.120.241 usher.ttvnw.net
|
||||
185.87.51.182 usher.ttvnw.net
|
||||
|
||||
# Weather.com
|
||||
95.182.120.241 upsx.weather.com
|
||||
185.87.51.182 upsx.weather.com
|
||||
95.182.120.241 weather.com
|
||||
185.87.51.182 weather.com
|
||||
|
||||
# Windsurf
|
||||
95.182.120.241 codeium.com
|
||||
185.87.51.182 codeium.com
|
||||
95.182.120.241 codeiumdata.com
|
||||
185.87.51.182 codeiumdata.com
|
||||
95.182.120.241 inference.codeium.com
|
||||
185.87.51.182 inference.codeium.com
|
||||
95.182.120.241 marketplace.windsurf.com
|
||||
185.87.51.182 marketplace.windsurf.com
|
||||
95.182.120.241 server.codeium.com
|
||||
185.87.51.182 server.codeium.com
|
||||
95.182.120.241 unleash.codeium.com
|
||||
185.87.51.182 unleash.codeium.com
|
||||
95.182.120.241 web-backend.codeium.com
|
||||
185.87.51.182 web-backend.codeium.com
|
||||
95.182.120.241 windsurf-stable.codeium.com
|
||||
185.87.51.182 windsurf-stable.codeium.com
|
||||
95.182.120.241 windsurf-telemetry.codeium.com
|
||||
185.87.51.182 windsurf-telemetry.codeium.com
|
||||
95.182.120.241 windsurf.com
|
||||
185.87.51.182 windsurf.com
|
||||
|
||||
# Остальное
|
||||
95.182.120.241 api-global.squareup.com
|
||||
185.87.51.182 api-global.squareup.com
|
||||
95.182.120.241 api.cdnlibs.org
|
||||
185.87.51.182 api.cdnlibs.org
|
||||
95.182.120.241 api.imgur.com
|
||||
185.87.51.182 api.imgur.com
|
||||
95.182.120.241 api.manus.im
|
||||
185.87.51.182 api.manus.im
|
||||
95.182.120.241 api.squareup.com
|
||||
185.87.51.182 api.squareup.com
|
||||
95.182.120.241 builds.parsec.app
|
||||
185.87.51.182 builds.parsec.app
|
||||
95.182.120.241 controlplane.tailscale.com
|
||||
185.87.51.182 controlplane.tailscale.com
|
||||
95.182.120.241 developer.nvidia.com
|
||||
185.87.51.182 developer.nvidia.com
|
||||
95.182.120.241 eu.posthog.com
|
||||
185.87.51.182 eu.posthog.com
|
||||
95.182.120.241 framer.com
|
||||
185.87.51.182 framer.com
|
||||
95.182.120.241 geolocation.onetrust.com
|
||||
185.87.51.182 geolocation.onetrust.com
|
||||
95.182.120.241 guidedhacking.com
|
||||
185.87.51.182 guidedhacking.com
|
||||
95.182.120.241 profile.broadcom.com
|
||||
185.87.51.182 profile.broadcom.com
|
||||
95.182.120.241 tria.ge
|
||||
185.87.51.182 tria.ge
|
||||
95.182.120.241 web.archive.org
|
||||
185.87.51.182 web.archive.org
|
||||
95.182.120.241 www.canva.com
|
||||
185.87.51.182 www.canva.com
|
||||
95.182.120.241 www.dell.com
|
||||
185.87.51.182 www.dell.com
|
||||
95.182.120.241 www.dyson.com
|
||||
185.87.51.182 www.dyson.com
|
||||
95.182.120.241 www.dyson.de
|
||||
185.87.51.182 www.dyson.de
|
||||
95.182.120.241 www.dyson.se
|
||||
185.87.51.182 www.dyson.se
|
||||
95.182.120.241 www.intel.com
|
||||
185.87.51.182 www.intel.com
|
||||
95.182.120.241 www.notion.so
|
||||
185.87.51.182 www.notion.so
|
||||
95.182.120.241 www.qwant.com
|
||||
185.87.51.182 www.qwant.com
|
||||
|
||||
# Блокировка реально плохих сайтов
|
||||
# Скримеры:
|
||||
0.0.0.0 only-fans.uk
|
||||
0.0.0.0 only-fans.me
|
||||
0.0.0.0 onlyfans.wtf
|
||||
# IP Logger'ы:
|
||||
0.0.0.0 iplogger.org
|
||||
0.0.0.0 wl.gl
|
||||
0.0.0.0 ed.tc
|
||||
@@ -231,7 +382,6 @@
|
||||
0.0.0.0 ezstat.ru
|
||||
0.0.0.0 iplog.co
|
||||
0.0.0.0 grabify.org
|
||||
# Мусор/реклама:
|
||||
0.0.0.0 log16-platform-ycru.tiktokv.com
|
||||
0.0.0.0 adfox.yandex.ru
|
||||
0.0.0.0 adfstat.yandex.ru
|
||||
@@ -243,4 +393,6 @@
|
||||
0.0.0.0 appmetrica.yandex.ru
|
||||
0.0.0.0 mc.yandex.ru
|
||||
0.0.0.0 amc.yandex.ru
|
||||
### dns.malw.link: end hosts file
|
||||
0.0.0.0 tigr1234566.github.io
|
||||
0.0.0.0 rezvorck.github.io
|
||||
### dns.geohide.ru: end hosts file
|
||||
|
||||
20
rust/Cargo.lock
generated
20
rust/Cargo.lock
generated
@@ -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",
|
||||
|
||||
@@ -30,3 +30,4 @@ panic = "abort"
|
||||
opt-level = "z"
|
||||
lto = true
|
||||
strip = true
|
||||
codegen-units = 1
|
||||
|
||||
Submodule rust/crates/libnfqws/zapret updated: 1408c38522...afce40981c
11
rust/crates/libnfqws2/Cargo.toml
Normal file
11
rust/crates/libnfqws2/Cargo.toml
Normal 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"
|
||||
68
rust/crates/libnfqws2/build.rs
Normal file
68
rust/crates/libnfqws2/build.rs
Normal 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");
|
||||
}
|
||||
2
rust/crates/libnfqws2/src/lib.rs
Normal file
2
rust/crates/libnfqws2/src/lib.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
#![allow(warnings)]
|
||||
include!(concat!(env!("OUT_DIR"), "/libnfqws2.rs"));
|
||||
1
rust/crates/libnfqws2/zapret2
Submodule
1
rust/crates/libnfqws2/zapret2
Submodule
Submodule rust/crates/libnfqws2/zapret2 added at 36ee42bc8c
@@ -21,3 +21,4 @@ log = { workspace = true }
|
||||
nix = { workspace = true, features = ["user"] }
|
||||
getset = { workspace = true }
|
||||
sysinfo = { workspace = true }
|
||||
luajit = "0.1.1"
|
||||
|
||||
@@ -2,19 +2,20 @@ use crate::MODULE_PATH;
|
||||
use tokio::fs;
|
||||
use tokio::fs::File;
|
||||
|
||||
pub async fn set_autostart(autostart: bool) -> Result<(), anyhow::Error> {
|
||||
pub async fn set_autostart() -> Result<(), anyhow::Error> {
|
||||
let autostart_path = MODULE_PATH.join("autostart");
|
||||
|
||||
if autostart {
|
||||
if !get_autostart() {
|
||||
File::create(autostart_path).await?;
|
||||
} else {
|
||||
fs::remove_file(autostart_path).await?;
|
||||
}
|
||||
|
||||
println!("{}", get_autostart());
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn get_autostart() {
|
||||
let file = MODULE_PATH.join("autostart");
|
||||
println!("{}", file.exists());
|
||||
pub fn get_autostart() -> bool {
|
||||
return MODULE_PATH.join("autostart").exists();
|
||||
}
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::autostart::{get_autostart, set_autostart};
|
||||
use crate::service::{restart_service, service_status, start_service, stop_service};
|
||||
use crate::{bin_version, module_version};
|
||||
use crate::{bin_version, module_version, run_nfqws};
|
||||
use clap::Subcommand;
|
||||
use log::error;
|
||||
use crate::autostart::{get_autostart, set_autostart};
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum Command {
|
||||
@@ -19,11 +19,7 @@ pub enum Command {
|
||||
Status,
|
||||
|
||||
/// Enable or disable automatic restart
|
||||
SetAutostart {
|
||||
/// Whether to enable (true) or disable (false) autostart
|
||||
#[arg(value_parser = clap::value_parser!(bool))]
|
||||
autostart: bool,
|
||||
},
|
||||
SetAutostart,
|
||||
|
||||
/// Show whether autostart is enabled
|
||||
GetAutostart,
|
||||
@@ -33,6 +29,12 @@ pub enum Command {
|
||||
|
||||
/// Show the nfqws binary version
|
||||
BinaryVersion,
|
||||
|
||||
/// Run nfqws
|
||||
Args {
|
||||
#[arg(allow_hyphen_values=true, trailing_var_arg = true, num_args = 0..)]
|
||||
args: Vec<String>,
|
||||
},
|
||||
}
|
||||
|
||||
impl Command {
|
||||
@@ -53,14 +55,15 @@ impl Command {
|
||||
}
|
||||
);
|
||||
}
|
||||
Command::SetAutostart { autostart } => {
|
||||
if let Err(err) = set_autostart(*autostart).await {
|
||||
Command::SetAutostart => {
|
||||
if let Err(err) = set_autostart().await {
|
||||
error!("Failed to set auto start: {err}")
|
||||
}
|
||||
}
|
||||
Command::GetAutostart => get_autostart(),
|
||||
Command::GetAutostart => println!("{}", get_autostart()),
|
||||
Command::ModuleVersion => println!("{}", module_version().await?),
|
||||
Command::BinaryVersion => println!("{}", bin_version()),
|
||||
Command::Args { args } => run_nfqws(&args.join(" "))?,
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -8,12 +8,12 @@ use nix::sys::signal::{Signal, kill};
|
||||
use nix::unistd::{Pid, Uid};
|
||||
use regex::Regex;
|
||||
use std::borrow::Cow;
|
||||
use std::io::ErrorKind;
|
||||
use std::path::Path;
|
||||
use sysctl::{Ctl, CtlValue, Sysctl};
|
||||
use sysinfo::{Pid as SysPid, System};
|
||||
use tokio::fs;
|
||||
use tokio::fs::File;
|
||||
use tokio::io::AsyncReadExt;
|
||||
use std::path::Path;
|
||||
|
||||
pub async fn start_service() -> anyhow::Result<()> {
|
||||
if !Uid::effective().is_root() {
|
||||
@@ -32,14 +32,26 @@ pub async fn start_service() -> anyhow::Result<()> {
|
||||
fs::create_dir_all(&tmp_dir).await?;
|
||||
}
|
||||
|
||||
let config_path = ZAPRETT_DIR_PATH.join("config.json");
|
||||
let mut config_contents = String::new();
|
||||
File::open(ZAPRETT_DIR_PATH.join("config.json"))
|
||||
.await
|
||||
.expect("cannot open config.json")
|
||||
.read_to_string(&mut config_contents)
|
||||
.await?;
|
||||
|
||||
let config: Config = serde_json::from_str(&config_contents).expect("invalid json");
|
||||
match fs::File::open(&config_path).await {
|
||||
Ok(mut file) => {
|
||||
file.read_to_string(&mut config_contents).await?;
|
||||
}
|
||||
Err(e) if e.kind() == ErrorKind::NotFound => {
|
||||
let default_config = Config::default();
|
||||
let json = serde_json::to_string_pretty(&default_config)?;
|
||||
if let Some(parent) = config_path.parent() {
|
||||
fs::create_dir_all(parent).await?;
|
||||
}
|
||||
fs::write(&config_path, &json).await?;
|
||||
config_contents = json;
|
||||
}
|
||||
Err(e) => return Err(e.into()),
|
||||
}
|
||||
|
||||
let config: Config = serde_json::from_str(&config_contents)?;
|
||||
|
||||
let start = fs::read_to_string(config.strategy())
|
||||
.await
|
||||
@@ -78,7 +90,8 @@ pub async fn stop_service() -> anyhow::Result<()> {
|
||||
};
|
||||
|
||||
if !service_status().await? {
|
||||
bail!("zaprett service already stopped")
|
||||
info!("zaprett service already stopped");
|
||||
return Ok(())
|
||||
}
|
||||
|
||||
clear_iptables_rules().expect("clear iptables rules");
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -11,31 +11,11 @@ ui_print "Module by: egor-white, Cherret"
|
||||
ui_print "App by: egor-white, 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.json" ]; then
|
||||
cat > /sdcard/zaprett/config.json << EOL
|
||||
{
|
||||
"active_lists": ["/sdcard/zaprett/lists/include/list-youtube.txt", "/sdcard/zaprett/lists/include/list-discord.txt"],
|
||||
"active_ipsets": [],
|
||||
"active_exclude_lists": [],
|
||||
"active_exclude_ipsets": [],
|
||||
"list_type": "whitelist",
|
||||
"strategy": "",
|
||||
"app_list": "whitelist",
|
||||
"whitelist": [],
|
||||
"blacklist": []
|
||||
}
|
||||
EOL
|
||||
fi
|
||||
|
||||
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)
|
||||
@@ -58,10 +38,4 @@ mv $MODPATH/system/bin/$zaprett_bin $MODPATH/system/bin/zaprett
|
||||
rm $MODPATH/system/bin/zaprett-*
|
||||
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. Join us in Telegram: https://t.me/zaprett_module"
|
||||
|
||||
BIN
src/zaprett/bin/tls_clienthello_4pda_to.bin
Normal file
BIN
src/zaprett/bin/tls_clienthello_4pda_to.bin
Normal file
Binary file not shown.
BIN
src/zaprett/bin/tls_clienthello_max_ru.bin
Normal file
BIN
src/zaprett/bin/tls_clienthello_max_ru.bin
Normal file
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "5.2",
|
||||
"versionCode": 52,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/5.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"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "5.2",
|
||||
"versionCode": 52,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/5.2.0/zaprett-tv.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"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "5.2",
|
||||
"versionCode": 52,
|
||||
"zipUrl": "https://github.com/egor-white/zaprett/releases/download/5.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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user