mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +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 = (
|
||||
parentSpan: Span,
|
||||
title: string, description: string[] | readonly string[], date: Date, content: string[],
|
||||
type: 'ruleset' | 'domainset', surgePath: string, clashPath: string
|
||||
) => 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', () => {
|
||||
let _clashContent;
|
||||
switch (type) {
|
||||
case 'domainset':
|
||||
_clashContent = surgeDomainsetToClashDomainset(content);
|
||||
_clashContent = [MARK, ...surgeDomainsetToClashDomainset(content)];
|
||||
break;
|
||||
case 'ruleset':
|
||||
_clashContent = surgeRulesetToClashClassicalTextRuleset(content);
|
||||
_clashContent = [`DOMAIN,${MARK}`, ...surgeRulesetToClashClassicalTextRuleset(content)];
|
||||
break;
|
||||
default:
|
||||
throw new TypeError(`Unknown type: ${type as any}`);
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
ruleset.skk.moe
|
||||
pic.skk.moe
|
||||
img.skk.moe
|
||||
cdn.skk.moe
|
||||
.cdn.skk.moe
|
||||
hv-monsterdb-data.skk.moe
|
||||
|
||||
# >> OHTTP Relay
|
||||
@ -2420,3 +2420,4 @@ cdn.9to5terminal.com
|
||||
cdn.parsely.com
|
||||
linuxiac.b-cdn.net
|
||||
cdn.usd.fan
|
||||
static.esimplus.net
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
# OpenAI / ChatGPT
|
||||
DOMAIN-KEYWORD,openai
|
||||
# DOMAIN,api.statsig.com
|
||||
# DOMAIN-SUFFIX,openai.com
|
||||
DOMAIN-SUFFIX,oaistatic.com
|
||||
DOMAIN-SUFFIX,oaiusercontent.com
|
||||
@ -16,13 +17,18 @@ DOMAIN-SUFFIX,claude.ai
|
||||
# Google Gemini
|
||||
DOMAIN-SUFFIX,bard.google.com
|
||||
DOMAIN-SUFFIX,gemini.google.com
|
||||
# Google DeepMind
|
||||
DOMAIN-SUFFIX,deepmind.com
|
||||
DOMAIN-SUFFIX,deepmind.google
|
||||
# Google Generative Language API
|
||||
DOMAIN-SUFFIX,generativelanguage.googleapis.com
|
||||
DOMAIN-SUFFIX,geller-pa.googleapis.com
|
||||
DOMAIN-SUFFIX,proactivebackend-pa.googleapis.com
|
||||
# Google AI Studio
|
||||
DOMAIN,ai.google.dev
|
||||
DOMAIN-SUFFIX,makersuite.google.com
|
||||
DOMAIN,alkalicore-pa.clients6.google.com
|
||||
DOMAIN,alkalimakersuite-pa.clients6.google.com
|
||||
DOMAIN-SUFFIX,generativeai.google
|
||||
# POE
|
||||
DOMAIN-SUFFIX,poe.com
|
||||
|
||||
@ -270,6 +270,7 @@ DOMAIN-SUFFIX,cmburl.cn
|
||||
DOMAIN-SUFFIX,95588.com
|
||||
DOMAIN-SUFFIX,95588.com.cn
|
||||
DOMAIN-SUFFIX,dccnet.com.cn
|
||||
DOMAIN-SUFFIX,icbc.com.cn
|
||||
# CCB
|
||||
DOMAIN-SUFFIX,ccb.com
|
||||
# PSBC
|
||||
@ -410,6 +411,7 @@ DOMAIN-SUFFIX,kaiyanapp.com
|
||||
DOMAIN-SUFFIX,keepcdn.com
|
||||
DOMAIN-SUFFIX,kkmh.com
|
||||
DOMAIN-SUFFIX,kugou.com
|
||||
DOMAIN-SUFFIX,kuwo.cn
|
||||
DOMAIN-SUFFIX,lagou.com
|
||||
DOMAIN-SUFFIX,leiniao.com
|
||||
DOMAIN-SUFFIX,linkedin.cn
|
||||
|
||||
@ -66,7 +66,8 @@ export const DOMESTICS = {
|
||||
'hemashare.cn',
|
||||
'shyhhema.com',
|
||||
'sm.cn',
|
||||
'npmmirror.com'
|
||||
'npmmirror.com',
|
||||
'alios.cn'
|
||||
]
|
||||
},
|
||||
TENCENT: {
|
||||
@ -113,7 +114,9 @@ export const DOMESTICS = {
|
||||
'tencentcs.cn',
|
||||
'tencent-coud.cn',
|
||||
'qcloudimg.com',
|
||||
'dnspod.cn'
|
||||
'dnspod.cn',
|
||||
'yunos.com',
|
||||
'yitao.com'
|
||||
]
|
||||
},
|
||||
BILIBILI_ALI: {
|
||||
|
||||
@ -271,7 +271,14 @@ DOMAIN-SUFFIX,deviantart.com
|
||||
DOMAIN-SUFFIX,deviantart.net
|
||||
DOMAIN-SUFFIX,disqus.com
|
||||
DOMAIN-SUFFIX,dropbox.com
|
||||
DOMAIN-SUFFIX,dropbox-dns.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,duckduckgo.com
|
||||
DOMAIN-SUFFIX,e-hentai.org
|
||||
|
||||
@ -94,6 +94,7 @@ DOMAIN-SUFFIX,trekkww.space
|
||||
DOMAIN-SUFFIX,trekkeeee.space
|
||||
|
||||
# >> Phishing
|
||||
DOMAIN-SUFFIX,exaapi.com
|
||||
DOMAIN-SUFFIX,gofenews.com
|
||||
DOMAIN-SUFFIX,jemonews.com
|
||||
DOMAIN-SUFFIX,guesswhatnews.com
|
||||
@ -115,6 +116,11 @@ DOMAIN-SUFFIX,organiccrap.com
|
||||
DOMAIN-SUFFIX,jungleheart.com
|
||||
DOMAIN-SUFFIX,youdontcare.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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user