mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Refactor: track download stats and enable HTTP/2
This commit is contained in:
@@ -49,6 +49,8 @@ const getBotNetFilterIPsPromise: Promise<[ipv4: string[], ipv6: string[]]> = fet
|
||||
return acc;
|
||||
}, [[], []]));
|
||||
|
||||
const readLocalRejectIpListPromise = readFileIntoProcessedArray(path.resolve(SOURCE_DIR, 'ip/reject.conf'));
|
||||
|
||||
export const buildRejectIPList = task(require.main === module, __filename)(async (span) => {
|
||||
const [bogusNxDomainIPs, botNetIPs] = await Promise.all([
|
||||
span.traceChildPromise('get bogus nxdomain ips', getBogusNxDomainIPsPromise),
|
||||
@@ -66,7 +68,7 @@ export const buildRejectIPList = task(require.main === module, __filename)(async
|
||||
' - https://github.com/felixonmars/dnsmasq-china-list',
|
||||
' - https://github.com/curbengh/botnet-filter'
|
||||
])
|
||||
.addFromRuleset(await readFileIntoProcessedArray(path.resolve(SOURCE_DIR, 'ip/reject.conf')))
|
||||
.addFromRuleset(readLocalRejectIpListPromise)
|
||||
.bulkAddCIDR4NoResolve(bogusNxDomainIPs[0])
|
||||
.bulkAddCIDR6NoResolve(bogusNxDomainIPs[1])
|
||||
.bulkAddCIDR4NoResolve(botNetIPs[0])
|
||||
|
||||
Reference in New Issue
Block a user