From d5ecc73e2cb952a09852dfc59052e5d2e1276937 Mon Sep 17 00:00:00 2001 From: Andy Oknen Date: Sat, 23 Jul 2022 21:15:07 +0300 Subject: [PATCH] Remove Tor from node database snapshot download (#584) --- proxy16/node/applications.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/proxy16/node/applications.js b/proxy16/node/applications.js index 3b7b625a7e..d307a736e5 100644 --- a/proxy16/node/applications.js +++ b/proxy16/node/applications.js @@ -7,7 +7,7 @@ var path = require('path'); var Datastore = require('nedb'); var progress = require('request-progress'); var targz = require('targz'); - +const request = require("request"); var Applications = function(settings, applications = {}, proxy) { if(!settings) settings = {} @@ -197,16 +197,7 @@ var Applications = function(settings, applications = {}, proxy) { let endFile = path.resolve(dest, meta[key].name) return new Promise(async (resolve, reject) => { - let req; - - try { - req = await proxy.transports.request({url: meta[key].url}); - } catch(err) { - console.log(err); - reject(err); - - return; - } + let req = request(meta[key].url); progress(req, { throttle: 500, // Throttle the progress event to 2000ms, defaults to 1000ms