mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Update AdGuard Reject Building
This commit is contained in:
@@ -25,9 +25,6 @@ import type { MaybePromise } from './lib/misc';
|
||||
const readLocalRejectDomainsetPromise = readFileIntoProcessedArray(path.join(SOURCE_DIR, 'domainset/reject.conf'));
|
||||
const readLocalRejectExtraDomainsetPromise = readFileIntoProcessedArray(path.join(SOURCE_DIR, 'domainset/reject_extra.conf'));
|
||||
const readLocalRejectRulesetPromise = readFileIntoProcessedArray(path.join(SOURCE_DIR, 'non_ip/reject.conf'));
|
||||
const readLocalRejectDropRulesetPromise = readFileIntoProcessedArray(path.join(SOURCE_DIR, 'non_ip/reject-drop.conf'));
|
||||
const readLocalRejectNoDropRulesetPromise = readFileIntoProcessedArray(path.join(SOURCE_DIR, 'non_ip/reject-no-drop.conf'));
|
||||
const readLocalMyRejectRulesetPromise = readFileIntoProcessedArray(path.join(SOURCE_DIR, 'non_ip/my_reject.conf'));
|
||||
|
||||
const hostsDownloads = HOSTS.map(entry => processHostsWithPreload(...entry));
|
||||
const hostsExtraDownloads = HOSTS_EXTRA.map(entry => processHostsWithPreload(...entry));
|
||||
@@ -170,7 +167,7 @@ export const buildRejectDomainSet = task(require.main === module, __filename)(as
|
||||
// we are going to re-use rejectOutput's domainTrie and mutate it
|
||||
// so we must wait until we write rejectOutput to disk after we can mutate its trie
|
||||
const rejectOutputAdGuardHome = new AdGuardHomeOutput(span, 'reject-adguardhome', OUTPUT_INTERNAL_DIR)
|
||||
.withTitle('Sukka\'s Ruleset - Blocklist for AdGuardHome')
|
||||
.withTitle('Sukka\'s Ruleset - AdGuardHome Blocklist')
|
||||
.withDescription([
|
||||
'The AdGuardHome ruleset supports AD blocking, tracking protection, privacy protection, anti-mining'
|
||||
]);
|
||||
@@ -178,11 +175,18 @@ export const buildRejectDomainSet = task(require.main === module, __filename)(as
|
||||
rejectOutputAdGuardHome.domainTrie = rejectOutput.domainTrie;
|
||||
|
||||
await rejectOutputAdGuardHome
|
||||
.addFromRuleset(readLocalMyRejectRulesetPromise)
|
||||
// .addFromRuleset(readLocalMyRejectRulesetPromise)
|
||||
.addFromRuleset(readLocalRejectRulesetPromise)
|
||||
.addFromRuleset(readLocalRejectDropRulesetPromise)
|
||||
.addFromRuleset(readLocalRejectNoDropRulesetPromise)
|
||||
.addFromRuleset(readFileIntoProcessedArray(path.join(SOURCE_DIR, 'non_ip/reject-drop.conf')))
|
||||
.addFromRuleset(readFileIntoProcessedArray(path.join(SOURCE_DIR, 'non_ip/reject-no-drop.conf')))
|
||||
.addFromDomainset(readLocalRejectExtraDomainsetPromise)
|
||||
// .
|
||||
.write();
|
||||
|
||||
const myRejectOutputAdGuardHome = new AdGuardHomeOutput(span, 'my-reject-adguardhome', OUTPUT_INTERNAL_DIR)
|
||||
.withTitle('Sukka\'s Ruleset - AdGuardHome Blocklist for Myself (Sukka)')
|
||||
.withDescription([]);
|
||||
|
||||
await myRejectOutputAdGuardHome
|
||||
.addFromRuleset(readFileIntoProcessedArray(path.join(SOURCE_DIR, 'non_ip/my_reject.conf')))
|
||||
.write();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user