mirror of
https://github.com/itdoginfo/allow-domains.git
synced 2026-01-26 04:27:16 +03:00
Compare commits
6 Commits
2025-08-28
...
2025-08-28
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2ba8c468e | ||
|
|
689048525d | ||
|
|
76807d2e76 | ||
|
|
219dc6b847 | ||
|
|
d6db5a3e02 | ||
|
|
9887fa722d |
7
.github/workflows/create-lists.yml
vendored
7
.github/workflows/create-lists.yml
vendored
@@ -9,6 +9,7 @@ on:
|
||||
- Services/**
|
||||
- src/**
|
||||
- convert.py
|
||||
- get-subnets.py
|
||||
schedule:
|
||||
- cron: '29 8 * * 1'
|
||||
|
||||
@@ -19,7 +20,7 @@ jobs:
|
||||
generate-lists:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@v4.3.0
|
||||
- name: Compile ruleset srs
|
||||
run: |
|
||||
docker run --rm \
|
||||
@@ -65,7 +66,7 @@ jobs:
|
||||
version: 2.89
|
||||
|
||||
- name: Push lists
|
||||
uses: EndBug/add-and-commit@v9
|
||||
uses: EndBug/add-and-commit@v9.1.4
|
||||
with:
|
||||
add: 'Russia Ukraine'
|
||||
author_name: GitHub Action
|
||||
@@ -77,7 +78,7 @@ jobs:
|
||||
run: echo "TAG_NAME=$(date +'%Y-%m-%d_%H-%M')" >> $GITHUB_ENV
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2.2.2
|
||||
uses: softprops/action-gh-release@v2.3.2
|
||||
with:
|
||||
files: |
|
||||
${{ github.workspace }}/SRS/*.srs
|
||||
|
||||
194
Subnets/IPv4/cloudfront.lst
Normal file
194
Subnets/IPv4/cloudfront.lst
Normal file
@@ -0,0 +1,194 @@
|
||||
120.52.22.96/27
|
||||
205.251.249.0/24
|
||||
180.163.57.128/26
|
||||
204.246.168.0/22
|
||||
111.13.171.128/26
|
||||
18.160.0.0/15
|
||||
205.251.252.0/23
|
||||
54.192.0.0/16
|
||||
204.246.173.0/24
|
||||
54.230.200.0/21
|
||||
120.253.240.192/26
|
||||
116.129.226.128/26
|
||||
130.176.0.0/17
|
||||
3.173.192.0/18
|
||||
108.156.0.0/14
|
||||
99.86.0.0/16
|
||||
13.32.0.0/15
|
||||
120.253.245.128/26
|
||||
13.224.0.0/14
|
||||
70.132.0.0/18
|
||||
15.158.0.0/16
|
||||
111.13.171.192/26
|
||||
13.249.0.0/16
|
||||
18.238.0.0/15
|
||||
18.244.0.0/15
|
||||
205.251.208.0/20
|
||||
3.165.0.0/16
|
||||
3.168.0.0/14
|
||||
65.9.128.0/18
|
||||
130.176.128.0/18
|
||||
58.254.138.0/25
|
||||
205.251.206.0/23
|
||||
54.230.208.0/20
|
||||
3.160.0.0/14
|
||||
116.129.226.0/25
|
||||
23.91.0.0/19
|
||||
52.222.128.0/17
|
||||
18.164.0.0/15
|
||||
111.13.185.32/27
|
||||
64.252.128.0/18
|
||||
205.251.254.0/24
|
||||
3.166.0.0/15
|
||||
54.230.224.0/19
|
||||
71.152.0.0/17
|
||||
216.137.32.0/19
|
||||
204.246.172.0/24
|
||||
205.251.202.0/23
|
||||
18.172.0.0/15
|
||||
120.52.39.128/27
|
||||
118.193.97.64/26
|
||||
3.164.64.0/18
|
||||
18.154.0.0/15
|
||||
3.173.0.0/17
|
||||
54.240.128.0/18
|
||||
205.251.250.0/23
|
||||
180.163.57.0/25
|
||||
52.46.0.0/18
|
||||
3.174.0.0/15
|
||||
52.82.128.0/19
|
||||
54.230.0.0/17
|
||||
54.230.128.0/18
|
||||
54.239.128.0/18
|
||||
130.176.224.0/20
|
||||
36.103.232.128/26
|
||||
52.84.0.0/15
|
||||
143.204.0.0/16
|
||||
144.220.0.0/16
|
||||
120.52.153.192/26
|
||||
119.147.182.0/25
|
||||
120.232.236.0/25
|
||||
111.13.185.64/27
|
||||
3.164.0.0/18
|
||||
3.172.64.0/18
|
||||
54.182.0.0/16
|
||||
58.254.138.128/26
|
||||
120.253.245.192/27
|
||||
54.239.192.0/19
|
||||
18.68.0.0/16
|
||||
18.64.0.0/14
|
||||
120.52.12.64/26
|
||||
24.110.32.0/19
|
||||
99.84.0.0/16
|
||||
205.251.204.0/23
|
||||
130.176.192.0/19
|
||||
52.124.128.0/17
|
||||
204.246.164.0/22
|
||||
13.35.0.0/16
|
||||
204.246.174.0/23
|
||||
3.164.128.0/17
|
||||
3.172.0.0/18
|
||||
36.103.232.0/25
|
||||
119.147.182.128/26
|
||||
118.193.97.128/25
|
||||
120.232.236.128/26
|
||||
204.246.176.0/20
|
||||
65.8.0.0/16
|
||||
65.9.0.0/17
|
||||
108.138.0.0/15
|
||||
120.253.241.160/27
|
||||
3.173.128.0/18
|
||||
64.252.64.0/18
|
||||
13.113.196.64/26
|
||||
13.113.203.0/24
|
||||
52.199.127.192/26
|
||||
57.182.253.0/24
|
||||
57.183.42.0/25
|
||||
13.124.199.0/24
|
||||
3.35.130.128/25
|
||||
52.78.247.128/26
|
||||
13.203.133.0/26
|
||||
13.233.177.192/26
|
||||
15.207.13.128/25
|
||||
15.207.213.128/25
|
||||
52.66.194.128/26
|
||||
13.228.69.0/24
|
||||
47.129.82.0/24
|
||||
47.129.83.0/24
|
||||
47.129.84.0/24
|
||||
52.220.191.0/26
|
||||
13.210.67.128/26
|
||||
13.54.63.128/26
|
||||
3.107.43.128/25
|
||||
3.107.44.0/25
|
||||
3.107.44.128/25
|
||||
43.218.56.128/26
|
||||
43.218.56.192/26
|
||||
43.218.56.64/26
|
||||
43.218.71.0/26
|
||||
99.79.169.0/24
|
||||
18.192.142.0/23
|
||||
18.199.68.0/22
|
||||
18.199.72.0/22
|
||||
18.199.76.0/22
|
||||
35.158.136.0/24
|
||||
52.57.254.0/24
|
||||
18.200.212.0/23
|
||||
52.212.248.0/26
|
||||
13.134.24.0/23
|
||||
13.134.94.0/23
|
||||
18.175.65.0/24
|
||||
18.175.66.0/24
|
||||
18.175.67.0/24
|
||||
3.10.17.128/25
|
||||
3.11.53.0/24
|
||||
52.56.127.0/25
|
||||
15.188.184.0/24
|
||||
51.44.234.0/23
|
||||
51.44.236.0/23
|
||||
51.44.238.0/23
|
||||
52.47.139.0/24
|
||||
3.29.40.128/26
|
||||
3.29.40.192/26
|
||||
3.29.40.64/26
|
||||
3.29.57.0/26
|
||||
18.229.220.192/26
|
||||
18.230.229.0/24
|
||||
18.230.230.0/25
|
||||
54.233.255.128/26
|
||||
56.125.46.0/24
|
||||
56.125.47.0/32
|
||||
56.125.48.0/24
|
||||
3.231.2.0/25
|
||||
3.234.232.224/27
|
||||
3.236.169.192/26
|
||||
3.236.48.0/23
|
||||
34.195.252.0/24
|
||||
34.226.14.0/24
|
||||
44.220.194.0/23
|
||||
44.220.196.0/23
|
||||
44.220.198.0/23
|
||||
44.220.200.0/23
|
||||
44.220.202.0/23
|
||||
44.222.66.0/24
|
||||
13.59.250.0/26
|
||||
18.216.170.128/25
|
||||
3.128.93.0/24
|
||||
3.134.215.0/24
|
||||
3.146.232.0/22
|
||||
3.147.164.0/22
|
||||
3.147.244.0/22
|
||||
52.15.127.128/26
|
||||
3.101.158.0/23
|
||||
52.52.191.128/26
|
||||
34.216.51.0/25
|
||||
34.223.12.224/27
|
||||
34.223.80.192/26
|
||||
35.162.63.192/26
|
||||
35.167.191.128/26
|
||||
35.93.168.0/23
|
||||
35.93.170.0/23
|
||||
35.93.172.0/23
|
||||
44.227.178.0/24
|
||||
44.234.108.128/25
|
||||
44.234.90.252/30
|
||||
158
Subnets/IPv4/do.lst
Normal file
158
Subnets/IPv4/do.lst
Normal file
@@ -0,0 +1,158 @@
|
||||
5.42.203.0/24
|
||||
5.101.96.0/20
|
||||
24.144.64.0/21
|
||||
24.144.76.0/22
|
||||
24.144.80.0/20
|
||||
24.144.96.0/19
|
||||
24.199.64.0/18
|
||||
37.139.0.0/19
|
||||
45.55.0.0/16
|
||||
46.101.0.0/16
|
||||
64.23.128.0/17
|
||||
64.225.0.0/17
|
||||
64.226.64.0/18
|
||||
64.227.0.0/17
|
||||
64.227.128.0/18
|
||||
67.205.128.0/18
|
||||
67.207.64.0/23
|
||||
67.207.66.0/24
|
||||
67.207.68.0/22
|
||||
67.207.72.0/21
|
||||
67.207.80.0/20
|
||||
68.183.0.0/16
|
||||
69.55.48.0/22
|
||||
69.55.54.0/23
|
||||
69.55.58.0/23
|
||||
69.55.60.0/22
|
||||
74.121.232.0/24
|
||||
80.240.128.0/20
|
||||
82.196.0.0/20
|
||||
95.85.0.0/18
|
||||
103.253.144.0/22
|
||||
104.131.0.0/16
|
||||
104.236.0.0/16
|
||||
104.248.0.0/16
|
||||
107.170.0.0/16
|
||||
128.199.0.0/16
|
||||
129.212.132.0/22
|
||||
129.212.136.0/21
|
||||
129.212.144.0/20
|
||||
129.212.160.0/21
|
||||
129.212.168.0/22
|
||||
129.212.176.0/20
|
||||
129.212.192.0/20
|
||||
129.212.208.0/22
|
||||
134.122.0.0/17
|
||||
134.199.128.0/17
|
||||
134.209.0.0/16
|
||||
137.184.0.0/17
|
||||
137.184.128.0/18
|
||||
137.184.192.0/19
|
||||
137.184.224.0/20
|
||||
137.184.240.0/21
|
||||
137.184.248.0/22
|
||||
137.184.252.0/24
|
||||
137.184.254.0/23
|
||||
138.68.0.0/19
|
||||
138.68.32.0/24
|
||||
138.68.34.0/24
|
||||
138.68.36.0/22
|
||||
138.68.40.0/21
|
||||
138.68.48.0/20
|
||||
138.68.64.0/18
|
||||
138.68.128.0/17
|
||||
138.197.0.0/17
|
||||
138.197.128.0/18
|
||||
138.197.192.0/19
|
||||
138.197.224.0/20
|
||||
138.197.240.0/22
|
||||
138.197.252.0/22
|
||||
139.59.0.0/16
|
||||
141.0.169.0/24
|
||||
141.0.170.0/24
|
||||
142.93.0.0/16
|
||||
143.110.128.0/17
|
||||
143.198.0.0/17
|
||||
143.198.128.0/18
|
||||
143.198.192.0/19
|
||||
143.198.224.0/20
|
||||
143.198.240.0/21
|
||||
143.198.248.0/22
|
||||
143.244.128.0/18
|
||||
143.244.196.0/22
|
||||
143.244.200.0/21
|
||||
143.244.208.0/21
|
||||
143.244.217.0/24
|
||||
143.244.218.0/23
|
||||
143.244.220.0/22
|
||||
144.126.192.0/18
|
||||
146.185.128.0/18
|
||||
146.190.0.0/17
|
||||
146.190.128.0/19
|
||||
146.190.160.0/20
|
||||
146.190.176.0/22
|
||||
146.190.184.0/21
|
||||
146.190.192.0/18
|
||||
147.182.128.0/17
|
||||
151.241.19.0/24
|
||||
152.42.128.0/17
|
||||
157.230.0.0/16
|
||||
157.245.0.0/16
|
||||
159.65.0.0/16
|
||||
159.89.0.0/19
|
||||
159.89.32.0/20
|
||||
159.89.48.0/21
|
||||
159.89.58.0/23
|
||||
159.89.60.0/22
|
||||
159.89.64.0/18
|
||||
159.89.128.0/17
|
||||
159.203.0.0/16
|
||||
159.223.0.0/17
|
||||
159.223.128.0/18
|
||||
159.223.192.0/19
|
||||
159.223.224.0/20
|
||||
159.223.240.0/21
|
||||
159.223.248.0/22
|
||||
161.35.0.0/16
|
||||
162.243.0.0/17
|
||||
162.243.128.0/19
|
||||
162.243.160.0/20
|
||||
162.243.184.0/21
|
||||
162.243.192.0/18
|
||||
163.47.8.0/22
|
||||
164.90.128.0/18
|
||||
164.90.192.0/19
|
||||
164.90.224.0/20
|
||||
164.90.240.0/21
|
||||
164.90.248.0/23
|
||||
164.90.250.0/24
|
||||
164.90.252.0/22
|
||||
164.92.64.0/18
|
||||
164.92.128.0/17
|
||||
165.22.0.0/16
|
||||
165.227.0.0/16
|
||||
165.232.32.0/19
|
||||
165.232.64.0/18
|
||||
165.232.128.0/18
|
||||
167.71.0.0/16
|
||||
167.99.0.0/16
|
||||
167.172.0.0/16
|
||||
170.64.128.0/17
|
||||
174.138.0.0/17
|
||||
178.62.0.0/16
|
||||
178.128.0.0/16
|
||||
185.14.184.0/22
|
||||
188.166.0.0/16
|
||||
188.226.128.0/17
|
||||
192.34.56.0/21
|
||||
192.81.208.0/20
|
||||
192.241.128.0/17
|
||||
198.199.64.0/18
|
||||
198.211.96.0/19
|
||||
204.48.16.0/20
|
||||
206.81.0.0/19
|
||||
206.189.0.0/16
|
||||
207.154.192.0/18
|
||||
208.68.36.0/22
|
||||
209.38.0.0/16
|
||||
209.97.128.0/18
|
||||
@@ -27,6 +27,7 @@
|
||||
23.230.14.0/24
|
||||
31.6.62.0/24
|
||||
31.41.37.0/24
|
||||
31.56.47.0/24
|
||||
31.56.52.0/22
|
||||
31.56.77.0/24
|
||||
31.56.190.0/24
|
||||
@@ -41,7 +42,6 @@
|
||||
37.202.202.0/24
|
||||
37.230.48.0/24
|
||||
37.230.54.0/24
|
||||
37.230.63.0/24
|
||||
40.160.0.0/17
|
||||
40.160.224.0/22
|
||||
40.160.228.0/24
|
||||
@@ -55,6 +55,7 @@
|
||||
43.226.0.0/23
|
||||
45.39.79.0/24
|
||||
45.43.142.0/24
|
||||
45.62.167.0/24
|
||||
45.66.82.0/23
|
||||
45.92.60.0/22
|
||||
45.93.184.0/23
|
||||
@@ -128,14 +129,17 @@
|
||||
77.81.138.0/24
|
||||
77.83.244.0/24
|
||||
77.246.211.0/24
|
||||
78.31.248.0/24
|
||||
79.110.61.0/24
|
||||
79.137.0.0/17
|
||||
80.71.226.0/24
|
||||
80.87.206.0/24
|
||||
81.199.114.0/24
|
||||
82.21.139.0/24
|
||||
82.22.118.0/24
|
||||
82.24.96.0/22
|
||||
82.25.146.0/23
|
||||
82.25.200.0/24
|
||||
82.26.176.0/20
|
||||
82.117.230.0/23
|
||||
82.117.245.0/24
|
||||
@@ -156,6 +160,7 @@
|
||||
85.217.144.0/23
|
||||
86.54.24.0/24
|
||||
86.110.56.0/24
|
||||
86.110.58.0/24
|
||||
87.98.128.0/17
|
||||
87.229.8.0/24
|
||||
87.229.64.0/24
|
||||
@@ -164,6 +169,8 @@
|
||||
89.19.44.0/24
|
||||
89.39.120.0/24
|
||||
89.213.50.0/24
|
||||
89.213.145.0/24
|
||||
89.213.154.0/24
|
||||
89.251.28.0/24
|
||||
91.90.88.0/21
|
||||
91.121.0.0/16
|
||||
@@ -183,6 +190,7 @@
|
||||
92.118.168.0/24
|
||||
92.222.0.0/16
|
||||
92.246.224.0/19
|
||||
93.88.206.0/24
|
||||
93.95.113.0/24
|
||||
93.114.69.0/24
|
||||
93.174.111.0/24
|
||||
@@ -258,9 +266,11 @@
|
||||
146.19.9.0/24
|
||||
146.59.0.0/16
|
||||
146.103.10.0/24
|
||||
147.79.3.0/24
|
||||
147.135.0.0/16
|
||||
148.113.0.0/18
|
||||
148.113.128.0/17
|
||||
148.135.199.0/24
|
||||
148.222.40.0/22
|
||||
149.56.0.0/16
|
||||
149.202.0.0/16
|
||||
@@ -269,6 +279,7 @@
|
||||
151.240.1.0/24
|
||||
151.240.14.0/24
|
||||
151.240.17.0/24
|
||||
151.240.24.0/24
|
||||
151.241.69.0/24
|
||||
151.242.5.0/24
|
||||
151.242.39.0/24
|
||||
@@ -278,11 +289,14 @@
|
||||
151.242.117.0/24
|
||||
151.242.159.0/24
|
||||
151.243.6.0/24
|
||||
151.243.29.0/24
|
||||
151.243.120.0/24
|
||||
151.243.160.0/22
|
||||
151.244.78.0/24
|
||||
151.245.112.0/24
|
||||
151.247.217.0/24
|
||||
152.228.128.0/17
|
||||
155.117.6.0/24
|
||||
155.117.212.0/23
|
||||
157.254.30.0/24
|
||||
157.254.155.0/24
|
||||
@@ -290,18 +304,21 @@
|
||||
158.69.0.0/16
|
||||
160.20.158.0/23
|
||||
162.19.0.0/16
|
||||
162.141.17.0/24
|
||||
162.141.96.0/24
|
||||
162.141.104.0/23
|
||||
162.141.136.0/23
|
||||
162.212.35.0/24
|
||||
163.5.62.0/24
|
||||
163.5.149.0/24
|
||||
163.5.179.0/24
|
||||
163.5.187.0/24
|
||||
163.223.88.0/24
|
||||
164.132.0.0/16
|
||||
166.1.231.0/24
|
||||
167.114.0.0/16
|
||||
167.148.33.0/24
|
||||
167.148.193.0/24
|
||||
167.234.38.0/24
|
||||
167.253.62.0/24
|
||||
168.245.185.0/24
|
||||
@@ -338,6 +355,7 @@
|
||||
185.155.218.0/24
|
||||
185.170.155.0/24
|
||||
185.196.221.0/24
|
||||
185.200.210.0/24
|
||||
185.207.134.0/24
|
||||
185.213.248.0/24
|
||||
185.216.126.0/24
|
||||
@@ -368,7 +386,7 @@
|
||||
193.8.112.0/24
|
||||
193.17.223.0/24
|
||||
193.32.204.0/24
|
||||
193.32.207.0/24
|
||||
193.32.206.0/23
|
||||
193.33.176.0/23
|
||||
193.43.104.0/24
|
||||
193.70.0.0/17
|
||||
@@ -418,6 +436,7 @@
|
||||
209.126.71.0/24
|
||||
209.151.124.0/24
|
||||
212.38.79.0/24
|
||||
212.116.227.0/24
|
||||
212.192.253.0/24
|
||||
213.32.0.0/17
|
||||
213.130.130.0/24
|
||||
|
||||
27
Subnets/IPv6/cloudfront.lst
Normal file
27
Subnets/IPv6/cloudfront.lst
Normal file
@@ -0,0 +1,27 @@
|
||||
2600:9000:3000::/36
|
||||
2600:9000:f600::/39
|
||||
2600:9000:f540::/42
|
||||
2409:8c00:2421:300::/56
|
||||
2600:9000:f000::/38
|
||||
2600:9000:f500::/43
|
||||
2600:9000:ddd::/48
|
||||
2600:9000:f800::/37
|
||||
2600:9000:f400::/40
|
||||
2600:9000:f538::/45
|
||||
2600:9000:5380::/41
|
||||
2600:9000:1000::/36
|
||||
2600:9000:2000::/36
|
||||
2400:7fc0:500::/40
|
||||
2600:9000:4000::/36
|
||||
2600:9000:fff::/48
|
||||
2409:8c00:2421:400::/56
|
||||
2404:c2c0:500::/40
|
||||
2600:9000:5308::/45
|
||||
2600:9000:f534::/46
|
||||
2600:9000:f520::/44
|
||||
2600:9000:5320::/43
|
||||
2600:9000:5310::/44
|
||||
2600:9000:f580::/41
|
||||
2600:9000:5340::/42
|
||||
2600:9000:eee::/48
|
||||
2600:9000:5200::/40
|
||||
12
Subnets/IPv6/do.lst
Normal file
12
Subnets/IPv6/do.lst
Normal file
@@ -0,0 +1,12 @@
|
||||
2400:6180::/48
|
||||
2400:6180:10::/48
|
||||
2400:6180:100::/40
|
||||
2604:a880::/47
|
||||
2604:a880:2::/48
|
||||
2604:a880:4::/47
|
||||
2604:a880:400::/48
|
||||
2604:a880:800::/48
|
||||
2604:a880:cad::/48
|
||||
2a03:b0c0::/46
|
||||
2a03:b0c0:fffc::/48
|
||||
2a03:b0c0:ffff::/48
|
||||
@@ -4,6 +4,7 @@ import ipaddress
|
||||
import urllib.request
|
||||
import os
|
||||
import shutil
|
||||
import json
|
||||
|
||||
BGP_TOOLS_URL = 'https://bgp.tools/table.txt'
|
||||
HEADERS = { 'User-Agent': 'itdog.info - hi@itdog.info' }
|
||||
@@ -15,6 +16,7 @@ AS_META = '32934'
|
||||
AS_TWITTER = '13414'
|
||||
AS_HETZNER = '24940'
|
||||
AS_OVH = '16276'
|
||||
AS_DO = '14061'
|
||||
|
||||
META = 'meta.lst'
|
||||
TWITTER = 'twitter.lst'
|
||||
@@ -22,6 +24,8 @@ TELEGRAM = 'telegram.lst'
|
||||
CLOUDFLARE = 'cloudflare.lst'
|
||||
HETZNER = 'hetzner.lst'
|
||||
OVH = 'ovh.lst'
|
||||
DO = 'do.lst'
|
||||
CLOUDFRONT = 'cloudfront.lst'
|
||||
|
||||
# From https://iplist.opencck.org/
|
||||
DISCORD_VOICE_V4='https://iplist.opencck.org/?format=text&data=cidr4&site=discord.gg&site=discord.media'
|
||||
@@ -34,6 +38,8 @@ TELEGRAM_CIDR_URL = 'https://core.telegram.org/resources/cidr.txt'
|
||||
CLOUDFLARE_V4='https://www.cloudflare.com/ips-v4'
|
||||
CLOUDFLARE_V6='https://www.cloudflare.com/ips-v6'
|
||||
|
||||
AWS_IP_RANGES_URL='https://ip-ranges.amazonaws.com/ip-ranges.json'
|
||||
|
||||
subnet_list = []
|
||||
|
||||
def subnet_summarization(subnet_list):
|
||||
@@ -98,6 +104,29 @@ def download_ready_split_subnets(url):
|
||||
|
||||
return ipv4_subnets, ipv6_subnets
|
||||
|
||||
def download_aws_cloudfront_subnets():
|
||||
ipv4_subnets = []
|
||||
ipv6_subnets = []
|
||||
|
||||
req = urllib.request.Request(AWS_IP_RANGES_URL, headers=HEADERS)
|
||||
try:
|
||||
with urllib.request.urlopen(req) as response:
|
||||
if response.status == 200:
|
||||
data = json.loads(response.read().decode('utf-8'))
|
||||
|
||||
for prefix in data.get('prefixes', []):
|
||||
if prefix.get('service') == 'CLOUDFRONT':
|
||||
ipv4_subnets.append(prefix['ip_prefix'])
|
||||
|
||||
for prefix in data.get('ipv6_prefixes', []):
|
||||
if prefix.get('service') == 'CLOUDFRONT':
|
||||
ipv6_subnets.append(prefix['ipv6_prefix'])
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error downloading AWS CloudFront ranges: {e}")
|
||||
|
||||
return ipv4_subnets, ipv6_subnets
|
||||
|
||||
def write_subnets_to_file(subnets, filename):
|
||||
with open(filename, 'w') as file:
|
||||
for subnet in subnets:
|
||||
@@ -137,6 +166,11 @@ if __name__ == '__main__':
|
||||
write_subnets_to_file(ipv4_merged_ovh, f'{IPv4_DIR}/{OVH}')
|
||||
write_subnets_to_file(ipv6_merged_ovh, f'{IPv6_DIR}/{OVH}')
|
||||
|
||||
# Digital Ocean
|
||||
ipv4_merged_do, ipv6_merged_do = process_subnets(subnet_list, AS_DO)
|
||||
write_subnets_to_file(ipv4_merged_do, f'{IPv4_DIR}/{DO}')
|
||||
write_subnets_to_file(ipv6_merged_do, f'{IPv6_DIR}/{DO}')
|
||||
|
||||
# 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}')
|
||||
@@ -152,6 +186,11 @@ if __name__ == '__main__':
|
||||
write_subnets_to_file(ipv4_cloudflare, f'{IPv4_DIR}/{CLOUDFLARE}')
|
||||
write_subnets_to_file(ipv6_cloudflare, f'{IPv6_DIR}/{CLOUDFLARE}')
|
||||
|
||||
# AWS CloudFront
|
||||
ipv4_cloudfront, ipv6_cloudfront = download_aws_cloudfront_subnets()
|
||||
write_subnets_to_file(ipv4_cloudfront, f'{IPv4_DIR}/{CLOUDFRONT}')
|
||||
write_subnets_to_file(ipv6_cloudfront, f'{IPv6_DIR}/{CLOUDFRONT}')
|
||||
|
||||
# Legacy name
|
||||
copy_file_legacy(f'{IPv4_DIR}/{META}')
|
||||
copy_file_legacy(f'{IPv6_DIR}/{META}')
|
||||
|
||||
Reference in New Issue
Block a user