Fix: an fetch option to allow remote upstream to be empty

https://feodotracker.abuse.ch/faq/
This commit is contained in:
SukkaW
2025-06-15 21:36:47 +08:00
parent 56276d5711
commit d5c13b06bd
5 changed files with 9 additions and 8 deletions

View File

@@ -43,7 +43,7 @@ const BOTNET_FILTER_MIRROR_URL = [
// https://curbengh.github.io/malware-filter/botnet-filter-dnscrypt-blocked-ips.txt
];
const getBotNetFilterIPsPromise: Promise<[ipv4: string[], ipv6: string[]]> = fetchAssets(BOTNET_FILTER_URL, BOTNET_FILTER_MIRROR_URL, true).then(arr => arr.reduce<[ipv4: string[], ipv6: string[]]>((acc, ip) => {
const getBotNetFilterIPsPromise: Promise<[ipv4: string[], ipv6: string[]]> = fetchAssets(BOTNET_FILTER_URL, BOTNET_FILTER_MIRROR_URL, true, true).then(arr => arr.reduce<[ipv4: string[], ipv6: string[]]>((acc, ip) => {
const v = fastIpVersion(ip);
if (v === 4) {
acc[0].push(ip);