mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 09:10:35 +08:00
Update Reject Hosts
This commit is contained in:
parent
45145958b2
commit
fc0bfdc9a0
@ -114,14 +114,11 @@ export const buildRejectDomainSet = task(import.meta.path, async (span) => {
|
|||||||
});
|
});
|
||||||
filterRuleWhitelistDomainSets.forEach(suffix => {
|
filterRuleWhitelistDomainSets.forEach(suffix => {
|
||||||
trie.substractSetInPlaceFromFound(suffix, domainSets);
|
trie.substractSetInPlaceFromFound(suffix, domainSets);
|
||||||
|
domainSets.delete(
|
||||||
if (suffix[0] === '.') {
|
suffix[0] === '.'
|
||||||
// handle case like removing `g.msn.com` due to white `.g.msn.com` (`@@||g.msn.com`)
|
? suffix.slice(1) // handle case like removing `g.msn.com` due to white `.g.msn.com` (`@@||g.msn.com`)
|
||||||
domainSets.delete(suffix.slice(1));
|
: `.${suffix}` // If `g.msn.com` is whitelisted, then `.g.msn.com` should be removed from domain set
|
||||||
} else {
|
);
|
||||||
// If `g.msn.com` is whitelisted, then `.g.msn.com` should be removed from domain set
|
|
||||||
domainSets.delete(`.${suffix}`);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,7 @@ export const downloadPreviousBuild = task(import.meta.path, async (span) => {
|
|||||||
const extract = tarStream.extract();
|
const extract = tarStream.extract();
|
||||||
|
|
||||||
pipeline(
|
pipeline(
|
||||||
Readable.fromWeb(resp.body as unknown as import('stream/web').ReadableStream<any>),
|
Readable.fromWeb(resp.body as any),
|
||||||
gunzip,
|
gunzip,
|
||||||
extract
|
extract
|
||||||
);
|
);
|
||||||
|
|||||||
@ -29,9 +29,9 @@ import { buildCloudMounterRules } from './build-cloudmounter-rules';
|
|||||||
import { createSpan, printTraceResult } from './trace';
|
import { createSpan, printTraceResult } from './trace';
|
||||||
import { buildDeprecateFiles } from './build-deprecate-files';
|
import { buildDeprecateFiles } from './build-deprecate-files';
|
||||||
|
|
||||||
(async () => {
|
|
||||||
console.log('Bun version:', Bun.version, Bun.revision);
|
console.log('Bun version:', Bun.version, Bun.revision);
|
||||||
|
|
||||||
|
(async () => {
|
||||||
const rootSpan = createSpan('root');
|
const rootSpan = createSpan('root');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -47,9 +47,6 @@ export function processDomainLists(span: Span, domainListsUrl: string, includeAl
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
export function processHosts(span: Span, hostsUrl: string, mirrors: string[] | null, includeAllSubDomain = false, ttl: number | null = null) {
|
export function processHosts(span: Span, hostsUrl: string, mirrors: string[] | null, includeAllSubDomain = false, ttl: number | null = null) {
|
||||||
return span.traceChild(`processhosts: ${hostsUrl}`).traceAsyncFn((childSpan) => fsFetchCache.apply(
|
|
||||||
hostsUrl,
|
|
||||||
async () => {
|
|
||||||
const domainSets = new Set<string>();
|
const domainSets = new Set<string>();
|
||||||
|
|
||||||
const lineCb = (l: string) => {
|
const lineCb = (l: string) => {
|
||||||
@ -74,6 +71,9 @@ export function processHosts(span: Span, hostsUrl: string, mirrors: string[] | n
|
|||||||
domainSets.add(includeAllSubDomain ? `.${domain}` : domain);
|
domainSets.add(includeAllSubDomain ? `.${domain}` : domain);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
return span.traceChild(`processhosts: ${hostsUrl}`).traceAsyncFn((childSpan) => fsFetchCache.apply(
|
||||||
|
hostsUrl,
|
||||||
|
async () => {
|
||||||
if (mirrors == null || mirrors.length === 0) {
|
if (mirrors == null || mirrors.length === 0) {
|
||||||
for await (const l of await fetchRemoteTextByLine(hostsUrl)) {
|
for await (const l of await fetchRemoteTextByLine(hostsUrl)) {
|
||||||
lineCb(l);
|
lineCb(l);
|
||||||
|
|||||||
@ -127,6 +127,11 @@ DOMAIN-SUFFIX,johncornell.com
|
|||||||
DOMAIN-SUFFIX,hamdandates.com
|
DOMAIN-SUFFIX,hamdandates.com
|
||||||
DOMAIN-SUFFIX,espmp-nifr.net
|
DOMAIN-SUFFIX,espmp-nifr.net
|
||||||
DOMAIN-SUFFIX,carte-gr.total.fr
|
DOMAIN-SUFFIX,carte-gr.total.fr
|
||||||
|
DOMAIN-SUFFIX,j74y03g8u.com
|
||||||
|
DOMAIN-SUFFIX,net.iberostar.com
|
||||||
|
DOMAIN-SUFFIX,kortfilmfestivalen.no
|
||||||
|
DOMAIN-SUFFIX,4puuqeh41.com
|
||||||
|
DOMAIN-SUFFIX,branch.rocks
|
||||||
|
|
||||||
# >> Phishing
|
# >> Phishing
|
||||||
DOMAIN-SUFFIX,exaapi.com
|
DOMAIN-SUFFIX,exaapi.com
|
||||||
@ -138,13 +143,6 @@ DOMAIN-SUFFIX,yourtrap.com
|
|||||||
DOMAIN-SUFFIX,24houcryptowatcher.com
|
DOMAIN-SUFFIX,24houcryptowatcher.com
|
||||||
DOMAIN-SUFFIX,xsph.ru
|
DOMAIN-SUFFIX,xsph.ru
|
||||||
|
|
||||||
DOMAIN-KEYWORD,pancakeswap
|
|
||||||
|
|
||||||
DOMAIN-KEYWORD,fb-restriction-case
|
|
||||||
DOMAIN-KEYWORD,fb-restriction-appeal
|
|
||||||
DOMAIN-KEYWORD,fb-community-standards
|
|
||||||
DOMAIN-KEYWORD,fb-business-appeal
|
|
||||||
|
|
||||||
DOMAIN-SUFFIX,temp.swtest.ru
|
DOMAIN-SUFFIX,temp.swtest.ru
|
||||||
DOMAIN-SUFFIX,tw1.ru
|
DOMAIN-SUFFIX,tw1.ru
|
||||||
DOMAIN-SUFFIX,tarungdrajatsiokalama.com
|
DOMAIN-SUFFIX,tarungdrajatsiokalama.com
|
||||||
@ -154,6 +152,12 @@ DOMAIN-SUFFIX,pages.net.br
|
|||||||
DOMAIN-SUFFIX,myenotice.com
|
DOMAIN-SUFFIX,myenotice.com
|
||||||
DOMAIN-SUFFIX,eu5.net
|
DOMAIN-SUFFIX,eu5.net
|
||||||
|
|
||||||
|
DOMAIN-KEYWORD,pancakeswap
|
||||||
|
DOMAIN-KEYWORD,fb-restriction-case
|
||||||
|
DOMAIN-KEYWORD,fb-restriction-appeal
|
||||||
|
DOMAIN-KEYWORD,fb-community-standards
|
||||||
|
DOMAIN-KEYWORD,fb-business-appeal
|
||||||
|
|
||||||
# --- End of Blacklist Section
|
# --- End of Blacklist Section
|
||||||
|
|
||||||
# --- AD Block ---
|
# --- AD Block ---
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user