implement proxy speed check
This commit is contained in:
14
helpers.js
Normal file
14
helpers.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const convertProxyListToString = (proxyList) => {
|
||||
if (Array.isArray(proxyList)){
|
||||
let result = '';
|
||||
proxyList.forEach(proxyServer => {
|
||||
result += `[${proxyServer.timeToFetch}]` + proxyServer.address + '\r\n';
|
||||
});
|
||||
return result;
|
||||
}
|
||||
console.log('[ERROR](convertProxyListToString) Proxy list is not an array')
|
||||
console.log(proxyList);
|
||||
return '';
|
||||
}
|
||||
|
||||
exports.convertProxyListToString = convertProxyListToString;
|
||||
Reference in New Issue
Block a user