Chore: backward compatible of reject_phishing file

This commit is contained in:
SukkaW
2023-12-10 22:32:37 +08:00
parent 643447ce06
commit 69da11a3b3
5 changed files with 9 additions and 11 deletions

View File

@@ -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 ##################'
];
};

View File

@@ -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', () => {