mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 17:20:35 +08:00
Update AI / CDN / Domestic / Global / Reject
This commit is contained in:
parent
8c95d08dcf
commit
64f5a07f59
@ -92,20 +92,27 @@ export const withBannerArray = (title: string, description: string[] | readonly
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const MARK = `${Math.random().toString(36).slice(2)}.this_ruleset_is_made_by_sukkaw.${Math.random().toString(36).slice(2)}.ruleset.skk.moe`;
|
||||||
|
|
||||||
export const createRuleset = (
|
export const createRuleset = (
|
||||||
parentSpan: Span,
|
parentSpan: Span,
|
||||||
title: string, description: string[] | readonly string[], date: Date, content: string[],
|
title: string, description: string[] | readonly string[], date: Date, content: string[],
|
||||||
type: 'ruleset' | 'domainset', surgePath: string, clashPath: string
|
type: 'ruleset' | 'domainset', surgePath: string, clashPath: string
|
||||||
) => parentSpan.traceChild(`create ruleset: ${path.basename(surgePath, path.extname(surgePath))}`).traceAsyncFn((childSpan) => {
|
) => parentSpan.traceChild(`create ruleset: ${path.basename(surgePath, path.extname(surgePath))}`).traceAsyncFn((childSpan) => {
|
||||||
const surgeContent = withBannerArray(title, description, date, content);
|
const surgeContent = withBannerArray(
|
||||||
|
title, description, date,
|
||||||
|
type === 'domainset'
|
||||||
|
? [MARK, ...content]
|
||||||
|
: [`DOMAIN,${MARK}`, ...content]
|
||||||
|
);
|
||||||
const clashContent = childSpan.traceChildSync('convert incoming ruleset to clash', () => {
|
const clashContent = childSpan.traceChildSync('convert incoming ruleset to clash', () => {
|
||||||
let _clashContent;
|
let _clashContent;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'domainset':
|
case 'domainset':
|
||||||
_clashContent = surgeDomainsetToClashDomainset(content);
|
_clashContent = [MARK, ...surgeDomainsetToClashDomainset(content)];
|
||||||
break;
|
break;
|
||||||
case 'ruleset':
|
case 'ruleset':
|
||||||
_clashContent = surgeRulesetToClashClassicalTextRuleset(content);
|
_clashContent = [`DOMAIN,${MARK}`, ...surgeRulesetToClashClassicalTextRuleset(content)];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new TypeError(`Unknown type: ${type as any}`);
|
throw new TypeError(`Unknown type: ${type as any}`);
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
ruleset.skk.moe
|
ruleset.skk.moe
|
||||||
pic.skk.moe
|
pic.skk.moe
|
||||||
img.skk.moe
|
img.skk.moe
|
||||||
cdn.skk.moe
|
.cdn.skk.moe
|
||||||
hv-monsterdb-data.skk.moe
|
hv-monsterdb-data.skk.moe
|
||||||
|
|
||||||
# >> OHTTP Relay
|
# >> OHTTP Relay
|
||||||
@ -2420,3 +2420,4 @@ cdn.9to5terminal.com
|
|||||||
cdn.parsely.com
|
cdn.parsely.com
|
||||||
linuxiac.b-cdn.net
|
linuxiac.b-cdn.net
|
||||||
cdn.usd.fan
|
cdn.usd.fan
|
||||||
|
static.esimplus.net
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
# OpenAI / ChatGPT
|
# OpenAI / ChatGPT
|
||||||
DOMAIN-KEYWORD,openai
|
DOMAIN-KEYWORD,openai
|
||||||
|
# DOMAIN,api.statsig.com
|
||||||
# DOMAIN-SUFFIX,openai.com
|
# DOMAIN-SUFFIX,openai.com
|
||||||
DOMAIN-SUFFIX,oaistatic.com
|
DOMAIN-SUFFIX,oaistatic.com
|
||||||
DOMAIN-SUFFIX,oaiusercontent.com
|
DOMAIN-SUFFIX,oaiusercontent.com
|
||||||
@ -16,13 +17,18 @@ DOMAIN-SUFFIX,claude.ai
|
|||||||
# Google Gemini
|
# Google Gemini
|
||||||
DOMAIN-SUFFIX,bard.google.com
|
DOMAIN-SUFFIX,bard.google.com
|
||||||
DOMAIN-SUFFIX,gemini.google.com
|
DOMAIN-SUFFIX,gemini.google.com
|
||||||
|
# Google DeepMind
|
||||||
|
DOMAIN-SUFFIX,deepmind.com
|
||||||
|
DOMAIN-SUFFIX,deepmind.google
|
||||||
# Google Generative Language API
|
# Google Generative Language API
|
||||||
DOMAIN-SUFFIX,generativelanguage.googleapis.com
|
DOMAIN-SUFFIX,generativelanguage.googleapis.com
|
||||||
DOMAIN-SUFFIX,geller-pa.googleapis.com
|
DOMAIN-SUFFIX,geller-pa.googleapis.com
|
||||||
|
DOMAIN-SUFFIX,proactivebackend-pa.googleapis.com
|
||||||
# Google AI Studio
|
# Google AI Studio
|
||||||
DOMAIN,ai.google.dev
|
DOMAIN,ai.google.dev
|
||||||
DOMAIN-SUFFIX,makersuite.google.com
|
DOMAIN-SUFFIX,makersuite.google.com
|
||||||
DOMAIN,alkalicore-pa.clients6.google.com
|
DOMAIN,alkalicore-pa.clients6.google.com
|
||||||
DOMAIN,alkalimakersuite-pa.clients6.google.com
|
DOMAIN,alkalimakersuite-pa.clients6.google.com
|
||||||
|
DOMAIN-SUFFIX,generativeai.google
|
||||||
# POE
|
# POE
|
||||||
DOMAIN-SUFFIX,poe.com
|
DOMAIN-SUFFIX,poe.com
|
||||||
|
|||||||
@ -270,6 +270,7 @@ DOMAIN-SUFFIX,cmburl.cn
|
|||||||
DOMAIN-SUFFIX,95588.com
|
DOMAIN-SUFFIX,95588.com
|
||||||
DOMAIN-SUFFIX,95588.com.cn
|
DOMAIN-SUFFIX,95588.com.cn
|
||||||
DOMAIN-SUFFIX,dccnet.com.cn
|
DOMAIN-SUFFIX,dccnet.com.cn
|
||||||
|
DOMAIN-SUFFIX,icbc.com.cn
|
||||||
# CCB
|
# CCB
|
||||||
DOMAIN-SUFFIX,ccb.com
|
DOMAIN-SUFFIX,ccb.com
|
||||||
# PSBC
|
# PSBC
|
||||||
@ -410,6 +411,7 @@ DOMAIN-SUFFIX,kaiyanapp.com
|
|||||||
DOMAIN-SUFFIX,keepcdn.com
|
DOMAIN-SUFFIX,keepcdn.com
|
||||||
DOMAIN-SUFFIX,kkmh.com
|
DOMAIN-SUFFIX,kkmh.com
|
||||||
DOMAIN-SUFFIX,kugou.com
|
DOMAIN-SUFFIX,kugou.com
|
||||||
|
DOMAIN-SUFFIX,kuwo.cn
|
||||||
DOMAIN-SUFFIX,lagou.com
|
DOMAIN-SUFFIX,lagou.com
|
||||||
DOMAIN-SUFFIX,leiniao.com
|
DOMAIN-SUFFIX,leiniao.com
|
||||||
DOMAIN-SUFFIX,linkedin.cn
|
DOMAIN-SUFFIX,linkedin.cn
|
||||||
|
|||||||
@ -66,7 +66,8 @@ export const DOMESTICS = {
|
|||||||
'hemashare.cn',
|
'hemashare.cn',
|
||||||
'shyhhema.com',
|
'shyhhema.com',
|
||||||
'sm.cn',
|
'sm.cn',
|
||||||
'npmmirror.com'
|
'npmmirror.com',
|
||||||
|
'alios.cn'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
TENCENT: {
|
TENCENT: {
|
||||||
@ -113,7 +114,9 @@ export const DOMESTICS = {
|
|||||||
'tencentcs.cn',
|
'tencentcs.cn',
|
||||||
'tencent-coud.cn',
|
'tencent-coud.cn',
|
||||||
'qcloudimg.com',
|
'qcloudimg.com',
|
||||||
'dnspod.cn'
|
'dnspod.cn',
|
||||||
|
'yunos.com',
|
||||||
|
'yitao.com'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
BILIBILI_ALI: {
|
BILIBILI_ALI: {
|
||||||
|
|||||||
@ -271,7 +271,14 @@ DOMAIN-SUFFIX,deviantart.com
|
|||||||
DOMAIN-SUFFIX,deviantart.net
|
DOMAIN-SUFFIX,deviantart.net
|
||||||
DOMAIN-SUFFIX,disqus.com
|
DOMAIN-SUFFIX,disqus.com
|
||||||
DOMAIN-SUFFIX,dropbox.com
|
DOMAIN-SUFFIX,dropbox.com
|
||||||
|
DOMAIN-SUFFIX,dropbox-dns.com
|
||||||
DOMAIN-SUFFIX,dropboxapi.com
|
DOMAIN-SUFFIX,dropboxapi.com
|
||||||
|
DOMAIN-SUFFIX,dropboxcaptcha.com
|
||||||
|
DOMAIN-SUFFIX,dropboxforum.com
|
||||||
|
DOMAIN-SUFFIX,dropboxforums.com
|
||||||
|
DOMAIN-SUFFIX,dropboxinsiders.com
|
||||||
|
DOMAIN-SUFFIX,dropboxmail.com
|
||||||
|
DOMAIN-SUFFIX,getdropbox.com
|
||||||
DOMAIN-SUFFIX,dropboxusercontent.com
|
DOMAIN-SUFFIX,dropboxusercontent.com
|
||||||
DOMAIN-SUFFIX,duckduckgo.com
|
DOMAIN-SUFFIX,duckduckgo.com
|
||||||
DOMAIN-SUFFIX,e-hentai.org
|
DOMAIN-SUFFIX,e-hentai.org
|
||||||
|
|||||||
@ -94,6 +94,7 @@ DOMAIN-SUFFIX,trekkww.space
|
|||||||
DOMAIN-SUFFIX,trekkeeee.space
|
DOMAIN-SUFFIX,trekkeeee.space
|
||||||
|
|
||||||
# >> Phishing
|
# >> Phishing
|
||||||
|
DOMAIN-SUFFIX,exaapi.com
|
||||||
DOMAIN-SUFFIX,gofenews.com
|
DOMAIN-SUFFIX,gofenews.com
|
||||||
DOMAIN-SUFFIX,jemonews.com
|
DOMAIN-SUFFIX,jemonews.com
|
||||||
DOMAIN-SUFFIX,guesswhatnews.com
|
DOMAIN-SUFFIX,guesswhatnews.com
|
||||||
@ -115,6 +116,11 @@ DOMAIN-SUFFIX,organiccrap.com
|
|||||||
DOMAIN-SUFFIX,jungleheart.com
|
DOMAIN-SUFFIX,jungleheart.com
|
||||||
DOMAIN-SUFFIX,youdontcare.com
|
DOMAIN-SUFFIX,youdontcare.com
|
||||||
DOMAIN-SUFFIX,yourtrap.com
|
DOMAIN-SUFFIX,yourtrap.com
|
||||||
|
DOMAIN-SUFFIX,freshalldaynews.com
|
||||||
|
DOMAIN-SUFFIX,bestandgreatests.com
|
||||||
|
DOMAIN-SUFFIX,jessunews.com
|
||||||
|
DOMAIN-SUFFIX,findgreatnews.com
|
||||||
|
DOMAIN-SUFFIX,wemakebestnews.com
|
||||||
|
|
||||||
DOMAIN-KEYWORD,pancakeswap
|
DOMAIN-KEYWORD,pancakeswap
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user