diff --git a/Build/build-chn-cidr.ts b/Build/build-chn-cidr.ts index e4876c2a..5c938766 100644 --- a/Build/build-chn-cidr.ts +++ b/Build/build-chn-cidr.ts @@ -29,6 +29,7 @@ export const buildChnCidr = task(import.meta.path, async () => { 'Data from https://misaka.io (misakaio @ GitHub)' ]; + // Can not use createRuleset here, as Clash support advanced ipset syntax return Promise.all([ compareAndWriteFile( withBannerArray( diff --git a/Build/build-reject-domainset.ts b/Build/build-reject-domainset.ts index 54986879..ba586838 100644 --- a/Build/build-reject-domainset.ts +++ b/Build/build-reject-domainset.ts @@ -207,11 +207,9 @@ export const buildRejectDomainSet = task(import.meta.path, async () => { rejectDomainsStats.map(([domain, count]) => `${domain}${' '.repeat(100 - domain.length)}${count}`), path.resolve(import.meta.dir, '../List/internal/reject-stats.txt') ), - // Copy reject_sukka.conf for backward compatibility - fsp.cp( - path.resolve(import.meta.dir, '../Source/domainset/reject_sukka.conf'), + Bun.write( path.resolve(import.meta.dir, '../List/domainset/reject_sukka.conf'), - { force: true, recursive: true } + '# The file has been deprecated, its content has been merged into the main `reject` domainset.\n' ) ]); }); diff --git a/Build/lib/create-file.ts b/Build/lib/create-file.ts index a0199022..604cd011 100644 --- a/Build/lib/create-file.ts +++ b/Build/lib/create-file.ts @@ -68,14 +68,14 @@ export async function compareAndWriteFile(linesA: string[], filePath: string) { export const withBannerArray = (title: string, description: string[], date: Date, content: string[]) => { return [ - '########################################', + '#########################################', `# ${title}`, `# Last Updated: ${date.toISOString()}`, `# Size: ${content.length}`, ...description.map(line => (line ? `# ${line}` : '#')), - '########################################', + '#########################################', ...content, - '################# END ###################' + '################## EOF ##################' ]; }; diff --git a/Build/lib/get-phishing-domains.ts b/Build/lib/get-phishing-domains.ts index 1531b039..a3d775d5 100644 --- a/Build/lib/get-phishing-domains.ts +++ b/Build/lib/get-phishing-domains.ts @@ -90,10 +90,7 @@ export const getPhishingDomains = () => traceAsync('get phishing domains', async // // 'https://malware-filter.gitlab.io/malware-filter/phishing-filter-agh.txt' // ] // ), - getGorhillPublicSuffixPromise(), - // Remove old files - fsp.rm(path.resolve(import.meta.dir, '../../List/domainset/reject_phishing.conf'), { force: true }), - fsp.rm(path.resolve(import.meta.dir, '../../Clash/domainset/reject_phishing.txt'), { force: true }) + getGorhillPublicSuffixPromise() ]); traceSync.skip('* whitelisting phishing domains', () => { diff --git a/Source/domainset/reject_phishing.conf b/Source/domainset/reject_phishing.conf new file mode 100644 index 00000000..7b8cf580 --- /dev/null +++ b/Source/domainset/reject_phishing.conf @@ -0,0 +1,2 @@ +# $ meta_title Sukka's Ruleset - Reject Phishing +# $ meta_description The file has been deprecated, its content has been merged into the main `reject` domainset.