mirror of
https://github.com/itdoginfo/allow-domains.git
synced 2026-03-26 06:46:24 +03:00
Compare commits
2 Commits
2026-03-16
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e57de37782 | ||
|
|
74cd5a4767 |
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)
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
157.240.139.0/24
|
||||
157.240.156.0/22
|
||||
157.240.169.0/24
|
||||
157.240.170.0/24
|
||||
157.240.175.0/24
|
||||
157.240.177.0/24
|
||||
157.240.179.0/24
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
5.101.96.0/20
|
||||
24.144.64.0/21
|
||||
24.144.72.0/24
|
||||
24.144.76.0/22
|
||||
24.144.80.0/20
|
||||
24.144.96.0/19
|
||||
@@ -133,10 +134,9 @@
|
||||
165.232.32.0/19
|
||||
165.232.64.0/18
|
||||
165.232.128.0/18
|
||||
165.245.128.0/20
|
||||
165.245.144.0/21
|
||||
165.245.152.0/22
|
||||
165.245.160.0/19
|
||||
165.245.128.0/18
|
||||
165.245.192.0/21
|
||||
165.245.208.0/20
|
||||
167.71.0.0/16
|
||||
167.99.0.0/16
|
||||
167.172.0.0/16
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
157.240.139.0/24
|
||||
157.240.156.0/22
|
||||
157.240.169.0/24
|
||||
157.240.170.0/24
|
||||
157.240.175.0/24
|
||||
157.240.177.0/24
|
||||
157.240.179.0/24
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
2.27.243.0/24
|
||||
2.58.172.0/24
|
||||
5.39.0.0/17
|
||||
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
|
||||
@@ -67,7 +67,6 @@
|
||||
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
|
||||
@@ -205,17 +204,18 @@
|
||||
83.143.16.0/21
|
||||
83.175.167.0/24
|
||||
83.175.173.0/24
|
||||
84.19.167.0/24
|
||||
85.217.144.0/23
|
||||
86.38.187.0/24
|
||||
86.54.26.0/24
|
||||
87.98.128.0/17
|
||||
87.229.51.0/24
|
||||
87.232.75.0/24
|
||||
88.216.221.0/24
|
||||
88.218.34.0/24
|
||||
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
|
||||
@@ -271,7 +271,7 @@
|
||||
117.18.104.0/24
|
||||
123.100.227.0/24
|
||||
128.0.118.0/24
|
||||
130.49.217.0/24
|
||||
132.243.197.0/24
|
||||
135.125.0.0/16
|
||||
135.148.0.0/16
|
||||
136.0.95.0/24
|
||||
@@ -282,6 +282,7 @@
|
||||
138.249.135.0/24
|
||||
139.99.0.0/16
|
||||
141.11.18.0/24
|
||||
141.11.21.0/24
|
||||
141.11.31.0/24
|
||||
141.11.39.0/24
|
||||
141.11.74.0/23
|
||||
@@ -326,6 +327,7 @@
|
||||
144.225.112.0/24
|
||||
144.225.123.0/24
|
||||
144.225.162.0/24
|
||||
144.225.178.0/24
|
||||
145.79.151.0/24
|
||||
145.239.0.0/16
|
||||
146.19.38.0/24
|
||||
@@ -346,7 +348,6 @@
|
||||
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
|
||||
@@ -378,7 +379,6 @@
|
||||
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
|
||||
@@ -401,7 +401,6 @@
|
||||
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
|
||||
@@ -479,7 +478,6 @@
|
||||
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
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
2400:6180:100::/40
|
||||
2604:a880::/47
|
||||
2604:a880:2::/48
|
||||
2604:a880:4::/47
|
||||
2604:a880:6::/48
|
||||
2604:a880:4::/46
|
||||
2604:a880:400::/48
|
||||
2604:a880:800::/48
|
||||
2604:a880:cad::/48
|
||||
|
||||
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