mirror of
https://github.com/itdoginfo/allow-domains.git
synced 2026-01-25 22:17:05 +03:00
Compare commits
4 Commits
2025-01-29
...
2025-01-29
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f10a2826ec | ||
|
|
4876681ec9 | ||
|
|
3fda44d6f3 | ||
|
|
e1b3fcbbd5 |
6
.github/workflows/create-lists.yml
vendored
6
.github/workflows/create-lists.yml
vendored
@@ -2,7 +2,7 @@ name: Create lists
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "srs" ]
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- .github/workflows/create-lists.yml
|
||||
- Categories/**
|
||||
@@ -10,7 +10,7 @@ on:
|
||||
- src/**
|
||||
- convert.py
|
||||
schedule:
|
||||
- cron: '29 */8 * * *'
|
||||
- cron: '29 8 * * 1'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
-v ${{ github.workspace }}/Categories:/app/Categories \
|
||||
-v ${{ github.workspace }}/Services:/app/Services \
|
||||
-v ${{ github.workspace }}/SRS:/app/SRS \
|
||||
itdoginfo/compilesrs:0.1.3
|
||||
itdoginfo/compilesrs:0.1.4
|
||||
|
||||
- name: Check Russia/inside-dnsmasq-ipset
|
||||
uses: itdoginfo/dnsmasq-action@0.1
|
||||
|
||||
@@ -213,4 +213,5 @@ bluehost.com
|
||||
ionos.com
|
||||
digitalocean.com
|
||||
godaddy.com
|
||||
hetzner.com
|
||||
hetzner.com
|
||||
tidal.com
|
||||
@@ -613,6 +613,7 @@ DOMAIN-SUFFIX,thetruestory.news
|
||||
DOMAIN-SUFFIX,threads.net
|
||||
DOMAIN-SUFFIX,threema.ch
|
||||
DOMAIN-SUFFIX,ti.com
|
||||
DOMAIN-SUFFIX,tidal.com
|
||||
DOMAIN-SUFFIX,tik-tokapi.com
|
||||
DOMAIN-SUFFIX,tiktok.com
|
||||
DOMAIN-SUFFIX,tiktokcdn-eu.com
|
||||
|
||||
@@ -613,6 +613,7 @@ ipset=/thetruestory.news/vpn_domains
|
||||
ipset=/threads.net/vpn_domains
|
||||
ipset=/threema.ch/vpn_domains
|
||||
ipset=/ti.com/vpn_domains
|
||||
ipset=/tidal.com/vpn_domains
|
||||
ipset=/tik-tokapi.com/vpn_domains
|
||||
ipset=/tiktok.com/vpn_domains
|
||||
ipset=/tiktokcdn-eu.com/vpn_domains
|
||||
|
||||
@@ -613,6 +613,7 @@ nftset=/thetruestory.news/4#inet#fw4#vpn_domains
|
||||
nftset=/threads.net/4#inet#fw4#vpn_domains
|
||||
nftset=/threema.ch/4#inet#fw4#vpn_domains
|
||||
nftset=/ti.com/4#inet#fw4#vpn_domains
|
||||
nftset=/tidal.com/4#inet#fw4#vpn_domains
|
||||
nftset=/tik-tokapi.com/4#inet#fw4#vpn_domains
|
||||
nftset=/tiktok.com/4#inet#fw4#vpn_domains
|
||||
nftset=/tiktokcdn-eu.com/4#inet#fw4#vpn_domains
|
||||
|
||||
@@ -612,6 +612,7 @@ thetruestory.news
|
||||
threads.net
|
||||
threema.ch
|
||||
ti.com
|
||||
tidal.com
|
||||
tik-tokapi.com
|
||||
tiktok.com
|
||||
tiktokcdn-eu.com
|
||||
|
||||
@@ -613,6 +613,7 @@
|
||||
/ip dns static add name=threads.net type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=threema.ch type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=ti.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=tidal.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=tik-tokapi.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=tiktok.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
/ip dns static add name=tiktokcdn-eu.com type=FWD address-list=allow-domains match-subdomain=yes forward-to=localhost
|
||||
|
||||
@@ -613,6 +613,7 @@ thetruestory.news
|
||||
threads.net
|
||||
threema.ch
|
||||
ti.com
|
||||
tidal.com
|
||||
tik-tokapi.com
|
||||
tiktok.com
|
||||
tiktokcdn-eu.com
|
||||
|
||||
9
Subnets/IPv4/discord.lst
Normal file
9
Subnets/IPv4/discord.lst
Normal file
@@ -0,0 +1,9 @@
|
||||
138.128.136.0/21
|
||||
162.158.0.0/15
|
||||
172.64.0.0/13
|
||||
34.0.0.0/15
|
||||
34.2.0.0/15
|
||||
35.192.0.0/12
|
||||
35.208.0.0/12
|
||||
5.200.14.128/25
|
||||
66.22.192.0/18
|
||||
26
Subnets/IPv4/meta.lst
Normal file
26
Subnets/IPv4/meta.lst
Normal file
@@ -0,0 +1,26 @@
|
||||
31.13.24.0/21
|
||||
31.13.64.0/18
|
||||
45.64.40.0/22
|
||||
57.141.0.0/24
|
||||
57.141.3.0/24
|
||||
57.141.5.0/24
|
||||
57.141.7.0/24
|
||||
57.141.8.0/24
|
||||
57.141.10.0/24
|
||||
57.141.13.0/24
|
||||
57.144.0.0/14
|
||||
66.220.144.0/20
|
||||
69.63.176.0/20
|
||||
69.171.224.0/19
|
||||
74.119.76.0/22
|
||||
102.132.96.0/20
|
||||
103.4.96.0/22
|
||||
129.134.0.0/17
|
||||
157.240.0.0/17
|
||||
157.240.192.0/18
|
||||
163.70.128.0/17
|
||||
173.252.64.0/18
|
||||
179.60.192.0/22
|
||||
185.60.216.0/22
|
||||
185.89.216.0/22
|
||||
204.15.20.0/22
|
||||
13
Subnets/IPv4/twitter.lst
Normal file
13
Subnets/IPv4/twitter.lst
Normal file
@@ -0,0 +1,13 @@
|
||||
64.63.0.0/18
|
||||
69.195.160.0/19
|
||||
103.252.112.0/22
|
||||
104.244.40.0/23
|
||||
104.244.42.0/24
|
||||
104.244.44.0/22
|
||||
188.64.224.0/21
|
||||
192.133.76.0/22
|
||||
199.16.156.0/22
|
||||
199.59.148.0/22
|
||||
199.96.56.0/23
|
||||
202.160.128.0/22
|
||||
209.237.192.0/19
|
||||
1
Subnets/IPv6/discord.lst
Normal file
1
Subnets/IPv6/discord.lst
Normal file
@@ -0,0 +1 @@
|
||||
2606:4700::/32
|
||||
2
Subnets/IPv6/meta.lst
Normal file
2
Subnets/IPv6/meta.lst
Normal file
@@ -0,0 +1,2 @@
|
||||
2620:0:1c00::/40
|
||||
2a03:2880::/32
|
||||
3
Subnets/IPv6/twitter.lst
Normal file
3
Subnets/IPv6/twitter.lst
Normal file
@@ -0,0 +1,3 @@
|
||||
2400:6680:f000::/36
|
||||
2606:1f80:f000::/36
|
||||
2a04:9d40:f000::/36
|
||||
18
convert.py
18
convert.py
@@ -16,9 +16,9 @@ rusDomainsOutsideSrc='src/Russia-domains-outside.lst'
|
||||
rusDomainsOutsideOut='Russia/outside'
|
||||
uaDomainsSrc='src/Ukraine-domains-inside.lst'
|
||||
uaDomainsOut='Ukraine/inside'
|
||||
DiscordSubnets = 'Subnets/IPv4/Discord.lst'
|
||||
MetaSubnets = 'Subnets/IPv4/Meta.lst'
|
||||
TwitterSubnets = 'Subnets/IPv4/Twitter.lst'
|
||||
DiscordSubnets = 'Subnets/IPv4/discord.lst'
|
||||
MetaSubnets = 'Subnets/IPv4/meta.lst'
|
||||
TwitterSubnets = 'Subnets/IPv4/twitter.lst'
|
||||
|
||||
def raw(src, out):
|
||||
domains = set()
|
||||
@@ -267,7 +267,7 @@ def generate_srs_subnets(input_file, output_json_directory='JSON', compiled_outp
|
||||
if subnet:
|
||||
subnets.append(subnet)
|
||||
|
||||
if input_file == "Subnets/IPv4/Discord.lst":
|
||||
if input_file == "Subnets/IPv4/discord.lst":
|
||||
data = {
|
||||
"version": 2,
|
||||
"rules": [
|
||||
@@ -290,14 +290,14 @@ def generate_srs_subnets(input_file, output_json_directory='JSON', compiled_outp
|
||||
}
|
||||
|
||||
filename = os.path.splitext(os.path.basename(input_file))[0]
|
||||
output_file_path = os.path.join(output_json_directory, f"{filename}-subnets.json")
|
||||
output_file_path = os.path.join(output_json_directory, f"{filename}_subnets.json")
|
||||
|
||||
with open(output_file_path, 'w', encoding='utf-8') as output_file:
|
||||
json.dump(data, output_file, indent=4)
|
||||
|
||||
print(f"JSON file generated: {output_file_path}")
|
||||
|
||||
srs_file_path = os.path.join(compiled_output_directory, f"{filename}-subnets.srs")
|
||||
srs_file_path = os.path.join(compiled_output_directory, f"{filename}_subnets.srs")
|
||||
try:
|
||||
subprocess.run(
|
||||
["sing-box", "rule-set", "compile", output_file_path, "-o", srs_file_path], check=True
|
||||
@@ -351,9 +351,9 @@ if __name__ == '__main__':
|
||||
russia_inside = domains_from_file('Russia/inside-raw.lst')
|
||||
russia_outside = domains_from_file('Russia/outside-raw.lst')
|
||||
ukraine_inside = domains_from_file('Ukraine/inside-raw.lst')
|
||||
generate_srs_domains(russia_inside, 'russia-inside')
|
||||
generate_srs_domains(russia_outside, 'russia-outside')
|
||||
generate_srs_domains(ukraine_inside, 'ukraine-inside')
|
||||
generate_srs_domains(russia_inside, 'russia_inside')
|
||||
generate_srs_domains(russia_outside, 'russia_outside')
|
||||
generate_srs_domains(ukraine_inside, 'ukraine_inside')
|
||||
|
||||
# Sing-box categories
|
||||
directories = ['Categories', 'Services']
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
import ipaddress
|
||||
import urllib.request
|
||||
import os
|
||||
import shutil
|
||||
|
||||
BGP_TOOLS_URL = 'https://bgp.tools/table.txt'
|
||||
USER_AGENT = 'itdog.info - hi@itdog.info'
|
||||
@@ -11,14 +13,14 @@ IPv6_DIR = 'Subnets/IPv6'
|
||||
|
||||
AS_META = '32934'
|
||||
AS_TWITTER = '13414'
|
||||
META = 'Meta.lst'
|
||||
TWITTER = 'Twitter.lst'
|
||||
META = 'meta.lst'
|
||||
TWITTER = 'twitter.lst'
|
||||
|
||||
# From https://iplist.opencck.org/
|
||||
DISCORD_VOICE_V4='https://iplist.opencck.org/?format=text&data=cidr4&site=discord.gg&site=discord.media'
|
||||
DISCORD_VOICE_V6='https://iplist.opencck.org/?format=text&data=cidr6&site=discord.gg&site=discord.media'
|
||||
|
||||
DISCORD = 'Discord.lst'
|
||||
DISCORD = 'discord.lst'
|
||||
|
||||
subnet_list = []
|
||||
|
||||
@@ -80,6 +82,11 @@ def write_subnets_to_file(subnets, filename):
|
||||
for subnet in subnets:
|
||||
file.write(f'{subnet}\n')
|
||||
|
||||
def copy_file_legacy(src_filename):
|
||||
base_filename = os.path.basename(src_filename)
|
||||
new_filename = base_filename.capitalize()
|
||||
shutil.copy(src_filename, os.path.join(os.path.dirname(src_filename), new_filename))
|
||||
|
||||
if __name__ == '__main__':
|
||||
request = urllib.request.Request(BGP_TOOLS_URL, headers={'User-Agent': USER_AGENT})
|
||||
|
||||
@@ -102,4 +109,12 @@ if __name__ == '__main__':
|
||||
# Discord voice
|
||||
ipv4_discord, ipv6_discord = download_ready_subnets(DISCORD_VOICE_V4, DISCORD_VOICE_V6)
|
||||
write_subnets_to_file(ipv4_discord, f'{IPv4_DIR}/{DISCORD}')
|
||||
write_subnets_to_file(ipv6_discord, f'{IPv6_DIR}/{DISCORD}')
|
||||
write_subnets_to_file(ipv6_discord, f'{IPv6_DIR}/{DISCORD}')
|
||||
|
||||
# Legacy name
|
||||
copy_file_legacy(f'{IPv4_DIR}/{META}')
|
||||
copy_file_legacy(f'{IPv6_DIR}/{META}')
|
||||
copy_file_legacy(f'{IPv4_DIR}/{TWITTER}')
|
||||
copy_file_legacy(f'{IPv6_DIR}/{TWITTER}')
|
||||
copy_file_legacy(f'{IPv4_DIR}/{DISCORD}')
|
||||
copy_file_legacy(f'{IPv6_DIR}/{DISCORD}')
|
||||
Reference in New Issue
Block a user