mirror of
https://gitlab.com/SukkaW/ruleset.skk.moe.git
synced 2026-04-20 02:44:25 +00:00
deploy: 1586fe73c1f6ae8ef683d772580403d5066aee6e
This commit is contained in:
@@ -3,6 +3,8 @@ const { promises: fsPromises } = require('fs');
|
||||
const { resolve: pathResolve } = require('path');
|
||||
|
||||
(async () => {
|
||||
console.time('Total Time - build-chnroutes-cidr');
|
||||
|
||||
const cidr = (await (await fetchWithRetry('https://raw.githubusercontent.com/misakaio/chnroutes2/master/chnroutes.txt')).text()).split('\n');
|
||||
|
||||
const filteredCidr = cidr.filter(line => {
|
||||
@@ -13,7 +15,9 @@ const { resolve: pathResolve } = require('path');
|
||||
return false;
|
||||
})
|
||||
|
||||
return fsPromises.writeFile(pathResolve(__dirname, '../List/ip/china_ip.conf'), makeCidrList(filteredCidr), { encoding: 'utf-8' });
|
||||
await fsPromises.writeFile(pathResolve(__dirname, '../List/ip/china_ip.conf'), makeCidrList(filteredCidr), { encoding: 'utf-8' });
|
||||
|
||||
console.timeEnd('Total Time - build-chnroutes-cidr');
|
||||
})();
|
||||
|
||||
function makeCidrList(cidr) {
|
||||
|
||||
Reference in New Issue
Block a user