mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
Update Reject Hosts && Normalization
This commit is contained in:
parent
0a2548d6e5
commit
9d432f4a01
@ -10,7 +10,7 @@ export type TldTsParsed = ReturnType<typeof tldts.parse>;
|
||||
/**
|
||||
* Skipped the input non-empty check, the `domain` should not be empty.
|
||||
*/
|
||||
export function fastNormalizeDomainWithoutWwwNoIP(domain: string, parsed: TldTsParsed | null = null) {
|
||||
function fastNormalizeDomainWithoutWwwNoIP(domain: string, parsed: TldTsParsed | null = null) {
|
||||
// We don't want tldts to call its own "extractHostname" on ip, bail out ip first.
|
||||
// This function won't run with IP, we can safely set normalizeTldtsOpt.detectIp to false.
|
||||
|
||||
@ -19,7 +19,12 @@ export function fastNormalizeDomainWithoutWwwNoIP(domain: string, parsed: TldTsP
|
||||
if (!parsed.isIcann && !parsed.isPrivate) return null;
|
||||
|
||||
if (parsed.subdomain) {
|
||||
if (parsed.subdomain === 'www' || parsed.subdomain === 'xml-v4') {
|
||||
if (
|
||||
parsed.subdomain === 'www'
|
||||
|| parsed.subdomain === 'xml-v4'
|
||||
|| parsed.subdomain === 'xml-eu'
|
||||
|| parsed.subdomain === 'xml-eu-v4'
|
||||
) {
|
||||
return parsed.domain;
|
||||
}
|
||||
if (parsed.subdomain.startsWith('www.')) {
|
||||
|
||||
@ -602,7 +602,12 @@ function onHostname(
|
||||
|
||||
// we only strip www when it is blacklist
|
||||
if (parsed.subdomain) {
|
||||
if (parsed.subdomain === 'www' || parsed.subdomain === 'xml-v4') {
|
||||
if (
|
||||
parsed.subdomain === 'www'
|
||||
|| parsed.subdomain === 'xml-v4'
|
||||
|| parsed.subdomain === 'xml-eu'
|
||||
|| parsed.subdomain === 'xml-eu-v4'
|
||||
) {
|
||||
hostname = parsed.domain;
|
||||
} else if (parsed.subdomain.startsWith('www.')) {
|
||||
hostname = parsed.subdomain.slice(4) + '.' + parsed.domain;
|
||||
|
||||
@ -980,6 +980,9 @@ comments.gazo.space
|
||||
.hzsanjiaomao.com
|
||||
.touch-moblie.com
|
||||
|
||||
.tradeshow.globalsources.com
|
||||
.edm.globalsources.com
|
||||
|
||||
# >> Tracking
|
||||
.plausible.io
|
||||
.statfox.io
|
||||
|
||||
@ -150,6 +150,8 @@ DOMAIN-KEYWORD,a8cv.
|
||||
DOMAIN-KEYWORD,plausible.
|
||||
|
||||
DOMAIN-KEYWORD,-mktg.vodafone.com
|
||||
DOMAIN-KEYWORD,-business.vodafone.com
|
||||
DOMAIN-KEYWORD,-ss.checkoutera.com
|
||||
|
||||
# Tencent AD KEYWORD
|
||||
DOMAIN-KEYWORD,wxsnsdy
|
||||
@ -275,11 +277,19 @@ DOMAIN-KEYWORD,-ad.ixigua.com
|
||||
DOMAIN-WILDCARD,tracking.*.miui.com
|
||||
DOMAIN-WILDCARD,*.tracking.*.miui.com
|
||||
|
||||
# >> HSBC
|
||||
DOMAIN-KEYWORD,trksvg.business.hsbc.
|
||||
DOMAIN-KEYWORD,trkgbm.business.hsbc.
|
||||
DOMAIN-KEYWORD,trkhinv.business.hsbc.
|
||||
DOMAIN-KEYWORD,trkcmb.business.hsbc.
|
||||
# >> HSBC (CNAME Cloaking)
|
||||
DOMAIN-KEYWORD,trksvg.business.
|
||||
DOMAIN-KEYWORD,trkgbm.business.
|
||||
DOMAIN-KEYWORD,trkhinv.business.
|
||||
DOMAIN-KEYWORD,trkcmb.business.
|
||||
DOMAIN-KEYWORD,trksvg.sustainablefinance.
|
||||
DOMAIN-KEYWORD,trkgbm.sustainablefinance.
|
||||
DOMAIN-KEYWORD,trkhinv.sustainablefinance.
|
||||
DOMAIN-KEYWORD,trkcmb.sustainablefinance.
|
||||
DOMAIN-KEYWORD,trksvg.gbm.
|
||||
DOMAIN-KEYWORD,trkgbm.gbm.
|
||||
DOMAIN-KEYWORD,trkhinv.gbm.
|
||||
DOMAIN-KEYWORD,trkcmb.gbm.
|
||||
|
||||
# >> Apple
|
||||
DOMAIN-KEYWORD,-analytics-events.apple.com
|
||||
@ -295,6 +305,7 @@ DOMAIN-KEYWORD,-ad.wtzw.com
|
||||
DOMAIN-KEYWORD,-be-pack-sign.pglstatp-toutiao.com
|
||||
DOMAIN-KEYWORD,-be-pack.pglstatp-toutiao.com
|
||||
DOMAIN-KEYWORD,-normal.zijieapi.com
|
||||
DOMAIN-KEYWORD,mon.zijieapi.com
|
||||
DOMAIN-WILDCARD,ads-*.xhscdn.com
|
||||
DOMAIN-WILDCARD,ads-*.tiktok.com
|
||||
DOMAIN-WILDCARD,mon-*.byteoversea.com
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user