mirror of
https://github.com/itdoginfo/allow-domains.git
synced 2026-04-04 13:38:51 +03:00
Compare commits
10 Commits
2025-12-22
...
2025-12-24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fb8b30daf | ||
|
|
5aaf7ef0b1 | ||
|
|
817025a2d7 | ||
|
|
b6b253d6af | ||
|
|
942e30088c | ||
|
|
409892ad5e | ||
|
|
15e58896c1 | ||
|
|
1c3e7dd01b | ||
|
|
7ccf55a877 | ||
|
|
896b4a93dc |
2
.github/workflows/create-lists.yml
vendored
2
.github/workflows/create-lists.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
-v ${{ github.workspace }}/Services:/app/Services \
|
||||
-v ${{ github.workspace }}/SRS:/app/SRS \
|
||||
-v ${{ github.workspace }}/DAT:/app/DAT \
|
||||
itdoginfo/compilesrs:0.1.21
|
||||
itdoginfo/compilesrs:0.1.22
|
||||
|
||||
- name: Check Russia/inside-dnsmasq-ipset
|
||||
uses: itdoginfo/dnsmasq-action@0.1
|
||||
|
||||
10
Dockerfile
10
Dockerfile
@@ -1,17 +1,19 @@
|
||||
FROM ghcr.io/sagernet/sing-box:v1.11.15 AS sing-box
|
||||
|
||||
FROM golang:1.22.12-alpine3.21 AS go-builder
|
||||
FROM golang:1.25.5-alpine3.23 AS go-builder
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux go install -ldflags="-s -w" \
|
||||
github.com/v2fly/domain-list-community@20250207120917
|
||||
github.com/v2fly/domain-list-community@20251222003838
|
||||
|
||||
FROM python:3.10.16-alpine3.21
|
||||
FROM python:3.12.12-alpine3.23
|
||||
|
||||
COPY --from=sing-box /usr/local/bin/sing-box /bin/sing-box
|
||||
|
||||
COPY --from=go-builder /go/bin/domain-list-community /bin/domain-list-community
|
||||
|
||||
RUN pip install --no-cache-dir tldextract
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
|
||||
RUN pip install --no-cache-dir -r /app/requirements.txt
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
- Tik-Tok
|
||||
- Twitter
|
||||
- YouTube
|
||||
- Discord (domains only)
|
||||
|
||||
#### Russia outside
|
||||
Списки российских ресурсов, которые доступны только для российских подсетей. Для людей за границей, которым нужен доступ к российским сервисам.
|
||||
|
||||
4
Services/roblox.lst
Normal file
4
Services/roblox.lst
Normal file
@@ -0,0 +1,4 @@
|
||||
roblox.com
|
||||
rbxcdn.com
|
||||
robloxdev.com
|
||||
rbxinfra.net
|
||||
2
Subnets/IPv4/roblox.lst
Normal file
2
Subnets/IPv4/roblox.lst
Normal file
@@ -0,0 +1,2 @@
|
||||
128.116.0.0/17
|
||||
209.206.40.0/21
|
||||
56
convert.py
56
convert.py
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python3.10
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import tldextract
|
||||
import urllib.request
|
||||
@@ -25,7 +25,8 @@ HetznerSubnets = 'Subnets/IPv4/hetzner.lst'
|
||||
OVHSubnets = 'Subnets/IPv4/ovh.lst'
|
||||
DigitalOceanSubnets = 'Subnets/IPv4/digitalocean.lst'
|
||||
CloudfrontSubnets = 'Subnets/IPv4/cloudfront.lst'
|
||||
ExcludeServices = {"telegram.lst", "cloudflare.lst", "google_ai.lst", "google_play.lst", 'hetzner.lst', 'ovh.lst', 'digitalocean.lst', 'cloudfront.lst', 'hodca.lst'}
|
||||
RobloxSubnets = 'Subnets/IPv4/roblox.lst'
|
||||
ExcludeServices = {"telegram.lst", "cloudflare.lst", "google_ai.lst", "google_play.lst", 'hetzner.lst', 'ovh.lst', 'digitalocean.lst', 'cloudfront.lst', 'hodca.lst', 'roblox.lst'}
|
||||
|
||||
def raw(src, out):
|
||||
domains = set()
|
||||
@@ -57,7 +58,6 @@ def raw(src, out):
|
||||
|
||||
def dnsmasq(src, out, remove={'google.com'}):
|
||||
domains = set()
|
||||
domains_single = set()
|
||||
files = []
|
||||
|
||||
if isinstance(src, list):
|
||||
@@ -91,7 +91,6 @@ def dnsmasq(src, out, remove={'google.com'}):
|
||||
|
||||
def clashx(src, out, remove={'google.com'}):
|
||||
domains = set()
|
||||
domains_single = set()
|
||||
files = []
|
||||
|
||||
if isinstance(src, list):
|
||||
@@ -120,7 +119,6 @@ def clashx(src, out, remove={'google.com'}):
|
||||
|
||||
def kvas(src, out, remove={'google.com'}):
|
||||
domains = set()
|
||||
domains_single = set()
|
||||
files = []
|
||||
|
||||
if isinstance(src, list):
|
||||
@@ -149,7 +147,6 @@ def kvas(src, out, remove={'google.com'}):
|
||||
|
||||
def mikrotik_fwd(src, out, remove={'google.com'}):
|
||||
domains = set()
|
||||
domains_single = set()
|
||||
files = []
|
||||
|
||||
if isinstance(src, list):
|
||||
@@ -226,7 +223,7 @@ def generate_srs_for_categories(directories, output_json_directory='JSON', compi
|
||||
os.makedirs(output_json_directory, exist_ok=True)
|
||||
os.makedirs(compiled_output_directory, exist_ok=True)
|
||||
|
||||
exclude = {"meta", "twitter", "discord", "telegram", "hetzner", "ovh", "digitalocean", "cloudfront"}
|
||||
exclude = {"meta", "twitter", "discord", "telegram", "hetzner", "ovh", "digitalocean", "cloudfront", "roblox"}
|
||||
|
||||
for directory in directories:
|
||||
for filename in os.listdir(directory):
|
||||
@@ -242,21 +239,21 @@ def generate_srs_for_categories(directories, output_json_directory='JSON', compi
|
||||
if domain:
|
||||
domains.append(domain)
|
||||
|
||||
data = {
|
||||
"version": 3,
|
||||
"rules": [
|
||||
{
|
||||
"domain_suffix": domains
|
||||
}
|
||||
]
|
||||
}
|
||||
data = {
|
||||
"version": 3,
|
||||
"rules": [
|
||||
{
|
||||
"domain_suffix": domains
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
output_file_path = os.path.join(output_json_directory, f"{os.path.splitext(filename)[0]}.json")
|
||||
output_file_path = os.path.join(output_json_directory, f"{os.path.splitext(filename)[0]}.json")
|
||||
|
||||
with open(output_file_path, 'w', encoding='utf-8') as output_file:
|
||||
json.dump(data, output_file, indent=4)
|
||||
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}")
|
||||
print(f"JSON file generated: {output_file_path}")
|
||||
|
||||
print("\nCompile JSON files to .srs files...")
|
||||
for filename in os.listdir(output_json_directory):
|
||||
@@ -335,6 +332,18 @@ def generate_srs_combined(input_subnets_file, input_domains_file, output_json_di
|
||||
}
|
||||
]
|
||||
}
|
||||
elif input_subnets_file == "Subnets/IPv4/telegram.lst" and input_domains_file == "voice_messengers":
|
||||
data = {
|
||||
"version": 3,
|
||||
"rules": [
|
||||
{
|
||||
"network": ["udp"],
|
||||
"ip_cidr": subnets,
|
||||
"port": [1400],
|
||||
"port_range": ["596:599"]
|
||||
}
|
||||
]
|
||||
}
|
||||
else:
|
||||
data = {
|
||||
"version": 3,
|
||||
@@ -346,7 +355,10 @@ def generate_srs_combined(input_subnets_file, input_domains_file, output_json_di
|
||||
]
|
||||
}
|
||||
|
||||
filename = os.path.splitext(os.path.basename(input_subnets_file))[0]
|
||||
if input_domains_file == "voice_messengers":
|
||||
filename = "voice_messengers"
|
||||
else:
|
||||
filename = os.path.splitext(os.path.basename(input_subnets_file))[0]
|
||||
output_file_path = os.path.join(output_json_directory, f"{filename}.json")
|
||||
|
||||
with open(output_file_path, 'w', encoding='utf-8') as output_file:
|
||||
@@ -491,6 +503,10 @@ if __name__ == '__main__':
|
||||
generate_srs_combined(OVHSubnets, "Services/ovh.lst")
|
||||
generate_srs_combined(DigitalOceanSubnets, "Services/digitalocean.lst")
|
||||
generate_srs_combined(CloudfrontSubnets, "Services/cloudfront.lst")
|
||||
generate_srs_combined(RobloxSubnets, "Services/roblox.lst")
|
||||
|
||||
# Sing-box voice for messengers
|
||||
generate_srs_combined(TelegramSubnets, "voice_messengers")
|
||||
|
||||
# Xray domains
|
||||
prepare_dat_domains(russia_inside, 'russia-inside', directories)
|
||||
|
||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
tldextract
|
||||
15
shell.nix
Normal file
15
shell.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
python312
|
||||
python312Packages.tldextract
|
||||
sing-box
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "Environment ready!"
|
||||
echo "Python version: $(python --version)"
|
||||
echo "sing-box version: $(sing-box version 2>/dev/null || echo 'not available')"
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user