Feat: auto generate anti-bogus-domain ip list

This commit is contained in:
SukkaW 2022-04-22 18:02:48 +08:00
parent ee62eaee0e
commit 2e8de6b7f4
4 changed files with 32 additions and 192 deletions

View File

@ -25,9 +25,10 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm i --production
- run: node ./Build/build-reject-domainset.js
- run: node ./Build/build-cidr.js
- run: node ./Build/build-anti-bogus-domain.js
- run: node ./Build/build-apple-cdn.js
- run: node ./Build/build-cidr.js
- run: node ./Build/build-reject-domainset.js
- run: node ./Build/build-index.html.js
- name: Deploy
uses: peaceiris/actions-gh-pages@v3

View File

@ -0,0 +1,26 @@
const { fetch } = require('undici');
const fs = require('fs');
const path = require('path');
const { isIP } = require('net');
(async () => {
const res = (await (await fetch('https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/bogus-nxdomain.china.conf')).text())
.split('\n')
.map(line => {
if (line.startsWith('bogus-nxdomain=')) {
return line.replace('bogus-nxdomain=', '');
}
return null
})
.filter(ip => typeof ip === 'string' && isIP(ip) !== 0);
const filePath = path.resolve(__dirname, '../List/ip/reject.conf');
const content = (await fs.promises.readFile(filePath, 'utf-8'))
.replace(
'# --- [Anti Bogus Domain Replace Me] ---',
res.map(ip => `IP-CIDR,${ip}/32,no-resolve`).join('\n')
);
await fs.promises.writeFile(filePath, content, 'utf-8');
})();

View File

