mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-13 01:30:37 +08:00
Chore: update CDN Hosts auto build script
This commit is contained in:
parent
d0d2c7295c
commit
f6dba1e5ba
@ -5,9 +5,17 @@ const path = require('path');
|
|||||||
(async () => {
|
(async () => {
|
||||||
const domains = (await (await fetch('https://publicsuffix.org/list/public_suffix_list.dat')).text()).split('\n');
|
const domains = (await (await fetch('https://publicsuffix.org/list/public_suffix_list.dat')).text()).split('\n');
|
||||||
|
|
||||||
const awsS3 = domains.filter(line => {
|
const S3OSSDomains = domains.filter(line => {
|
||||||
if (line) {
|
if (line) {
|
||||||
return line.startsWith('s3') && line.endsWith('.amazonaws.com') && !line.includes('cn-')
|
return (
|
||||||
|
line.startsWith('s3-')
|
||||||
|
|| line.startsWith('s3.')
|
||||||
|
)
|
||||||
|
&& (
|
||||||
|
line.endsWith('.amazonaws.com')
|
||||||
|
|| line.endsWith('.scw.cloud')
|
||||||
|
)
|
||||||
|
&& !line.includes('cn-')
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -17,7 +25,7 @@ const path = require('path');
|
|||||||
const content = (await fs.promises.readFile(filePath, 'utf-8'))
|
const content = (await fs.promises.readFile(filePath, 'utf-8'))
|
||||||
.replace(
|
.replace(
|
||||||
'# --- [AWS S3 Replace Me] ---',
|
'# --- [AWS S3 Replace Me] ---',
|
||||||
awsS3.map(domain => `DOMAIN-SUFFIX,${domain}`).join('\n')
|
S3OSSDomains.map(domain => `DOMAIN-SUFFIX,${domain}`).join('\n')
|
||||||
);
|
);
|
||||||
|
|
||||||
await fs.promises.writeFile(filePath, content, 'utf-8');
|
await fs.promises.writeFile(filePath, content, 'utf-8');
|
||||||
|
|||||||
15
List/non_ip/my_reject.conf
Normal file
15
List/non_ip/my_reject.conf
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
DOMAIN,download.parallels.com
|
||||||
|
DOMAIN,update.parallels.com
|
||||||
|
DOMAIN,desktop.parallels.com
|
||||||
|
DOMAIN,download.parallels.com.cdn.cloudflare.net
|
||||||
|
DOMAIN,update.parallels.com.cdn.cloudflare.net
|
||||||
|
DOMAIN,desktop.parallels.com.cdn.cloudflare.net
|
||||||
|
DOMAIN-SUFFIX,parallels.cn
|
||||||
|
DOMAIN,www.parallels.com
|
||||||
|
DOMAIN,reportus.parallels.com
|
||||||
|
DOMAIN,parallels.com
|
||||||
|
DOMAIN-SUFFIX,myparallels.com
|
||||||
|
DOMAIN-SUFFIX,my.parallels.com
|
||||||
|
|
||||||
|
DOMAIN-KEYWORD,bahoom
|
||||||
|
DOMAIN,daisydiskapp.com
|
||||||
@ -73,9 +73,6 @@ DOMAIN-KEYWORD,advertising.com
|
|||||||
# Tencent AD KEYWORD
|
# Tencent AD KEYWORD
|
||||||
DOMAIN-KEYWORD,wxsnsdy
|
DOMAIN-KEYWORD,wxsnsdy
|
||||||
|
|
||||||
DOMAIN-KEYWORD,bahoom
|
|
||||||
DOMAIN,daisydiskapp.com
|
|
||||||
|
|
||||||
AND, ((DOMAIN-SUFFIX,msa.cdn.mediaset.net), (DOMAIN-KEYWORD,adv0))
|
AND, ((DOMAIN-SUFFIX,msa.cdn.mediaset.net), (DOMAIN-KEYWORD,adv0))
|
||||||
|
|
||||||
# >> Tencent Lemon
|
# >> Tencent Lemon
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user