mirror of
https://github.com/itdoginfo/allow-domains.git
synced 2026-03-26 06:46:24 +03:00
Compare commits
5 Commits
refactor
...
2026-03-21
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74cd5a4767 | ||
|
|
d5ff6c38dd | ||
|
|
ed91b10a8a | ||
|
|
3307c1404d | ||
|
|
bd6f07f971 |
15
.github/workflows/create-lists.yml
vendored
15
.github/workflows/create-lists.yml
vendored
@@ -34,6 +34,20 @@ jobs:
|
||||
wget -qO- https://github.com/SagerNet/sing-box/releases/download/v1.12.25/sing-box-1.12.25-linux-amd64.tar.gz | tar xz
|
||||
sudo mv sing-box-*/sing-box /usr/local/bin/
|
||||
|
||||
- name: Cache mihomo
|
||||
uses: actions/cache@v5.0.3
|
||||
id: cache-mihomo
|
||||
with:
|
||||
path: /usr/local/bin/mihomo
|
||||
key: mihomo-1.19.8
|
||||
|
||||
- name: Install mihomo
|
||||
if: steps.cache-mihomo.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
wget -qO- https://github.com/MetaCubeX/mihomo/releases/download/v1.19.8/mihomo-linux-amd64-v1.19.8.gz | gunzip > mihomo
|
||||
chmod +x mihomo
|
||||
sudo mv mihomo /usr/local/bin/
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
@@ -88,5 +102,6 @@ jobs:
|
||||
with:
|
||||
files: |
|
||||
${{ github.workspace }}/SRS/*.srs
|
||||
${{ github.workspace }}/MRS/*.mrs
|
||||
${{ github.workspace }}/DAT/*.dat
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,6 +2,7 @@ antifilter-domains.lst
|
||||
uablacklist-domains.lst
|
||||
zaboronahelp-domains.lst
|
||||
SRS
|
||||
MRS
|
||||
JSON
|
||||
DAT
|
||||
geosite_data
|
||||
|
||||
36
README.md
36
README.md
@@ -7,6 +7,7 @@
|
||||
- Dnsmasq ipset. Для Dnsmasq в формате ipset (OpenWrt <= 21.02) `ipset=/showip.net/vpn_domains`
|
||||
- Sing-box Source. Для Sing-box версии 1.11.0 и выше.
|
||||
- Xray Dat. Общий файл geosite.dat с разбивкой по категориям.
|
||||
- Mihomo MRS. Бинарные rule-set для Mihomo (Clash Meta). Файлы с суффиксом `_domain` для доменов, `_ipcidr` для подсетей.
|
||||
- ClashX `DOMAIN-SUFFIX,showip.net`
|
||||
- Mikrotik FWD `/ip dns static add name=fast.com type=FWD...`
|
||||
- Kvas. Для Kvas 1.1.8 и новее. Просто отсортированный список доменов.
|
||||
@@ -75,6 +76,7 @@
|
||||
- [Kvas](https://raw.githubusercontent.com/itdoginfo/allow-domains/main/Russia/inside-kvas.lst)
|
||||
- [Mikrotik](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Russia/inside-mikrotik-fwd.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/russia_inside.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/russia_inside_domain.mrs)
|
||||
- geosite:russia-inside
|
||||
|
||||
</details>
|
||||
@@ -89,6 +91,7 @@
|
||||
- [Kvas](https://raw.githubusercontent.com/itdoginfo/allow-domains/main/Russia/outside-kvas.lst)
|
||||
- [Mikrotik](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Russia/outside-mikrotik-fwd.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/russia_outside.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/russia_outside_domain.mrs)
|
||||
- geosite:russia-outside
|
||||
|
||||
</details>
|
||||
@@ -102,6 +105,7 @@
|
||||
- [Kvas](https://raw.githubusercontent.com/itdoginfo/allow-domains/main/Ukraine/inside-kvas.lst)
|
||||
- [Mikrotik](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Ukraine/inside-mikrotik-fwd.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/ukraine_inside.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/ukraine_inside_domain.mrs)
|
||||
- geosite:ukraine
|
||||
|
||||
</details>
|
||||
@@ -111,6 +115,7 @@
|
||||
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Categories/anime.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/anime.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/anime_domain.mrs)
|
||||
- geosite:russia-inside@anime
|
||||
|
||||
</details>
|
||||
@@ -120,6 +125,7 @@
|
||||
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Categories/block.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/block.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/block_domain.mrs)
|
||||
- geosite:russia-inside@block
|
||||
|
||||
</details>
|
||||
@@ -129,6 +135,7 @@
|
||||
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Categories/geoblock.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/geoblock.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/geoblock_domain.mrs)
|
||||
- geosite:russia-inside@geoblock
|
||||
|
||||
</details>
|
||||
@@ -138,6 +145,7 @@
|
||||
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Categories/news.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/news.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/news_domain.mrs)
|
||||
- geosite:russia-inside@news
|
||||
|
||||
</details>
|
||||
@@ -147,6 +155,7 @@
|
||||
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Categories/porn.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/porn.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/porn_domain.mrs)
|
||||
- geosite:russia-inside@porn
|
||||
|
||||
</details>
|
||||
@@ -156,6 +165,7 @@
|
||||
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Categories/hodca.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/hodca.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/hodca_domain.mrs)
|
||||
- geosite:russia-inside@hodca
|
||||
|
||||
</details>
|
||||
@@ -165,6 +175,8 @@
|
||||
|
||||
- [Subnets](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Subnets/IPv4/cloudflare.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/cloudflare.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/cloudflare_domain.mrs)
|
||||
- [MRS ipcidr](https://github.com/itdoginfo/allow-domains/releases/latest/download/cloudflare_ipcidr.mrs)
|
||||
|
||||
</details>
|
||||
|
||||
@@ -174,6 +186,8 @@
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Services/discord.lst)
|
||||
- [Subnets](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Subnets/IPv4/discord.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/discord.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/discord_domain.mrs)
|
||||
- [MRS ipcidr](https://github.com/itdoginfo/allow-domains/releases/latest/download/discord_ipcidr.mrs)
|
||||
|
||||
</details>
|
||||
|
||||
@@ -182,6 +196,7 @@
|
||||
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Services/hdrezka.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/hdrezka.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/hdrezka_domain.mrs)
|
||||
- geosite:russia-inside@hdrezka
|
||||
|
||||
</details>
|
||||
@@ -192,6 +207,8 @@
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Services/meta.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/meta.srs)
|
||||
- [Subnets](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Subnets/IPv4/meta.lst)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/meta_domain.mrs)
|
||||
- [MRS ipcidr](https://github.com/itdoginfo/allow-domains/releases/latest/download/meta_ipcidr.mrs)
|
||||
- geosite:russia-inside@meta
|
||||
|
||||
</details>
|
||||
@@ -202,6 +219,8 @@
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Services/telegram.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/telegram.srs)
|
||||
- [Subnets](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Subnets/IPv4/telegram.lst)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/telegram_domain.mrs)
|
||||
- [MRS ipcidr](https://github.com/itdoginfo/allow-domains/releases/latest/download/telegram_ipcidr.mrs)
|
||||
|
||||
</details>
|
||||
|
||||
@@ -210,6 +229,7 @@
|
||||
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Services/tiktok.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/tiktok.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/tiktok_domain.mrs)
|
||||
- geosite:russia-inside@tiktok
|
||||
|
||||
</details>
|
||||
@@ -220,6 +240,8 @@
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Services/twitter.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/twitter.srs)
|
||||
- [Subnets](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Subnets/IPv4/twitter.lst)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/twitter_domain.mrs)
|
||||
- [MRS ipcidr](https://github.com/itdoginfo/allow-domains/releases/latest/download/twitter_ipcidr.mrs)
|
||||
- geosite:russia-inside@twitter
|
||||
|
||||
</details>
|
||||
@@ -229,16 +251,18 @@
|
||||
|
||||
- [RAW](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Services/youtube.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/youtube.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/youtube_domain.mrs)
|
||||
- geosite:russia-inside@youtube
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Google Meet</summary>
|
||||
|
||||
- [Subnets](https://raw.githubusercontent.com/itdoginfo/allow-domains/refs/heads/main/Subnets/IPv4/google_meet.lst)
|
||||
- [SRS](https://github.com/itdoginfo/allow-domains/releases/latest/download/google_meet.srs)
|
||||
- [MRS domain](https://github.com/itdoginfo/allow-domains/releases/latest/download/google_meet_domain.mrs)
|
||||
- [MRS ipcidr](https://github.com/itdoginfo/allow-domains/releases/latest/download/google_meet_ipcidr.mrs)
|
||||
|
||||
</details>
|
||||
|
||||
@@ -303,6 +327,16 @@ service firewall restart && service dnsmasq restart
|
||||
|
||||
*Meta признана экстремистской и террористической организацией в России
|
||||
|
||||
# Разработка
|
||||
|
||||
```bash
|
||||
nix-shell
|
||||
|
||||
python3 get-subnets.py
|
||||
|
||||
python3 convert.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
[Telegram-канал с обновлениями](https://t.me/itdoginfo)
|
||||
|
||||
@@ -380,7 +380,6 @@ DOMAIN-SUFFIX,habr.com
|
||||
DOMAIN-SUFFIX,hackernoon.com
|
||||
DOMAIN-SUFFIX,hackmd.io
|
||||
DOMAIN-SUFFIX,halooglasi.com
|
||||
DOMAIN-SUFFIX,hangouts.googleapis.com
|
||||
DOMAIN-SUFFIX,hashicorp.com
|
||||
DOMAIN-SUFFIX,haydaygame.com
|
||||
DOMAIN-SUFFIX,hbomax.com
|
||||
@@ -550,9 +549,6 @@ DOMAIN-SUFFIX,mediazona.ca
|
||||
DOMAIN-SUFFIX,medicalnewstoday.com
|
||||
DOMAIN-SUFFIX,medium.com
|
||||
DOMAIN-SUFFIX,meduza.io
|
||||
DOMAIN-SUFFIX,meet.google.com
|
||||
DOMAIN-SUFFIX,meetings.clients6.google.com
|
||||
DOMAIN-SUFFIX,meetings.googleapis.com
|
||||
DOMAIN-SUFFIX,mega.nz
|
||||
DOMAIN-SUFFIX,megapeer.ru
|
||||
DOMAIN-SUFFIX,megapeer.vip
|
||||
@@ -909,7 +905,6 @@ DOMAIN-SUFFIX,steamstat.info
|
||||
DOMAIN-SUFFIX,strana.news
|
||||
DOMAIN-SUFFIX,strana.today
|
||||
DOMAIN-SUFFIX,strava.com
|
||||
DOMAIN-SUFFIX,stream.meet.google.com
|
||||
DOMAIN-SUFFIX,suggestqueries.google.com
|
||||
DOMAIN-SUFFIX,supercell.com
|
||||
DOMAIN-SUFFIX,supersliv.biz
|
||||
|
||||
@@ -380,7 +380,6 @@ ipset=/habr.com/vpn_domains
|
||||
ipset=/hackernoon.com/vpn_domains
|
||||
ipset=/hackmd.io/vpn_domains
|
||||
ipset=/halooglasi.com/vpn_domains
|
||||
ipset=/hangouts.googleapis.com/vpn_domains
|
||||
ipset=/hashicorp.com/vpn_domains
|
||||
ipset=/haydaygame.com/vpn_domains
|
||||
ipset=/hbomax.com/vpn_domains
|
||||
@@ -550,9 +549,6 @@ ipset=/mediazona.ca/vpn_domains
|
||||
ipset=/medicalnewstoday.com/vpn_domains
|
||||
ipset=/medium.com/vpn_domains
|
||||
ipset=/meduza.io/vpn_domains
|
||||
ipset=/meet.google.com/vpn_domains
|
||||
ipset=/meetings.clients6.google.com/vpn_domains
|
||||
ipset=/meetings.googleapis.com/vpn_domains
|
||||
ipset=/mega.nz/vpn_domains
|
||||
ipset=/megapeer.ru/vpn_domains
|
||||
ipset=/megapeer.vip/vpn_domains
|
||||
@@ -909,7 +905,6 @@ ipset=/steamstat.info/vpn_domains
|
||||
ipset=/strana.news/vpn_domains
|
||||
ipset=/strana.today/vpn_domains
|
||||
ipset=/strava.com/vpn_domains
|
||||
ipset=/stream.meet.google.com/vpn_domains
|
||||
ipset=/suggestqueries.google.com/vpn_domains
|
||||
ipset=/supercell.com/vpn_domains
|
||||
ipset=/supersliv.biz/vpn_domains
|
||||
|
||||
@@ -380,7 +380,6 @@ nftset=/habr.com/4#inet#fw4#vpn_domains
|
||||
nftset=/hackernoon.com/4#inet#fw4#vpn_domains
|
||||
nftset=/hackmd.io/4#inet#fw4#vpn_domains
|
||||
nftset=/halooglasi.com/4#inet#fw4#vpn_domains
|
||||
nftset=/hangouts.googleapis.com/4#inet#fw4#vpn_domains
|
||||
nftset=/hashicorp.com/4#inet#fw4#vpn_domains
|
||||
nftset=/haydaygame.com/4#inet#fw4#vpn_domains
|
||||
nftset=/hbomax.com/4#inet#fw4#vpn_domains
|
||||
@@ -550,9 +549,6 @@ nftset=/mediazona.ca/4#inet#fw4#vpn_domains
|
||||
nftset=/medicalnewstoday.com/4#inet#fw4#vpn_domains
|
||||
nftset=/medium.com/4#inet#fw4#vpn_domains
|
||||
nftset=/meduza.io/4#inet#fw4#vpn_domains
|
||||
nftset=/meet.google.com/4#inet#fw4#vpn_domains
|
||||
nftset=/meetings.clients6.google.com/4#inet#fw4#vpn_domains
|
||||
nftset=/meetings.googleapis.com/4#inet#fw4#vpn_domains
|
||||
nftset=/mega.nz/4#inet#fw4#vpn_domains
|
||||
nftset=/megapeer.ru/4#inet#fw4#vpn_domains
|
||||
nftset=/megapeer.vip/4#inet#fw4#vpn_domains
|
||||
@@ -909,7 +905,6 @@ nftset=/steamstat.info/4#inet#fw4#vpn_domains
|
||||
nftset=/strana.news/4#inet#fw4#vpn_domains
|
||||
nftset=/strana.today/4#inet#fw4#vpn_domains
|
||||
nftset=/strava.com/4#inet#fw4#vpn_domains
|
||||
nftset=/stream.meet.google.com/4#inet#fw4#vpn_domains
|
||||
nftset=/suggestqueries.google.com/4#inet#fw4#vpn_domains
|
||||
nftset=/supercell.com/4#inet#fw4#vpn_domains
|
||||
nftset=/supersliv.biz/4#inet#fw4#vpn_domains
|
||||
|
||||
@@ -379,7 +379,6 @@ habr.com
|
||||
hackernoon.com
|
||||
hackmd.io
|
||||
halooglasi.com
|
||||
hangouts.googleapis.com
|
||||
hashicorp.com
|
||||
haydaygame.com
|
||||
hbomax.com
|
||||
@@ -549,9 +548,6 @@ mediazona.ca
|
||||
medicalnewstoday.com
|
||||
medium.com
|
||||
meduza.io
|
||||
meet.google.com
|
||||
meetings.clients6.google.com
|
||||
meetings.googleapis.com
|
||||
mega.nz
|
||||
megapeer.ru
|
||||
megapeer.vip
|
||||
@@ -908,7 +904,6 @@ steamstat.info
|
||||
strana.news
|
||||
strana.today
|
||||
strava.com
|
||||
stream.meet.google.com
|
||||
suggestqueries.google.com
|
||||
supercell.com
|
||||
supersliv.biz
|
||||
|
||||
@@ -380,7 +380,6 @@
|
||||
/ip dns static add name=hackernoon.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=hackmd.io type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=halooglasi.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=hangouts.googleapis.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=hashicorp.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=haydaygame.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=hbomax.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
@@ -550,9 +549,6 @@
|
||||
/ip dns static add name=medicalnewstoday.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=medium.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=meduza.io type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=meet.google.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=meetings.clients6.google.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=meetings.googleapis.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=mega.nz type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=megapeer.ru type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=megapeer.vip type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
@@ -908,7 +904,6 @@
|
||||
/ip dns static add name=strana.news type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=strana.today type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=strava.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=stream.meet.google.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=suggestqueries.google.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=supercell.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=supersliv.biz type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
|
||||
@@ -380,7 +380,6 @@ habr.com
|
||||
hackernoon.com
|
||||
hackmd.io
|
||||
halooglasi.com
|
||||
hangouts.googleapis.com
|
||||
hashicorp.com
|
||||
haydaygame.com
|
||||
hbomax.com
|
||||
@@ -550,9 +549,6 @@ mediazona.ca
|
||||
medicalnewstoday.com
|
||||
medium.com
|
||||
meduza.io
|
||||
meet.google.com
|
||||
meetings.clients6.google.com
|
||||
meetings.googleapis.com
|
||||
mega.nz
|
||||
megapeer.ru
|
||||
megapeer.vip
|
||||
@@ -909,7 +905,6 @@ steamstat.info
|
||||
strana.news
|
||||
strana.today
|
||||
strava.com
|
||||
stream.meet.google.com
|
||||
suggestqueries.google.com
|
||||
supercell.com
|
||||
supersliv.biz
|
||||
|
||||
@@ -16,4 +16,5 @@ telegram.space
|
||||
telesco.pe
|
||||
tg.dev
|
||||
tx.me
|
||||
usercontent.dev
|
||||
usercontent.dev
|
||||
ton.org
|
||||
@@ -43,9 +43,6 @@
|
||||
178.63.0.0/16
|
||||
178.104.0.0/15
|
||||
178.212.75.0/24
|
||||
185.0.42.0/23
|
||||
185.1.160.0/23
|
||||
185.1.166.0/23
|
||||
185.12.65.0/24
|
||||
185.50.120.0/23
|
||||
185.107.52.0/22
|
||||
@@ -67,7 +64,6 @@
|
||||
194.42.184.0/22
|
||||
194.62.106.0/24
|
||||
195.60.226.0/24
|
||||
195.66.224.0/21
|
||||
195.201.0.0/16
|
||||
195.248.224.0/24
|
||||
197.242.84.0/22
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
5.83.153.0/24
|
||||
5.102.39.0/24
|
||||
5.135.0.0/16
|
||||
5.144.182.0/24
|
||||
5.175.168.0/24
|
||||
5.175.195.0/24
|
||||
5.178.106.0/24
|
||||
@@ -66,6 +67,7 @@
|
||||
45.92.60.0/22
|
||||
45.94.49.0/24
|
||||
45.112.195.0/24
|
||||
45.140.36.0/24
|
||||
45.140.187.0/24
|
||||
45.149.63.0/24
|
||||
45.149.185.0/24
|
||||
@@ -86,6 +88,7 @@
|
||||
46.236.211.0/24
|
||||
46.244.32.0/20
|
||||
50.114.91.0/24
|
||||
50.118.128.0/22
|
||||
51.38.0.0/16
|
||||
51.68.0.0/16
|
||||
51.75.0.0/16
|
||||
@@ -111,7 +114,9 @@
|
||||
64.83.69.0/24
|
||||
64.94.92.0/23
|
||||
64.95.150.0/23
|
||||
64.205.192.0/24
|
||||
64.225.244.0/23
|
||||
65.86.32.0/24
|
||||
66.70.128.0/17
|
||||
66.92.11.0/24
|
||||
66.92.25.0/24
|
||||
@@ -210,6 +215,7 @@
|
||||
89.19.44.0/24
|
||||
89.21.84.0/24
|
||||
89.125.172.0/24
|
||||
89.251.28.0/24
|
||||
91.90.88.0/21
|
||||
91.121.0.0/16
|
||||
91.124.192.0/24
|
||||
@@ -265,6 +271,7 @@
|
||||
117.18.104.0/24
|
||||
123.100.227.0/24
|
||||
128.0.118.0/24
|
||||
130.49.217.0/24
|
||||
135.125.0.0/16
|
||||
135.148.0.0/16
|
||||
136.0.95.0/24
|
||||
@@ -339,6 +346,7 @@
|
||||
149.202.0.0/16
|
||||
151.80.0.0/16
|
||||
151.240.1.0/24
|
||||
151.240.17.0/24
|
||||
151.240.24.0/24
|
||||
151.241.8.0/24
|
||||
151.241.68.0/24
|
||||
@@ -369,6 +377,8 @@
|
||||
162.141.71.0/24
|
||||
162.212.35.0/24
|
||||
163.5.62.0/24
|
||||
163.5.131.0/24
|
||||
163.5.149.0/24
|
||||
163.5.187.0/24
|
||||
163.223.88.0/24
|
||||
164.132.0.0/16
|
||||
@@ -391,6 +401,7 @@
|
||||
172.83.201.0/24
|
||||
173.211.127.0/24
|
||||
176.31.0.0/16
|
||||
176.105.229.0/24
|
||||
178.32.0.0/15
|
||||
180.131.145.0/24
|
||||
184.174.96.0/23
|
||||
@@ -468,6 +479,7 @@
|
||||
195.20.146.0/24
|
||||
195.62.72.0/23
|
||||
195.66.30.0/23
|
||||
195.206.242.0/24
|
||||
195.226.93.0/24
|
||||
198.27.64.0/18
|
||||
198.49.103.0/24
|
||||
@@ -516,6 +528,7 @@
|
||||
213.218.214.0/24
|
||||
213.251.128.0/18
|
||||
216.24.220.0/23
|
||||
216.132.95.0/24
|
||||
216.183.120.0/24
|
||||
216.203.15.0/24
|
||||
216.211.218.0/24
|
||||
|
||||
42
convert.py
42
convert.py
@@ -101,6 +101,25 @@ def lines_from_file(filepath):
|
||||
with open(filepath, 'r', encoding='utf-8') as f:
|
||||
return [line.strip() for line in f if line.strip()]
|
||||
|
||||
def compile_mrs(domains, name, mrs_dir='MRS', behavior='domain'):
|
||||
os.makedirs(mrs_dir, exist_ok=True)
|
||||
|
||||
txt_path = os.path.join(mrs_dir, f"{name}.txt")
|
||||
mrs_path = os.path.join(mrs_dir, f"{name}.mrs")
|
||||
|
||||
with open(txt_path, 'w', encoding='utf-8') as f:
|
||||
for d in domains:
|
||||
f.write(f"{d}\n")
|
||||
|
||||
try:
|
||||
subprocess.run(
|
||||
["mihomo", "convert-ruleset", behavior, "text", txt_path, mrs_path], check=True
|
||||
)
|
||||
print(f"Compiled: {mrs_path}")
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Compile error {txt_path}: {e}")
|
||||
sys.exit(1)
|
||||
|
||||
def compile_srs(data, name, json_dir='JSON', srs_dir='SRS'):
|
||||
os.makedirs(json_dir, exist_ok=True)
|
||||
os.makedirs(srs_dir, exist_ok=True)
|
||||
@@ -315,6 +334,29 @@ if __name__ == '__main__':
|
||||
{"network": ["udp"], "ip_cidr": discord_subnets, "port_range": ["50000:65535"]},
|
||||
])
|
||||
|
||||
# Mihomo main
|
||||
to_mrs = lambda domains: [f'+.{d.lstrip(".")}' for d in domains]
|
||||
mrs_russia_inside = to_mrs(russia_inside)
|
||||
mrs_russia_outside = to_mrs(russia_outside)
|
||||
mrs_ukraine_inside = to_mrs(ukraine_inside)
|
||||
compile_mrs(mrs_russia_inside, 'russia_inside_domain')
|
||||
compile_mrs(mrs_russia_outside, 'russia_outside_domain')
|
||||
compile_mrs(mrs_ukraine_inside, 'ukraine_inside_domain')
|
||||
|
||||
# Mihomo categories
|
||||
for directory in ['Categories', 'Services']:
|
||||
for filename in os.listdir(directory):
|
||||
file_path = os.path.join(directory, filename)
|
||||
if os.path.isfile(file_path):
|
||||
domains = to_mrs(lines_from_file(file_path))
|
||||
name = os.path.splitext(filename)[0]
|
||||
compile_mrs(domains, f'{name}_domain')
|
||||
|
||||
# Mihomo subnets
|
||||
for service in SUBNET_SERVICES:
|
||||
subnets = lines_from_file(f'Subnets/IPv4/{service}.lst')
|
||||
compile_mrs(subnets, f'{service}_ipcidr', behavior='ipcidr')
|
||||
|
||||
# Xray domains
|
||||
prepare_dat_domains(russia_inside, 'russia-inside', directories)
|
||||
prepare_dat_domains(russia_outside, 'russia-outside')
|
||||
|
||||
@@ -6,11 +6,13 @@ pkgs.mkShell {
|
||||
python312Packages.tldextract
|
||||
python312Packages.protobuf
|
||||
sing-box
|
||||
mihomo
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "Environment ready!"
|
||||
echo "Python version: $(python --version)"
|
||||
echo "sing-box version: $(sing-box version 2>/dev/null || echo 'not available')"
|
||||
echo "mihomo version: $(mihomo -v 2>/dev/null || echo 'not available')"
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user