@ -55,192 +55,5 @@ IP-CIDR,220.115.251.25/32,no-resolve
IP-CIDR,222.73.156.235/32,no-resolve
# --- Anti-Bogus Domain ---
# DNSPai
IP-CIDR,123.125.81.12/32,no-resolve
IP-CIDR,101.226.10.8/32,no-resolve
# Level3
IP-CIDR,198.105.254.11/32,no-resolve
IP-CIDR,104.239.213.7/32,no-resolve
## China Telecom
# Anhui Telecom
IP-CIDR,61.191.206.4/32,no-resolve
# Beijing Telecom
IP-CIDR,218.30.64.194/32,no-resolve
# Chengdu Telecom
IP-CIDR,61.139.8.101/32,no-resolve
IP-CIDR,61.139.8.102/32,no-resolve
IP-CIDR,61.139.8.103/32,no-resolve
IP-CIDR,61.139.8.104/32,no-resolve
# Fujian Telecom
IP-CIDR,42.123.125.237/32,no-resolve
# Gansu Telecom
IP-CIDR,202.100.68.117/32,no-resolve
# Guangxi Telecom
IP-CIDR,113.12.83.4/32,no-resolve
IP-CIDR,113.12.83.5/32,no-resolve
# Hainan Telecom
IP-CIDR,202.100.220.54/32,no-resolve
# Hangzhou Telecom
IP-CIDR,60.191.124.236/32,no-resolve
IP-CIDR,60.191.124.252/32,no-resolve
# Hebei Telecom
IP-CIDR,222.221.5.204/32,no-resolve
# Hunan Telecom
IP-CIDR,124.232.132.94/32,no-resolve
# Jiangsu Telecom
IP-CIDR,202.102.110.204/32,no-resolve
# Jiangxi Telecom
IP-CIDR,61.131.208.210/32,no-resolve
IP-CIDR,61.131.208.211/32,no-resolve
# Nanjing Telecom
IP-CIDR,202.102.110.203/32,no-resolve
IP-CIDR,202.102.110.205/32,no-resolve
# Shandong Telecom
IP-CIDR,219.146.13.36/32,no-resolve
# Shanghai Telecom
IP-CIDR,180.168.41.175/32,no-resolve
IP-CIDR,180.153.103.224/32,no-resolve
# Wuhan Telecom
IP-CIDR,111.175.221.58/32,no-resolve
IP-CIDR,61.183.1.186/32,no-resolve
# Xi'an Telecom
IP-CIDR,125.76.239.244/32,no-resolve
IP-CIDR,125.76.239.245/32,no-resolve
# Yunnan Telecom
IP-CIDR,222.221.5.252/32,no-resolve
IP-CIDR,222.221.5.253/32,no-resolve
IP-CIDR,220.165.8.172/32,no-resolve
IP-CIDR,220.165.8.174/32,no-resolve
## China Unicom
# Anhui Unicom
IP-CIDR,112.132.230.179/32,no-resolve
# Beijing Unicom (bjdnserror1.wo.com.cn ~ bjdnserror5.wo.com.cn)
IP-CIDR,202.106.199.34/32,no-resolve
IP-CIDR,202.106.199.35/32,no-resolve
IP-CIDR,202.106.199.36/32,no-resolve
IP-CIDR,202.106.199.37/32,no-resolve
IP-CIDR,202.106.199.38/32,no-resolve
# Hebei Unicom (hbdnserror1.wo.com.cn ~ hbdnserror7.wo.com.cn)
IP-CIDR,221.192.153.41/32,no-resolve
IP-CIDR,221.192.153.42/32,no-resolve
IP-CIDR,221.192.153.43/32,no-resolve
IP-CIDR,221.192.153.44/32,no-resolve
IP-CIDR,221.192.153.45/32,no-resolve
IP-CIDR,221.192.153.46/32,no-resolve
IP-CIDR,221.192.153.49/32,no-resolve
# Heilongjiang Unicom (hljdnserror1.wo.com.cn ~ hljdnserror5.wo.com.cn)
IP-CIDR,125.211.213.130/32,no-resolve
IP-CIDR,125.211.213.131/32,no-resolve
IP-CIDR,125.211.213.132/32,no-resolve
IP-CIDR,125.211.213.133/32,no-resolve
IP-CIDR,125.211.213.134/32,no-resolve
# Henan Unicom (hndnserror1.wo.com.cn ~ hndnserror7.wo.com.cn)
IP-CIDR,218.28.144.36/32,no-resolve
IP-CIDR,218.28.144.37/32,no-resolve
IP-CIDR,218.28.144.38/32,no-resolve
IP-CIDR,218.28.144.39/32,no-resolve
IP-CIDR,218.28.144.40/32,no-resolve
IP-CIDR,218.28.144.41/32,no-resolve
IP-CIDR,218.28.144.42/32,no-resolve
# Jilin Unicom (jldnserror1.wo.com.cn ~ jldnserror5.wo.com.cn)
IP-CIDR,202.98.24.121/32,no-resolve
IP-CIDR,202.98.24.122/32,no-resolve
IP-CIDR,202.98.24.123/32,no-resolve
IP-CIDR,202.98.24.124/32,no-resolve
IP-CIDR,202.98.24.125/32,no-resolve
# Liaoning Unicom (lndnserror1.wo.com.cn ~ lndnserror7.wo.com.cn)
IP-CIDR,60.19.29.21/32,no-resolve
IP-CIDR,60.19.29.22/32,no-resolve
IP-CIDR,60.19.29.23/32,no-resolve
IP-CIDR,60.19.29.24/32,no-resolve
IP-CIDR,60.19.29.25/32,no-resolve
IP-CIDR,60.19.29.26/32,no-resolve
IP-CIDR,60.19.29.27/32,no-resolve
# Nanfang Unicom (nfdnserror1.wo.com.cn ~ nfdnserror17.wo.com.cn)
IP-CIDR,220.250.64.18/32,no-resolve
IP-CIDR,220.250.64.19/32,no-resolve
IP-CIDR,220.250.64.20/32,no-resolve
IP-CIDR,220.250.64.21/32,no-resolve
IP-CIDR,220.250.64.22/32,no-resolve
IP-CIDR,220.250.64.23/32,no-resolve
IP-CIDR,220.250.64.24/32,no-resolve
IP-CIDR,220.250.64.25/32,no-resolve
IP-CIDR,220.250.64.26/32,no-resolve
IP-CIDR,220.250.64.27/32,no-resolve
IP-CIDR,220.250.64.28/32,no-resolve
IP-CIDR,220.250.64.29/32,no-resolve
IP-CIDR,220.250.64.30/32,no-resolve
IP-CIDR,220.250.64.225/32,no-resolve
IP-CIDR,220.250.64.226/32,no-resolve
IP-CIDR,220.250.64.227/32,no-resolve
IP-CIDR,220.250.64.228/32,no-resolve
# Neimenggu Unicom (nmdnserror2.wo.com.cn ~ nmdnserror4.wo.com.cn)
IP-CIDR,202.99.254.231/32,no-resolve
IP-CIDR,202.99.254.232/32,no-resolve
IP-CIDR,202.99.254.230/32,no-resolve
# Shandong Unicom (sddnserror1.wo.com.cn ~ sddnserror9.wo.com.cn)
IP-CIDR,123.129.254.11/32,no-resolve
IP-CIDR,123.129.254.12/32,no-resolve
IP-CIDR,123.129.254.13/32,no-resolve
IP-CIDR,123.129.254.14/32,no-resolve
IP-CIDR,123.129.254.15/32,no-resolve
IP-CIDR,123.129.254.16/32,no-resolve
IP-CIDR,123.129.254.17/32,no-resolve
IP-CIDR,123.129.254.18/32,no-resolve
IP-CIDR,123.129.254.19/32,no-resolve
# Shanxi Unicom (sxdnserror1.wo.com.cn ~ sxdnserror6.wo.com.cn)
IP-CIDR,221.204.244.36/32,no-resolve
IP-CIDR,221.204.244.37/32,no-resolve
IP-CIDR,221.204.244.38/32,no-resolve
IP-CIDR,221.204.244.39/32,no-resolve
IP-CIDR,221.204.244.40/32,no-resolve
IP-CIDR,221.204.244.41/32,no-resolve
# Tianjin Unicom (tjdnserror1.wo.com.cn ~ tjdnserror5.wo.com.cn)
IP-CIDR,218.68.250.117/32,no-resolve
IP-CIDR,218.68.250.118/32,no-resolve
IP-CIDR,218.68.250.119/32,no-resolve
IP-CIDR,218.68.250.120/32,no-resolve
IP-CIDR,218.68.250.121/32,no-resolve
## China Mobile
# Anhui Mobile
IP-CIDR,120.209.138.64/32,no-resolve
# Guangdong Mobile
IP-CIDR,211.139.136.73/32,no-resolve
IP-CIDR,221.179.46.190/32,no-resolve
IP-CIDR,221.179.46.194/32,no-resolve
# Jiangsu Mobile
IP-CIDR,183.207.232.253/32,no-resolve
# Jiangxi Mobile
IP-CIDR,223.82.248.117/32,no-resolve
# Qinghai Mobile
IP-CIDR,211.138.74.132/32,no-resolve
# Shaanxi Mobile
IP-CIDR,211.137.130.101/32,no-resolve
# Shanghai Mobile
IP-CIDR,211.136.113.1/32,no-resolve
# Shanxi Mobile
IP-CIDR,211.138.102.198/32,no-resolve
# Shandong Mobile
IP-CIDR,120.192.83.163/32,no-resolve
# Sichuan Mobile
IP-CIDR,183.221.242.172/32,no-resolve
IP-CIDR,183.221.250.11/32,no-resolve
# Xizang Mobile
IP-CIDR,111.11.208.2/32,no-resolve
# Yunnan Mobile
IP-CIDR,183.224.40.24/32,no-resolve
## China Tie Tong
# Shandong TieTong
IP-CIDR,211.98.70.226/32,no-resolve
IP-CIDR,211.98.70.227/32,no-resolve
IP-CIDR,211.98.71.195/32,no-resolve
IP-CIDR,211.98.71.196/32,no-resolve
## GWBN
# Wuhan GWBN
IP-CIDR,114.112.163.232/32,no-resolve
IP-CIDR,114.112.163.254/32,no-resolve
# https://github.com/felixonmars/dnsmasq-china-list/blob/master/bogus-nxdomain.china.conf
# --- [Anti Bogus Domain Replace Me] ---

View File

@ -87,7 +87,7 @@ RULE-SET,https://ruleset.skk.moe/List/non_ip/apple_services.conf,[Replace with y
- 人工维护
### 网易云音乐
#### 网易云音乐
```ini
RULE-SET,https://ruleset.skk.moe/List/non_ip/neteasemusic.conf,[Replace with your policy]